Creating a Salesforce Campaign Influence Model That Actually Reflects Your Impact
- November 7, 2025
- Salesforce Ben | The Drip
Campaign Influence in Salesforce is supposed to help marketers prove their value. But the reality is that the standard models (Primary Campaign Source and, for Marketing Cloud Account Engagement customers, First, Last, and Even Distribution) are pretty rigid. Auto Association settings give you the smallest amount of control, and sometimes you just need something stronger.
At my company, we decided to take this to the next level. We built a Weighted-Category Campaign Influence Model that reflects how our marketing touches really work. In this article, I’ll share why we did it, how it benefited us, and what alternatives are out there if you don’t want to build from scratch.
Standard Influence Models (and Their Limits)
There are many detailed articles already written that dive into each of Salesforce’s standard Campaign Influence models. Instead of repeating those, here’s a high-level recap to set the stage for why we needed to build our own.
- Primary Campaign Source: Available to all Salesforce customers. Gives 100% credit to one campaign (set on the Opportunity). Oversimplifies multi-touch journeys.
- First Touch / Last Touch: Also available to Marketing Cloud Account Engagement (MCAE/Pardot) customers. Assigns 100% of the credit to the first campaign a prospect engaged with, or the last one before conversion. These are helpful to answer specific questions, but still don’t give a balanced picture of multi-touch journeys.
- Even Distribution: Available only to MCAE customers. Splits credit equally across all campaigns. Better, but still unrealistic. Are a webinar and a nurture email really equal?
In our environment, MCAE was doing a great job of associating people with Campaigns. What we found, though, is that often the influence of known high-value efforts (in-person events, for example) was being undervalued compared to the high-volume activities like newsletter sends.
Salesforce’s Example Code: Why It Falls Short
Salesforce does provide sample code in its documentation for building custom influence models. The issue? It’s poorly documented, not production-ready, and doesn’t provide a clear structure for extending or maintaining the model. For most admins and devs, this leaves more questions than answers.
Beyond that, there are some deeper problems with the approach:
It Triggers Off Another Model’s Calculations
The reference implementation in the example is an “after insert” trigger on CampaignInfluence, meaning it relies on recalculation events from an existing model, based on Id (never a good practice). That means your model’s timing, scope, and retry behavior are chained to rules you don’t control. If your logic requires recalculation when a Campaign’s Type is changed, your code might not run, and you’ll be left scratching your head. No one wants blind spots in reporting or inconsistent numbers – this is likely the reason you are already looking to build something custom!
Runs as a Special “Salesforce Administrator” User
When the models provided by Salesforce execute, their calculations run as a special user named “Salesforce Administrator”. This user (not to be confused with the Profile) is tough to debug and work with. You’ll see this special user’s Id on the CampaignInfluence records for the out-of-the-box models, but you can’t pick it if you are trying to set debug log levels. I had to use the REST API to create the TraceFlag entry to enable debugging.
Auto-Association Settings
Auto-Association gives limited tuning for out-of-the-box models (can reference certain fields, and an overall time frame window), but these settings aren’t exposed in any way that custom code can reference. I was surprised and frustrated upon this discovery.
No Testing Example
Like many other samples on the internet, there are zero unit tests that show how this sample code can be tested. Chaining our own logic to a bit of a black box on how another model runs its calculations makes unit test setup (or even discovery on how to do this) a nightmare.
When I worked with a previous company, I created a couple of Campaign Influence models, which started from this example code, and the projects each ended up being large 80+ hour efforts. This time around, I wanted to take lessons learned and build something better.
How We Built Our Weighted-Category Model
The key idea was simple: not all campaign types are equal, and that realization drove the design of our new model. Instead of treating a newsletter click the same as an in-person event. To do that, we broke our campaign types into broader categories and gave each one a specific weight. We also didn’t want volume difference to skew our results, so all Campaign touchpoints within a category share the same weighted slice of the pie, so to speak.
Let’s break that down a bit more. The first two steps are going to be specific to the type of model you are looking to build, and the last two steps are going to be relevant for everyone.
Step 1: Define Categories
We began by grouping our Campaigns into broader categories that matched our marketing strategy. For us, this was a bit different than the typical “Type” category, though it certainly could be used. We ended up having Events, Newsletters, Gifting, and Website. This helped ensure the model captured the strategic differences between high-value, low-volume activities and high-volume, low-touch ones.
To help evaluate our approach, I created an Excel spreadsheet we could use to simulate a single Opportunity and the Campaign Members that would be associated with its Contacts. This let us quickly prove the model and find ways to communicate it well.
Step 2: Assign Weights
Once categories were defined, we assigned each one a weight that reflected its typical contribution to the pipeline. I’d like to say this was a data-driven decision, though honestly, the majority of it came from marketer intuition and team consensus. For example, Events carried far more weight than the others… so we gave each category a weight (e.g., Events = 50, Newsletters = 10, Gifting = 5, etc).
Step 3: Build Custom Logic
With categories and weights in place, we wrote Apex code to apply these rules to our Opportunities, and provided configurable options to easily add/change each category as well as the criteria for selection.
Architecturally, our code solution was split into two layers.
- Opportunity Calculations: For a given
Opportunity, it will retrieve theContactsandCampaignMembersthat met our criteria (both timeframe and attributes), then apply the right groupings and calculations. - Observer Layer: Looks for when calculations might be needed. This is largely based on business rules; however, watching
Campaigns,CampaignMembers,Contacts,OpportunityContactRoles, andOpportunitiesare all needed. At the end of the observation, we would need to trigger the calculation for one or many Opportunities.
Bulk processing is pretty important, so we had multiple layers of Platform Events, allowing us both to reuse logic as well as move this complex processing out of the main database transaction.
- Campaign Calculation Needed: An event for each Campaign that might have been updated. Processing this identifies the Contacts that need to be processed.
- Contact Calculation Needed: An event for each Contact. Could be launched by a Campaign changing, or by Contact details themselves (including Campaign Membership). Processing this identifies the Opportunities that need to be processed.
- Opportunity Calculation Needed: An event for each Opportunity. Processing this event is where the main calculations happen.
A Custom Metadata Type was put in place to hold onto our timeframe values and our filtering. This allowed us to build a more robust solution than the Auto-Influence settings provided out of the box, though having the proper SOQL fragments here does mean it is a little less “admin-friendly” (though our admins are pretty awesome!).

As for the categories themselves, this is baked into the “Influence Category” Picklist that is present on the Campaign object. The values are delimited, containing both the category name and the weight. This approach allows us to easily add/remove/adjust our categories without bringing in a developer. We hope to not need to make too many changes here going forward, though if that were to change, we might need to move to a Lookup giving us more flexibility.
Step 4: Validate and Refine
No model is perfect at first. We tested our calculations against our Opportunities, comparing it to the original models and some of the work we did during design. Where discrepancies appeared, we tweaked the weights, created/removed categories, and iterated a few times. This feedback loop gave everyone more confidence in the final numbers.
With lessons learned and the help of our agentic tooling, I was able to create this solution in just a few days. The reduced timeframe, I believe, makes this approach a little more affordable than I think it has been in the past.
Benefits We’ve Seen
With the Even-Touch Distribution model, our newsletter emails were earning far too high influence. The numbers coming from our Salesforce ROI reporting weren’t being used, and manual calculations were happening after the fact. We all know this is time-intensive and prone to mistakes, especially around big events for us like Salesforce Connections and Dreamforce.
Building the solution and categorizing our Campaigns was worth every minute. We’ve been able to compare numbers from previous years to our automated results to build confidence, and the biggest recent event’s reporting went a lot smoother.
- More accurate reporting: Our dashboards now reflect the true impact of big-ticket campaigns.
- Better budget decisions: Marketing leaders feel confident directing spend to the channels that matter.
- Alignment with Sales: Sales teams see attribution that actually matches their experience in the field.
Alternative Options
Not everyone needs to reinvent the wheel. If you don’t want to build a weighted model yourself, there are some alternatives:
Free / DIY Approaches
Sadly, beyond the code sample in Salesforce’s example documentation, there isn’t a lot out there for anyone looking for a head start doing this themselves.
- Explore what the Salesforce community has shared (though currently limited examples exist). Hopefully, this post goes one step further for the community.
- Customize reporting and dashboards to slice influence by Campaign Type, even without custom code. This will be a bit easier if you have a real BI tool – there are several options available.
Paid Attribution Tools
There are several AppExchange solutions that provide attribution models out of the box. Three strong options include:
- Align.ly Attribution: A lightweight, inexpensive, 100% native Salesforce attribution solution that leverages standard Salesforce campaigns without requiring external data storage or complex integrations. The package appears to be relatively minimal in terms of components since it works entirely within existing Salesforce infrastructure, making it easy to implement, with setup possible in as little as one hour.
- Full Circle Insights: A comprehensive, pricey, enterprise-focused solution that includes multi-touch attribution, funnel measurement, customer journey tracking, and account-based marketing (ABM) performance capabilities. This appears to be a more substantial package given its extensive feature set and integration capabilities, likely containing numerous custom objects, workflows, and dashboards.
- MagicRobot Attribution Analytics: Between the other two mentioned in terms of weight and a wide variety of pricing.
Build vs. Buy: How to Decide
Whether to build or buy really depends on your priorities. Building your own model gives you full control and the ability to tailor it to your business, but it also means taking on the work of coding, testing, and maintaining it. Buying from the AppExchange gets you quick results with vendor support, though you’ll trade off some flexibility and commit to ongoing license costs.
A simple way to think about it: if attribution is a competitive advantage and you have the in‑house skills, build it. If you just need solid attribution fast and don’t want to own the upkeep, buy it. Either path can work – the key is matching the approach to your team’s strengths and appetite for ongoing investment.
Best Practices and Recommendations
The most important step is aligning the team and leaders at the very start. With agreement on which campaigns matter most and how much weight they should carry, the model will be easier to trust. Keeping the design simple in the beginning also goes a long way – fewer categories and clear weights are far easier to manage than a sprawling model that tries to capture every nuance.
Expect to revisit your parameters on a regular basis, especially in the beginning, as you begin testing. As your marketing mix changes, so should the logic of your model.
Build in simple but helpful log statements, and a way to run the calculation for a single Opportunity on demand. Having a trace of what happened behind the scenes makes troubleshooting infinitely easier, and being able to isolate one record keeps debugging efficient.
Finally, don’t underestimate the importance of communication. Share your model, explain why it works the way it does, and make sure the people using the numbers understand the story behind them. Adoption and trust rise dramatically when people see both the logic and the transparency behind your approach.
Final Thoughts
Campaign Influence is too important to leave to oversimplified models. By investing in a weighted-category custom model, we’ve been able to reflect our true marketing impact, make smarter budget decisions, and align better with Sales. Whether you decide to build or buy, the key is to choose an approach that tells the real story of your buyer’s journey.
The Author
Adam Erstelle
Adam is a Software Engineer turned into a Salesforce fanatic. Working at various consulting partners, he's been able to help customers of all varieties and sizes. He's created four AppExchange packages, solving small pain points of admins and users alike.
This Pardot article written by:
Salesforce Ben | The Drip
Lucy Mazalon is the Head Editor & Operations Director at Salesforceben.com, Founder of THE DRIP and Salesforce Marketing Champion 2020.
Original Pardot Article: https://www.salesforceben.com/creating-a-salesforce-campaign-influence-model-that-actually-reflects-your-impact/
Find more great Pardot articles at www.salesforceben.com/the-drip/
Pardot Experts Blog
We have categorized all the different Pardot articles by topics.
Pardot Topic Categories
- Account Based Marketing (ABM) (7)
- Business Units (14)
- ChatGPT / AI (3)
- Completion Actions (5)
- Connectors (10)
- Custom Redirects (4)
- Data Cloud (3)
- Demand Generation (8)
- Dynamic Content (7)
- Einstein Features (11)
- Email Delivery (17)
- Email Open Rates (3)
- Pardot A/B Testing (2)
- Email Mailability (16)
- Do Not Email (1)
- Double Opt-in (2)
- Opt Out / Unsubscribe (14)
- Email Preferences Page (6)
- Engagement Studio (16)
- Industries (1)
- Non Profit (1)
- Landing Pages (9)
- Lead Generation (1)
- Lead Management (13)
- Lead Routing (3)
- Lead Scoring (16)
- Leads (3)
- Marketing Analytics – B2BMA (9)
- Marketing Automation (1)
- Marketing Cloud (3)
- Marketing Cloud Account Engagement (4)
- Marketing Cloud Growth (2)
- New Pardot Features (6)
- Opportunities (2)
- Optimization (2)
- Pardot Admin (65)
- Duplicates (1)
- Marketing Ops (1)
- Pardot Alerts (1)
- Pardot API (2)
- Pardot Automations (3)
- Pardot Careers (12)
- Pardot Certifications (4)
- Pardot Consulting (1)
- Pardot Cookies (4)
- Pardot Custom Objects (3)
- Pardot Email Builder (8)
- Pardot Email Templates (10)
- HML (6)
- Pardot Events (17)
- Pardot External Actions (1)
- Pardot External Activities (4)
- Pardot Forms (29)
- Form Handlers (8)
- Pardot Integrations (21)
- Data Cloud (2)
- Slack (1)
- Pardot Lead Grading (5)
- Pardot Lead Source (2)
- Pardot Lightning (1)
- Pardot Migration (1)
- Pardot Nurture / Drip Campaigns (2)
- Pardot Personalization (3)
- Pardot Profiles (1)
- Pardot Releases (18)
- Pardot Sandboxes (2)
- Pardot Segmentation (5)
- Pardot Strategy (7)
- Pardot Sync (2)
- Pardot Sync Errors (1)
- Pardot Tracker Domains (5)
- Pardot Training (3)
- Pardot Vs Other MAPs (4)
- Pardot Website Tracking (2)
- Reporting (22)
- Salesforce and Pardot (31)
- Marketing Data Sharing (2)
- Pardot Users (3)
- Salesforce Automation (5)
- Salesforce Flows (2)
- Salesforce Campaigns (22)
- Salesforce CRM (3)
- Record Types (1)
- Salesforce Engage (3)
- Salesforce Queues (2)
- Security and Privacy (1)
- Tags (3)
- The Authors (547)
- Cheshire Impact (9)
- Greenkey Digital (55)
- Invado Solutions (37)
- Jenna Molby (9)
- Marcloud Consulting (6)
- Nebula Consulting (67)
- Pardot Geeks (44)
- Salesforce Ben | The Drip (249)
- SalesLabX (16)
- Slalom (4)
- Unfettered Marketing (51)
- Uncategorized (1)
- Website Tracking (2)
- Website Search (1)
More Pardot Articles
See all posts
This Pardot article written by:
Salesforce Ben | The Drip
Lucy Mazalon is the Head Editor & Operations Director at Salesforceben.com, Founder of THE DRIP and Salesforce Marketing Champion 2020.
Original Pardot Article: https://www.salesforceben.com/creating-a-salesforce-campaign-influence-model-that-actually-reflects-your-impact/
Find more great Pardot articles at www.salesforceben.com/the-drip/





