Newer Version Available

This content describes an older version of this product. View Latest

CampaignInfluenceModel

Represents a campaign influence model used by Customizable Campaign Influence.

You can’t configure Customizable Campaign Influence via the Metadata API, but you can add a campaign influence model.

This information applies only to Customizable Campaign Influence and not to Campaign Influence 1.0.

Note

File Suffix and Directory Location

CampaignInfluenceModel values are stored in the campaignInfluenceModels directory of the corresponding package directory. The file name matches the model name, and the extension is .campaignInfluenceModel.

Version

CampaignInfluenceModel components are available in API version 38.0 and later.

Fields

Field Name Field Type Description
isDefaultModel boolean Indicates if the model is the primary model or not. Only campaign influence records associated with the primary model appear on Campaigns and Opportunities.
isModelLocked boolean Indicates if the model is locked or not. Campaign Influence records for locked models can be manipulated only via the API.
modelDescription string A description of the influence model.
name string A unique name for the model.

Declarative Metadata Sample Definition

The following is an example of a CampaignInfluenceModel component that represents the default Salesforce campaign influence attribution model. The default isDefaultModel value of true can be changed if another model is created and set as the primary model. The isModelLocked value of true means that Campaign Influence records for this model can be seen in the UI, but not created, updated, or deleted.

1<?xml version="1.0" encoding="UTF-8"?>
2<CampaignInfluenceModel xmlns="http://soap.sforce.com/2006/04/metadata">
3    <isDefaultModel>true</isDefaultModel>
4    <isModelLocked>true</isModelLocked>
5    <modelDescription>Primary Campaign gets 100% of the revenue share</modelDescription>
6    <name>Salesforce Model</name>
7</CampaignInfluenceModel>

The following is an example of a CampaignInfluenceModel component that creates an influence model called Last Touch, which will not be the primary model.

1<?xml version="1.0" encoding="UTF-8"?>
2<CampaignInfluenceModel xmlns="http://soap.sforce.com/2006/04/metadata">
3    <isDefaultModel>false</isDefaultModel>
4    <isModelLocked>true</isModelLocked>
5    <modelDescription>This model gives 100% influence attribution to the last campaign that touched the contact.</modelDescription>
6    <name>Last Touch</name>
7</CampaignInfluenceModel>