Represents and tracks a marketing campaign, such as a direct mail promotion, webinar, or trade show.
create(), update(), delete(), query(), search(), retrieve(), undelete(), merge(), getDeleted(), getUpdated(), describeSObjects(), upsert()
The Campaign statistics fields are read-only, as in the Salesforce user interface. You cannot update the statistics via the API.
| Field | Field Type | Field Properties | Description |
|---|---|---|---|
| ActualCost | currency | Create | Amount of money spent to run the campaign. |
| AmountAllOpportunities | currency | Filter | Amount of money in all opportunities associated with the campaign, including closed/won opportunities. Label is Total Value Opportunities. |
| AmountWonOpportunities | currency | Filter | Amount of money in closed or won opportunities associated with the campaign. Label is Total Value Won Opportunities. |
| BudgetedCost | currency | Create | Amount of money budgeted for the campaign. |
| Description | textarea | Create | Description of the campaign. Limit: 32 KB. Only the first 255 characters display in reports. |
| EndDate | date | Create | Ending date for the campaign. Responses received after this date are still counted. |
| ExpectedResponse | percent | Create | Percentage of responses you expect to receive for the campaign. |
| ExpectedRevenue | currency | Create | Amount of money you expect to generate from the campaign. |
| HierarchyActualCost | currency | Calculated field for the total amount of money spent to run the campaigns in a campaign hierarchy. Label is Total Actual Cost in Hierarchy. | |
| HierarchyBudgetedCost | currency | Calculated field for the total amount of money budgeted for the campaigns in a campaign hierarchy. Label isTotal Budgeted Cost in Hierarchy. | |
| HierarchyExpectedRevenue | currency | Calculated field for the total amount of money you expect to generate from the campaigns in a campaign hierarchy. Label is Total Expected Revenue in Hierarchy. | |
| HierarchyNumberSent | int | Filter | Calculated field for the total number of individuals targeted by the campaigns in a campaign hierarchy. For example, the number of email messagess sent. Label is Total Num Sent in Hierarchy. |
| IsActive | boolean | Create | Indicates whether this campaign is active (true) or not (false). Default value is false. Label is Active. |
| IsDeleted | boolean | Defaulted on create | Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted. |
| LastActivityDate | date | Filter | Value is one of the following, whichever is the most recent:
|
| Name | string | Create | Required. Name of the campaign. Limit: is 80 characters. |
| NumberOfContacts | int | Filter | Number of contacts associated with the campaign. Label is Total Contacts. |
| NumberOfConvertedLeads | int | Filter | Number of leads that were converted to an account and contact due to the marketing efforts in the campaign. Label is Converted Leads. |
| NumberOfLeads | int | Filter | Number of leads associated with the campaign. Label is Total Leads. |
| NumberOfOpportunities | int | Filter | Number of opportunities associated with the campaign. Label is Num Total Opportunities. |
| NumberOfResponses | int | Filter | Number of contacts and unconverted leads with a Member Status equivalent to “Responded” for the campaign. Label is Total Responses. |
| NumberOfWonOpportunities | int | Filter | Number of closed or won opportunities associated with the campaign. Label is Num Won Opportunities. |
| NumberSent | double | Create | Number of individuals targeted by the campaign. For example, the number of emails sent. Label is Num Sent. |
| OwnerId | reference | Create | ID of the user who owns this campaign. Default value is the user logging in to the API to perform the create. |
| ParentCampaign | reference | Create | The campaign above the selected campaign in the campaign hierarchy. |
| StartDate | date | Create | Starting date for the campaign. |
| Status | picklist | Create | Status of the campaign, for example, Planned, In Progress. Limit: 40 characters. |
| TotalAmountAllOpportunities | currency | Filter | Calculated field for total amount of all opportunities associated with the campaign hierarchy, including closed/won opportunities. Label is Total Value Opportunities in Hierarchy. |
| TotalAmountAllWonOpportunities | currency | Filter | Calculated field for amount of all closed/won opportunities associated with the campaign hierarchy. Label is Total Value Won Opportunities in Hierarchy. |
| TotalNumberofContacts | int | Filter | Calculated field for number of contacts associated with the campaign hierarchy. Label is Total Contacts in Hierarchy. |
| TotalNumberofConvertedLeads | int | Filter | Calculated field for the total number of leads associated with the campaign hierarchy that were converted into accounts, contacts, and opportunities. Label is Total Converted Leads in Hierarchy. |
| TotalNumberofLeads | int | Filter | Calculated field for total number of leads associated with the campaign hierarchy. This number also includes converted leads. Label is Total Leads in Hierarchy. |
| TotalNumberofOpportunties | int | Filter | Calculated field for the total number of opportunities associated with the campaign hierarchy. Label is Total Opportunities in Hierarchy. |
| TotalNumberofResponses | int | Filter | Calculated field for number of contacts and unconverted leads that have a Member Status equivalent to "Responded" for the campaign hierarchy. Label is Total Responses in Hierarchy. |
| TotalNumberofWonOpportunities | int | Filter | Calculated field for the total number of won opportunities associated with the campaign hierarchy. Label is Total Won Opportunities in Hierarchy |
| Type | picklist | Create | Type of campaign, for example, Direct Mail or Referral Program. Limit: 40 characters. |
Client applications can create(), update(), delete(), and query()Attachments associated with a campaign via the API.
The Campaign object is defined only for those organizations that have the marketing feature enabled and valid marketing licenses. In addition, it is accessible only to those users that are enabled as marketing users. If the organization does not have the marketing feature or valid marketing licenses, this object does not appear in the describeGlobal() call, and you cannot use describeSObjects() or query() with the Campaign object.