DBA Data[Home] [Help]

APPS.PV_MATCH_V2_PUB dependencies on PV_LEAD_ASSIGNMENTS

Line 508: from pv_party_notifications pvpn, pv_lead_assignments pvla , pv_lead_workflows pvlw

504: where jtfre.resource_id = pc_resource_id;
505:
506: cursor lc_is_cm (pc_resource_id number, pc_lead_id number) is
507: select 'X'
508: from pv_party_notifications pvpn, pv_lead_assignments pvla , pv_lead_workflows pvlw
509: where pvlw.lead_id = pc_lead_id
510: and pvlw.entity = 'OPPORTUNITY'
511: and pvlw.LATEST_ROUTING_FLAG = 'Y'
512: and pvlw.routing_status = 'MATCHED'

Line 2016: partner exists in pv_lead_assignments until oppty is recycled by the partner

2012: REJECTED CURRENT OPPORTUNITY = 1
2013: PREFERRED OR INCUMBENT PARTNER FOR CURRENT OPPORTUNITY = 2
2014:
2015: 2. Most of the select statements assume that PT_APPROVED row for accepted
2016: partner exists in pv_lead_assignments until oppty is recycled by the partner
2017:
2018: 3. ISSUE : RECYCLED from_status does not have partner_id populated in
2019: pv_assignment_logs. So, rejected partner query may not give the correct result
2020:

Line 2107: from pv_lead_assignments pval

2103: select rejected_oppty_flag flagvalue
2104: from dual
2105: where exists
2106: (select rejected_oppty_flag
2107: from pv_lead_assignments pval
2108: where pval.lead_id = pc_lead_id
2109: and pval.status in ('PT_REJECTED', 'PT_ABANDONED', 'PT_TIMEOUT')
2110: and pval.partner_id = pc_partner_id
2111: )

Line 2724: from PV_LEAD_ASSIGNMENTS PVLA,

2720: is
2721: select PVLA.PARTNER_ID, PVPN.RESOURCE_ID, 'PN' source ,
2722: PVLA.STATUS, to_char(PVLA.STATUS_DATE, 'YYYY-MM-DD HH:MM:SS'),
2723: pvpn.DECISION_MAKER_FLAG
2724: from PV_LEAD_ASSIGNMENTS PVLA,
2725: PV_PARTY_NOTIFICATIONS PVPN,
2726: PV_LEAD_WORKFLOWS PVLW
2727: where pvlw.LEAD_ID = pc_lead_id
2728: and pvlw.LATEST_ROUTING_FLAG = 'Y'

Line 2747: from pv_lead_assignments pvla

2743: or asac.partner_customer_id is not null )
2744: union
2745: select pvla.partner_id partner_id, pvla.source_type source
2746: , lead_assignment_id ,pvla.assign_sequence
2747: from pv_lead_assignments pvla
2748: where pvla.lead_id = pc_lead_id
2749: and pvla.status = 'UNASSIGNED'
2750: order by 4;
2751:

Line 2922: ** Submit Routing in UI will save all the partners in pv_lead_assignments

2918:
2919: elsif l_wf_started ='N' then
2920:
2921: /**
2922: ** Submit Routing in UI will save all the partners in pv_lead_assignments
2923: ** If there is an error in creating the assignment, we can't roll back the above as they are part of two separate
2924: ** transactions in UI. So, when users gets back to assignment detail UI page, we'll like do our original logic.
2925: ** i.e. Get Partnes from Sales Team and partners that are saved from matching.
2926: ** we would n't want to get sales team partners from pv_lead_assignments

Line 2926: ** we would n't want to get sales team partners from pv_lead_assignments

2922: ** Submit Routing in UI will save all the partners in pv_lead_assignments
2923: ** If there is an error in creating the assignment, we can't roll back the above as they are part of two separate
2924: ** transactions in UI. So, when users gets back to assignment detail UI page, we'll like do our original logic.
2925: ** i.e. Get Partnes from Sales Team and partners that are saved from matching.
2926: ** we would n't want to get sales team partners from pv_lead_assignments
2927: **/
2928:
2929: -- Commenting out this delete statement as a fix for the ranking issue if the partners
2930: -- came from salesteam. The salesteam rows were being deleted and then queried from

Line 2935: delete from pv_lead_assignments

2931: -- the as_accesses_all table. Because of this we could never rank the partners added
2932: -- from salesteam. This change in conjunction with a change in the java layer gets us
2933: -- the desired result. Please refer to bug 3614435 for more details.
2934: /*
2935: delete from pv_lead_assignments
2936: where lead_id = p_lead_id
2937: and source_type = 'SALESTEAM'
2938: and status = 'UNASSIGNED';
2939: */

Line 3157: from pv_lead_assignments pvla

3153: l_party_count number := 0;
3154:
3155: cursor lc_get_saved_pts (pc_lead_id number) is
3156: select pvla.partner_id partner_id, pvla.ASSIGN_SEQUENCE, pvla.source_type
3157: from pv_lead_assignments pvla
3158: where pvla.lead_id = pc_lead_id
3159: and pvla.status = 'UNASSIGNED';
3160:
3161: l_api_name CONSTANT VARCHAR2(30) := 'Create_Assignment';

Line 3224: fnd_message.Set_Token('TEXT', 'Deleting Rows from pv_lead_assignments : ');

3220: close lc_get_saved_pts;
3221:
3222: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
3223: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
3224: fnd_message.Set_Token('TEXT', 'Deleting Rows from pv_lead_assignments : ');
3225: fnd_msg_pub.Add;
3226: END IF;
3227:
3228: delete from pv_lead_assignments

Line 3228: delete from pv_lead_assignments

3224: fnd_message.Set_Token('TEXT', 'Deleting Rows from pv_lead_assignments : ');
3225: fnd_msg_pub.Add;
3226: END IF;
3227:
3228: delete from pv_lead_assignments
3229: where lead_id = p_lead_id
3230: and status = 'UNASSIGNED';
3231:
3232: PV_ASSIGNMENT_PUB. CREATEASSIGNMENT(