campaign-planning-and-attribution

Use this skill when designing Campaign Hierarchy structures for program-level ROI tracking, configuring Customizable Campaign Influence (CCI) attribution models, or interpreting multi-touch attribution data from MCAE B2B Marketing Analytics. Trigger keywords: campaign ROI, attribution model, campaign hierarchy, first-touch, last-touch, multi-touch, CCI, campaign influence, revenue attribution, campaign member status. NOT for campaign record creation, campaign member import, email send execution, or MCAE connector provisioning (use mcae-pardot-setup instead).

Best use case

campaign-planning-and-attribution is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use this skill when designing Campaign Hierarchy structures for program-level ROI tracking, configuring Customizable Campaign Influence (CCI) attribution models, or interpreting multi-touch attribution data from MCAE B2B Marketing Analytics. Trigger keywords: campaign ROI, attribution model, campaign hierarchy, first-touch, last-touch, multi-touch, CCI, campaign influence, revenue attribution, campaign member status. NOT for campaign record creation, campaign member import, email send execution, or MCAE connector provisioning (use mcae-pardot-setup instead).

Teams using campaign-planning-and-attribution should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/campaign-planning-and-attribution/SKILL.md --create-dirs "https://raw.githubusercontent.com/PranavNagrecha/AwesomeSalesforceSkills/main/skills/admin/campaign-planning-and-attribution/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/campaign-planning-and-attribution/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How campaign-planning-and-attribution Compares

Feature / Agentcampaign-planning-and-attributionStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use this skill when designing Campaign Hierarchy structures for program-level ROI tracking, configuring Customizable Campaign Influence (CCI) attribution models, or interpreting multi-touch attribution data from MCAE B2B Marketing Analytics. Trigger keywords: campaign ROI, attribution model, campaign hierarchy, first-touch, last-touch, multi-touch, CCI, campaign influence, revenue attribution, campaign member status. NOT for campaign record creation, campaign member import, email send execution, or MCAE connector provisioning (use mcae-pardot-setup instead).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Campaign Planning And Attribution

This skill activates when a practitioner needs to design Campaign Hierarchy structures for program-level ROI aggregation, configure Customizable Campaign Influence (CCI) attribution models in Salesforce, or interpret multi-touch revenue attribution data from MCAE B2B Marketing Analytics. It covers architecture decisions and configuration — not execution of individual campaigns or MCAE connector provisioning.

---

## Before Starting

Gather this context before working on anything in this domain:

- Confirm whether Customizable Campaign Influence is enabled: Setup > Campaign Influence > enable "Customizable Campaign Influence". This is org-level and cannot be reversed without data impact.
- Confirm whether MCAE B2B Marketing Analytics Plus is licensed — this is required for time-decay and position-based (U-shaped) attribution models.
- Determine the maximum hierarchy depth needed. Salesforce supports up to 5 levels. Deeper planning hierarchies require restructuring.
- The most common wrong assumption: practitioners believe "Campaign Influence" and "Customizable Campaign Influence" are the same feature. They are not. Standard Campaign Influence uses auto-association rules; CCI requires explicit model configuration and cannot coexist cleanly with the standard version.
- Campaign Hierarchy revenue rollups (Expected Revenue, Actual Cost, Num Leads, etc.) are updated on a schedule — they are NOT real-time. Do not treat parent campaign totals as live during active campaigns.

---

## Core Concepts

### Campaign Hierarchy and Revenue Rollup

Campaign Hierarchy allows up to 5 levels of parent-child Campaign records. A "Program" sits at or near the top; individual "Tactics" (webinars, emails, ads) sit at lower levels. When a child Campaign has Actual Cost, Expected Revenue, or member count populated, Salesforce automatically rolls these up to every ancestor via scheduled batch processing. Rollup fields on the parent Campaign include:

- `NumberOfLeads` / `NumberOfConvertedLeads`
- `NumberOfContacts` / `NumberOfResponses`
- `AmountAllOpportunities` / `AmountWonOpportunities`
- `ActualCost` (summed from children)

ROI is surfaced as a formula: `(AmountWonOpportunities - ActualCost) / ActualCost`. Because rollups are batch-computed, dashboards that read parent Campaign fields can lag behind actual child campaign activity.

### Customizable Campaign Influence (CCI)

CCI allows multiple campaigns to receive attribution credit on a single Opportunity via CampaignInfluence junction records. It must be explicitly enabled in Setup. Once enabled, you configure one or more Campaign Influence Models. Built-in model types:

| Model | Attribution rule |
|---|---|
| First Touch | 100% credit to the first campaign that touched the contact associated with the opportunity. |
| Last Touch | 100% credit to the most recent campaign before opportunity close. |
| Even Distribution | Credit split equally across all influencing campaigns. |
| Custom | You define a scoring algorithm via Apex or configuration rules. |

Each CampaignInfluence record links one Campaign, one Opportunity, and optionally one Contact. The `Influence` field (percentage) sums to 100% across all records for a given model on a given Opportunity.

CCI requires: (1) Campaign Influence enabled, (2) at least one model configured, and (3) contact roles on the Opportunity to link back to campaign members. Without Contact Roles, CCI has nothing to associate.

### Campaign Member Status and Funnel Tracking

Each Campaign has a Member Status picklist that drives funnel stage tracking. Statuses are Campaign-type-specific and must be configured per Campaign Type in Setup. The `Responded` flag on a status value determines whether that member counts in the "Responded" rollup on the Campaign. Well-structured statuses map directly to marketing funnel stages: Sent → Opened → Clicked → Registered → Attended → Responded. MCAE writes Campaign Member records with these statuses when prospects engage with assets — if statuses are missing, MCAE silently drops engagement data.

### MCAE Multi-Touch Attribution App (B2B Marketing Analytics Plus)

For orgs with MCAE and B2B Marketing Analytics Plus, the Multi-Touch Attribution App extends CCI reporting with additional model types not available natively:

- **Time-Decay** — more credit to campaigns closer to the opportunity close date.
- **Position-Based (U-Shaped)** — first and last touches each receive 40%; middle touches split the remaining 20%.

These models surface in CRM Analytics dashboards and do not modify the underlying CampaignInfluence records — they are reporting-layer constructs only. Underlying data still flows through the CCI framework.

---

## Common Patterns

### Pattern: Program/Tactic Hierarchy with Rolled-Up ROI Dashboard

**When to use:** A marketing team runs multiple channels (email, webinar, paid) under a single program and needs a unified ROI view at the program level for executive reporting.

**How it works:**
1. Create a parent Campaign of Type "Program" at Level 1. Set Budgeted Cost and Expected Revenue here.
2. Create child Campaigns (Type = Email, Event, etc.) at Level 2 or below. Link them via the `ParentId` field.
3. Populate `ActualCost` on each child campaign as spend is confirmed.
4. Build a dashboard using parent Campaign rollup fields (`AmountWonOpportunities`, `ActualCost`) to display ROI.
5. Refresh cadence: rollups update within hours; avoid querying rollup fields in real-time triggers.

**Why not the alternative:** Without hierarchy, teams must manually aggregate per-channel costs into a spreadsheet. This breaks when campaigns are added mid-program and creates reconciliation debt.

### Pattern: CCI First-Touch + Last-Touch Dual-Model Configuration

**When to use:** Revenue operations needs to attribute pipeline credit to both the awareness channel (first touch) and the conversion channel (last touch) simultaneously — a common demand-gen requirement.

**How it works:**
1. Enable Customizable Campaign Influence in Setup.
2. Create Model 1: First Touch. Set the primary model flag if this is the default for reports.
3. Create Model 2: Last Touch.
4. Ensure all Opportunities have Contact Roles populated (either via automation or manual entry).
5. Run the influence calculation. CampaignInfluence records are created per model.
6. Build separate report types for each model using the CampaignInfluence object.

**Why not the alternative:** Standard Campaign Influence (non-customizable) only supports one model at a time and cannot produce side-by-side first-touch vs. last-touch comparison reports in native Salesforce.

---

## Decision Guidance

| Situation | Recommended Approach | Reason |
|---|---|---|
| Need program-level ROI across multiple campaign tactics | Campaign Hierarchy (up to 5 levels) with rollup field dashboard | Native rollup fields aggregate cost and revenue automatically |
| Need multiple campaigns to share credit on one opportunity | Enable CCI; configure first-touch, last-touch, or even model | Only CCI supports multiple attribution records per opportunity per model |
| Need time-decay or U-shaped attribution models | MCAE B2B Marketing Analytics Plus — Multi-Touch Attribution App | These model types are not available in native CCI; require MCAE license |
| CCI and standard Campaign Influence are both partially configured | Disable standard Campaign Influence before configuring CCI | The two frameworks conflict; CCI supersedes standard influence |
| Opportunity pipeline is not appearing in Campaign Hierarchy rollups | Confirm Contact Roles exist on Opportunities | CCI and hierarchy revenue rollups require Contact Role association |
| Need real-time campaign spend reporting | Build reports on child Campaign `ActualCost` directly, not parent rollup | Parent rollup fields update on a batch schedule, not in real time |

---

## Recommended Workflow

Step-by-step instructions for an AI agent or practitioner working on this task:

1. **Confirm org capabilities** — check whether CCI is enabled (Setup > Campaign Influence) and whether MCAE B2B Marketing Analytics Plus is licensed. Record which attribution models are in scope.
2. **Design Campaign Hierarchy** — map program/sub-program/tactic levels to Salesforce Campaign records (max 5 levels). Assign Campaign Types and set Budgeted Cost and Expected Revenue on parent records.
3. **Configure Campaign Member Statuses** — per Campaign Type, define statuses that map to funnel stages. Mark the appropriate statuses as `Responded = true`. Confirm MCAE required statuses (Sent, Opened, Clicked, Responded) are present if MCAE is in use.
4. **Configure CCI models** — in Setup, create the required attribution models (first-touch, last-touch, even, or custom). Designate a primary model. Confirm Contact Role population rules exist on Opportunities.
5. **Validate CampaignInfluence records** — after opportunity creation, query CampaignInfluence to confirm records are created per model. Check that `Revenue` and `Influence` fields are populated.
6. **Build reporting layer** — create Campaign Hierarchy reports using parent rollup fields for ROI. Create CampaignInfluence reports per model for attribution analysis. If MCAE Multi-Touch App is in scope, configure the CRM Analytics dashboard datasets.
7. **Document model choices and refresh cadence** — record which attribution models are active, why they were chosen, and the expected lag on hierarchy rollup fields. Share with the revenue operations team.

---

## Review Checklist

Run through these before marking work in this area complete:

- [ ] Campaign Hierarchy does not exceed 5 levels
- [ ] Budgeted Cost and Expected Revenue are set on parent Campaign records, not only on child records
- [ ] Customizable Campaign Influence is enabled in Setup before any CCI model is referenced
- [ ] At least one CCI model is fully configured if CCI is in scope
- [ ] Contact Roles are populated on Opportunities for CCI to produce influence records
- [ ] Campaign Member Status picklist values include `Responded = true` on at least one status per Campaign Type
- [ ] Rollup field refresh lag is documented and stakeholders understand it is not real-time

---

## Salesforce-Specific Gotchas

Non-obvious platform behaviors that cause real production problems:

1. **Hierarchy rollup fields are batch-computed, not real-time** — Fields like `AmountWonOpportunities` on a parent Campaign do not update the moment a child campaign's linked opportunity closes. They refresh via a scheduled Salesforce background job. During active campaigns this can cause dashboards to show stale totals for hours. Never build automation that depends on a parent Campaign rollup field reacting immediately to a child record change.

2. **CCI and standard Campaign Influence conflict — only one can be the authority** — If standard Campaign Influence (non-customizable) is active alongside CCI, double-counting and conflicting attribution records can appear. Disable standard Campaign Influence auto-association rules before relying on CCI models for reporting. The Setup UI allows both to coexist, but the resulting data is unreliable.

3. **CampaignInfluence records require Contact Roles on Opportunities** — CCI links campaigns to opportunities via contact membership. If an opportunity has no Contact Roles, no CampaignInfluence records are created — the attribution is silently skipped. This is the most common cause of "attribution model configured but no data appearing" issues.

---

## Output Artifacts

| Artifact | Description |
|---|---|
| Campaign Hierarchy design doc | Level mapping, Campaign Types, rollup field strategy |
| CCI model configuration plan | Model types, primary model designation, Contact Role requirements |
| Campaign Member Status table | Per-Campaign-Type status values with funnel stage and Responded flag mapping |
| Attribution reporting design | Report types and dashboard components for each active model |

---

## Related Skills

- `mcae-pardot-setup` — use for MCAE connector provisioning, BU configuration, and campaign connector setup that feeds attribution data into Salesforce

Related Skills

go-live-cutover-planning

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when planning, sequencing, or executing the final cutover to production for a Salesforce implementation or major release. Covers cutover runbooks, code freeze enforcement, mock deployments, go/no-go decision gates, validation deploy timing, quick deploy windows, hypercare scheduling, and rollback trigger definitions. NOT for deployment mechanics (use devops/post-deployment-validation). NOT for release calendar or versioning strategy (use devops/release-management). NOT for writing smoke tests (use devops/post-deployment-validation).

data-migration-planning

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when planning, reviewing, or troubleshooting a Salesforce data migration — covering tool selection (Data Loader, Bulk API 2.0, MuleSoft, Informatica, Jitterbit), migration sequencing for parent-child objects, external ID strategy for upsert idempotency, validation rule bypass, trigger and flow suppression, rollback planning, and post-migration reconciliation. NOT for Data Loader step-by-step mechanics (use data-import-and-management). NOT for schema or data model design (use data-model-design-patterns). NOT for ongoing ETL pipeline architecture.

limits-and-scalability-planning

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when planning a new org build for scale, auditing an existing org for governor limit exposure, or investigating a limit-related incident. Trigger phrases: 'org is hitting governor limits', 'how many custom objects can we have', 'will our data volume cause performance issues', 'batch job keeps failing with limit errors', 'planning for 10 million records', 'platform event throughput limits', 'SOQL limit exceeded in production'. NOT for code-level optimization (use apex-cpu-and-heap-optimization), NOT for individual SOQL query tuning (use apex/soql-optimization), NOT for Batch Apex authoring mechanics (use apex/batch-apex).

fsl-capacity-planning

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill to configure and manage Field Service Lightning workforce capacity — covering ServiceResourceCapacity for individual resource caps, WorkCapacityLimit for territory-level demand throttling, and reporting strategies for capacity vs. utilization analysis. NOT for Omni-Channel capacity, NOT for FSL scheduling policy rule configuration, and NOT for FSL resource skill or preference setup (see fsl-resource-management).

financial-planning-process

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when configuring FSC financial planning objects, designing periodic review cycles, modeling risk assessment workflows, or tracking goal progress in Financial Services Cloud. Trigger keywords: FinancialGoal, FinancialPlan, goal tracking, risk tolerance, review cycle, financial planning workflow, Discovery Framework, Revenue Insights. NOT for financial advice, investment recommendations, or high-level process mapping (see wealth-management-requirements for that).

xss-and-injection-prevention

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when writing or reviewing Visualforce pages, Apex controllers, or LWC components that output user-supplied data, build dynamic queries, or construct HTTP responses. Triggers: 'XSS in Visualforce', 'SOQL injection vulnerability', 'how to encode output in Apex', 'JSENCODE Visualforce', 'open redirect prevention'. NOT for Apex CRUD/FLS enforcement (use soql-security or apex-crud-and-fls), NOT for Shield encryption (use shield-encryption-key-management), NOT for AppExchange security review process (use secure-coding-review-checklist).

visualforce-security-and-modernization

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when hardening or modernizing legacy Visualforce pages — covers the platform CSRF token model and when disabling it is a security regression, view state encryption guarantees and the 170 KB ceiling, FLS/CRUD enforcement gaps on `<apex:outputField>` and on getters that return sObjects, `<apex:includeScript>` interaction with the org Content Security Policy, hosting LWC inside a VF page via `lightning:container` / `lightning-out`, and the retire-vs-harden-vs-leave-alone decision for an inventory of legacy pages. Triggers: 'should I rewrite this Visualforce page in LWC', 'CSRF protection disabled on Visualforce page is that safe', 'community user sees a field they should not on a Visualforce page', 'view state encryption is that enough for sensitive data', 'how do I host an LWC inside a Visualforce page', 'apex:dynamicComponent and apex:actionFunction safe to keep'. NOT for greenfield Visualforce architecture (use apex/visualforce-fundamentals — controller types, view state pattern selection, PDF rendering); NOT for Visualforce email template authoring (use apex/visualforce-email-templates if/when that skill is authored); NOT for general Apex security review across triggers and async (use apex/soql-security and security/secure-coding-review-checklist).

transaction-security-policies

8
from PranavNagrecha/AwesomeSalesforceSkills

Transaction Security policy creation and configuration: condition builder, enhanced policies, enforcement actions (block, MFA, notification, end session), real-time monitoring mode, and policy troubleshooting. NOT for Event Monitoring log analysis or Shield Event Monitoring setup (use event-monitoring). NOT for Apex testing or debug-log analysis.

sso-saml-troubleshooting

8
from PranavNagrecha/AwesomeSalesforceSkills

Diagnosing broken SAML SSO into Salesforce — IdP-initiated vs SP-initiated flows, signing-certificate validity / expiry, NameID format mismatches, RelayState handling, audience / entityId / issuer mismatches, clock skew, the SAML Assertion Validator in Setup, the Login History debug log, and the My Domain prerequisite for SSO. Covers the standard diagnostic loop: read the SAML response, identify which check failed, fix at the IdP or SP. NOT for OAuth / OpenID Connect SSO (see security/oauth-openid-troubleshooting), NOT for setting up SSO from scratch (see security/sso-saml-setup).

shield-kms-byok-setup

8
from PranavNagrecha/AwesomeSalesforceSkills

Configure Shield Platform Encryption with customer-supplied (BYOK) or customer-held (Cache-Only Key Service) tenant secrets, rotate them, and recover. NOT for Classic Encryption or field masking.

shield-event-log-retention-strategy

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when designing Salesforce Shield Event Monitoring retention, SIEM routing, and storage-tier strategy — which event types to keep, for how long, where, and how to answer audit queries across hot/warm/cold tiers. Triggers: 'shield event log retention', 'route event monitoring to splunk', 'how long to keep login history', 'siem salesforce integration', 'event monitoring storage tier'. NOT for enabling Shield (see salesforce-shield-deployment).

session-management-and-timeout

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when configuring session timeout values, concurrent session limits, session IP locking, or logout behavior in Salesforce. Covers org-wide session settings, profile-level overrides, Connected App session policies, and Metadata API SecuritySettings deployment. NOT for OAuth token refresh flows, login IP ranges, or MFA/identity-provider configuration.