Provide a brief description about the API method. What does it do? When to use it, etc.
Modifies cmpoints to add role specific weight (roleweight) to CampaignMembers in allresponses that are associated to Contacts with OpportunityContactRoles (ocrsByContactId). CampaignMembers may have Contacts associated to more than one OpportunityContactRoles. By default, weight will be added for each associated OpportunityContactRole with role weight.
Replace the text below with the actual signature of the method. Be sure to include return type, params, and types for params
void contactRoleAttribution(
Id opId,
String noRoleLabelName,
Boolean largestWeightOnly,
Map<Id, CampaignMember> allresponses,
Map<Id, List<OpportunityContactRole>> ocrsByContactId,
Map<String, Decimal> roleweight,
Map<Id, Decimal> cmpoints)
List out all of the parameters for the method. Be sure to provide a description of each
Parameters
- opId - Opportunity ID
- noRoleLabelName - Role name used to determine role weight for CampaignMembers with a Contact associated to OpportunityContactRoles with no role label
- largestWeightOnly - If a CampaignMember with a Contact associated to more than one OpportunityContactRole with role weight, only add the largest role weight value.
- allresponses - Map of CampaignMembers by their ID, a collection of CampaignMembers that are subject to being attributed weight to the Opportunity specified in opId
- ocrsByContactId - Map from Contact ID to a List of OpportunityContactRoles associated to the Contact ID and opId
- roleweight - Map of OpportunityContactRole role labels to weight. Used to determine how much weight to add to responses with Contacts with OpportunityContactRoles by their role's label
- cmpoints - Map from CampaignMember to attribution weighting points. The points are used to determine what fraction of the Opportunity's revenue it will be attributed
Comments
0 comments
Please sign in to leave a comment.