Skip to main content
Full Circle Insights

FirstLastTouchAttribution

Modifies cmpoints to add weight specified by firstTouchWeight and lastTouchWeight to CampaignMembers in allresponses that are equal to firsttouch or lasttouch respectively. 

void firstLastTouchAttribution(
    Id opId,
    CampaignMember firsttouch,
    CampaignMember lasttouch,
    Map<Id, CampaignMember> allresponses,
    Decimal firstTouchWeight,
    Decimal lastTouchWeight,
    Map<Id, Decimal> cmpoints)

Parameters

  • opId - Opportunity ID
  • firsttouch - CampaignMember determined to be the first touch response on the Opportunity
  • lasttouch - CampaignMember determined to be the last touch response on the Opportunity
  • allresponses - Map of CampaignMembers by their ID, a collection of CampaignMembers that are subject to being attributed weight to the Opportunity specified in opId
  • firstTouchWeight - Weight added to the CampaignMember equal to firsttouch
  • lastTouchWeight - Weight added to the CampaignMember equal to lasttouch
  • 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
  • Was this article helpful?