Salesforce Campaign Influence: First Touch Campaign Attribution - Part 1A + 1B Series

In these videos, you will learn how to setup the flows needed to create Campaign Influence records for a First Touch Campaign Attribution custom model. The flows we create in these videos will be used for our other custom models. If you haven't watched Blu Tiger Academy's two other intro videos on Campaign Influence, we highly recommend you watch those first, links are below.

First Touch models give full revenue credit to the Campaign that was the first campaign a Contact interacted with. While this may not be the correct campaign in all scenarios, it is one way to look at campaign attribution. It is important to look at more than one type of model when attributing campaign influence.

Blu Tiger Academy Videos:

Blu Ninjas Articles:

Salesforce Resources:

Our Business Requirements

The flows we create will support the following criteria and will give 100% revenue share to the first campaign a contact interacts with. Here are the specific criteria we are using:

  • Contacts must be related to the Opportunity via Opportunity Contact Role records
  • Campaign Member must have Responded = True - this will allow us to use one field across different statuses. If you do not understand what this means, watch our video called it will explain everything:
    Mastering Salesforce Campaigns: Best Practices for Setup, Record Types, Statuses & Hierarchy
  • Campaign Member record must have a created date greater than 180 days before the Opportunity created date.
  • Opportunity must be open.

You can modify any of this criteria to fit your own business rules. If you have any specific rules you do not know how to solve for, let us know in the comments below.

Flows Needed to Create Campaign Influence Records

  • Opportunity Contact Role | Created - Campaign Influence Automation (Record-Triggered Flow) - this flow will create Campaign Influence records when an Opportunity Contact Role record is created.
  • Opportunity Contact Role | Deleted Master Flow (Record-Triggered Flow) - this flow will delete Campaign Influence records when an Opportunity Contact Role record is deleted.
  • Campaign Member | Campaign Influence Record Automation (Record-Triggered Flow) - this flow will create Campaign Influence records when a Campaign Member record is created or updated.
  • Campaign Influence | Record Created for Custom Model (Record-Triggered Flow) - this flow will route Campaign Influence records from custom models to the subflow below to calculate the Influence %.
  • Campaign Influence | Influence % Automation (Autolaunched Flow) - this is a subflow used to calculate the Influence % for Campaign Influence records. There are two record-triggered flows that send records to this flow.

Please note: You may want to create a flow the fires when a Campaign Member record is deleted. This flow would work like the Opportunity Contact Role flow we created, where it would delete the Campaign Influence records for the Contact related to the Campaign Member record that was deleted. We opted not to create this flow because we see companies deleting Campaign Members for older campaigns in order to stay under Salesforce's data storage limits.

Tell me in the comments below if you want us to make a package that contains these flows so you can install them and go!

Formula Fields Needed to Support Flows

We created a number of formula fields to support the queries in our flows. This is an overview of the fields we created, how we named them and what the formulas are.

  • Flow #1 Opportunity Contact Role | Created Master Flow
    • Create a formula field on the Opportunity Contact Role that shows the date 180 days prior to the Opportunity Created Date. This is used in the flow to query the Campaign Member records.
      • Name = 180 Days Prior to Opp Created Date
      • Formula = DATEVALUE(Opportunity.CreatedDate) - 180
      • Description = This field is used in a flow to query the campaign member records with a created date greater than 180 days before the opp created date.
      • You can adjust this formula as needed based on your business requirements.
  • Flow #2 Opportunity Contact Role | Deleted Master Flow
    • Create a formula field on the Campaign Influence object that shows the Model Type of the Campaign Influence Model:
      • Name = Campaign Influence Model Type
      • Formula = TEXT( Model.ModelType )
      • Description = This field is used in a flow to filter for the campaign influence records by their model type.
  • Flow #3 Campaign Member | Campaign Influence Record Automation
    • Create a formula field on the Campaign Influence object and on the Opportunity Contact Role object that shows whether the Opportunity is closed:
      • Name = Opportunity is Closed
      • Formula = Opportunity.IsClosed
      • Description = This field is used in a flow to filter for the campaign influence records.
    • Create a formula field on the Opportunity Contact Role object that shows the Created Date of the Opportunity:
      • Name = Opportunity Created Date
      • Formula = Opportunity.CreatedDate
      • Description = This field is used in a flow to filter for Opportunity Contact Roles records by Created Date of the Opportunity.
    • Create a formula field on the Campaign Influence object that shows the Model Name of the Campaign Influence Model:
      • Name = Model Name
      • Formula = Model.MasterLabel
      • Description = This field is used in a flow to filter for the campaign influence records by their model name.

For any questions, comments, concerns – let us know in the comment section below!
We would love to hear from you!

Share This Story, Choose Your Platform!

About the Author

Cheryl Fernandes

Cheryl is a certified Salesforce Application Architect and is the Founder and Lead Salesforce Consultant at Blu Ninjas. She has been working with Salesforce for 12 years and has helped companies in financial services, insurance and beauty industries implement solutions on the platform. Flow is her favorite Salesforce declarative tool, it is a game changer for anyone who does not know how to code.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top