How are Opportunities attributed to Campaigns in Salesforce?

A dive into how opportunities are attributed to Salesforce campaigns using only default functionality.
Download Guide

During my deep dive into Salesforce Campaigns, I took a detour and decided to dive into how opportunities are attributed to Salesforce campaigns using only default functionality. In my experience, I’ve only used custom configurations and 3rd party tools to enable opportunity influence - this blog focuses on the default capabilities that come out-of-the box with Salesforce.

If you’re joining me in the middle of my Salesforce Campaigns journey, check out how we got here in these blogs:

  1. Building Product Requirements for Salesforce Campaign Architecture
  2. Define a Salesforce Campaign Hierarchy
  3. Define a Salesforce Campaign Data Model

How Default Campaign Attribution Works

What are the opportunity fields on campaigns?

There are a handful of read-only fields on the Campaign object that reference opportunity-level data - these sparked my curiosity.

  1. Opportunities in Campaign: This field counts the number of opportunities that are associated with a campaign.
  2. Won Opportunities in Campaign: This field counts the number of closed-won opportunities that are associated with a campaign.
  3. Value Opportunities in Campaign: This field counts the total sum of opportunity amounts that are associated with a campaign.
  4. Value Won Opportunities in Campaign: This field counts the total sum of closed-won opportunity amounts that are associated with a campaign.

How are opportunities associated with campaigns?

Now that we know what these fields are meant to calculate, we need to get them to populate with data. Initially, I thought there would be some fancy calculations that considered campaign members and their association with accounts or contact roles. The default association is much simpler.

On the opportunity object, there’s a standard field called “Primary Campaign Source”. You can either go to your opportunity to set the Primary Campaign Source to a specific campaign, or you can create an opportunity directly from the related opportunities list from your campaign.

Screenshot 2025-04-22 at 4.27.32 PM.png

How are opportunity contacts associated with campaigns?

If you have Opportunity Contact Roles, those users will help you connect opportunities to campaigns for influence. If the contact responds to the campaign prior to the opportunity close date, that campaign will have opportunity influence.

Is it possible for me to define a multi-campaign attribution model?

Yes! There is a feature called Customizable Campaign Influence that can be enabled in your settings. Campaign Influence allows you to connect multiple campaigns to your opportunity, allowing you to see the influence of multiple campaigns rather than attributing 100% to a single campaign. You’ll also have the ability to define auto-association rules and multiple models.

To take advantage of custom models, you’ll need to build custom code via the API or Apex triggers.

Summary

Figuring out the default opportunity influence behavior of campaigns was a quick process. The association between campaigns and opportunities was very straightforward, but limited. A quick recap of my learnings are below.

What can it do?

  1. Each opportunity can only be attributed to 1 campaign via the “Primary Campaign Source” field.
  2. The “Primary Campaign Source” field can be populated on the opportunity page, by creating an opportunity from the related opportunities list on the campaign page, or by uploading associations via a tool like Data Loader.
  3. The default opportunity fields on the campaign object will calculate the value of associated opportunities using the Amount field on the opportunity.
  4. If you have enabled campaign influence, you can associate your Opportunity Contact Roles with a campaign to connect campaigns to opportunities.

What can’t it do?

  1. You can’t associate more than 1 campaign with each opportunity using the “Primary Campaign Source” field
  2. There aren’t multiple attribution models - 100% of the opportunity will be attributed to the “Primary Campaign Source” unless you implement custom attribution.
  3. If you need multi-touch attribution or advanced logic, you’ll need to build custom code.

Download Now

By subscribing, you agree to receive marketing communications.
Thank you! Use the link below to access your file.
Access File
Oops! Something went wrong while submitting the form.