Campaign

Represents and tracks a marketing campaign, such as a direct mail promotion, webinar, or trade show.

Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update(), upsert()

Special Access Rules

Customer Portal users can't access this object.

Fields

Field Details
ActualCost
Type
currency
Properties
Create, Filter, Nillable, Sort, Update
Description
Amount of money spent to run the campaign.
AmountAllOpportunities
Type
currency
Properties
Filter, Sort
Description
Amount of money in all opportunities associated with the campaign, including closed/won opportunities. Label is Value Opportunities in Campaign.
AmountWonOpportunities
Type
currency
Properties
Filter, Sort
Description
Amount of money in closed or won opportunities associated with the campaign. Label is Value Won Opportunities in Campaign.
BudgetedCost
Type
currency
Properties
Create, Filter, Nillable, Sort, Update
Description
Amount of money budgeted for the campaign.
CampaignImageId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
ID of the campaign image. Available in API version 42.0 and later.
CampaignMemberRecordTypeId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The record type ID for CampaignMember records associated with the campaign.
CurrencyIsoCode
Type
picklist
Properties
Create, Defaulted on create, Filter, Nillable, Restricted picklist, Update
Description
Available only for organizations with the multicurrency feature enabled. Contains the ISO code for any currency allowed by the organization.
Description
Type
textarea
Properties
Create, Nillable, Update
Description
Description of the campaign. Limit: 32 KB. Only the first 255 characters display in reports.
EndDate
Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Ending date for the campaign. Responses received after this date are still counted.
ExpectedResponse
Type
percent
Properties
Create, Filter, Nillable, Sort, Update
Description
Percentage of responses you expect to receive for the campaign.
ExpectedRevenue
Type
currency
Properties
Create, Filter, Nillable, Sort, Update
Description
Amount of money you expect to generate from the campaign.
HierarchyActualCost
Type
currency
Properties
Filter, Nillable, Sort
Description
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
Type
currency
Properties
Filter, Nillable, Sort
Description
Calculated field for the total amount of money budgeted for the campaigns in a campaign hierarchy. Label isTotal Budgeted Cost in Hierarchy.
HierarchyExpectedRevenue
Type
currency
Properties
Filter, Nillable, Sort
Description
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
Type
int
Properties
Filter
Description
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
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether this campaign is active (true) or not (false). Default value is false. Label is Active.
LastActivityDate
Type
date
Properties
Filter, Group, Nillable, Sort
Description
Value is one of the following, whichever is the most recent:
  • Due date of the most recent event logged against the record.
  • Due date of the most recently closed task associated with the record.
LastReferencedDate
Type
date
Properties
Filter, Nillable, Sort, Update
Description
The timestamp for when the current user last viewed a record related to this record.
LastViewedDate
Type
date
Properties
Filter, Nillable, Sort, Update
Description
The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed.
Name
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
Required. Name of the campaign. Limit: is 80 characters.
NumberOfContacts
Type
int
Properties
Filter, Group, Sort
Description
Number of contacts associated with the campaign. Label is Total Contacts.
NumberOfConvertedLeads
Type
int
Properties
Filter, Group, Sort
Description
Number of leads that were converted to an account and contact due to the marketing efforts in the campaign. Label is Converted Leads.
NumberOfLeads
Type
int
Properties
Filter, Group, Sort
Description
Number of leads associated with the campaign. Label is Leads in Campaign.
NumberOfOpportunities
Type
int
Properties
Filter, Group, Sort
Description
Number of opportunities associated with the campaign. Label is Opportunities in Campaign.
NumberOfResponses
Type
int
Properties
Filter, Group, Sort
Description
Number of contacts and unconverted leads with a Member Status equivalent to “Responded” for the campaign. Label is Responses in Campaign.
NumberOfWonOpportunities
Type
int
Properties
Filter, Group, Sort
Description
Number of closed or won opportunities associated with the campaign. Label is Won Opportunities in Campaign.
NumberSent
Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Number of individuals targeted by the campaign. For example, the number of emails sent. Label is Num Sent.
OwnerId
Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
ID of the user who owns this campaign. Default value is the user logging in to the API to perform the create.
ParentCampaign
Type
reference
Properties
Create, Filter, Nillable, Update
Description
The campaign above the selected campaign in the campaign hierarchy.
ParentId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description

ID of the parent Campaign record, if any.

RecordTypeId
Type
reference
Properties
Create, Filter, Nillable, Update
Description
ID of the record type assigned to this object.
StartDate
Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Starting date for the campaign.
Status
Type
picklist
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Status of the campaign, for example, Planned, In Progress. Limit: 40 characters.
TotalAmountAllOpportunities
Type
currency
Properties
Filter
Description
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
Type
currency
Properties
Filter
Description
Calculated field for amount of all closed/won opportunities associated with the campaign hierarchy. Label is Total Value Won Opportunities in Hierarchy.
TotalNumberofContacts
Type
int
Properties
Filter
Description
Calculated field for number of contacts associated with the campaign hierarchy. Label is Total Contacts in Hierarchy.
TotalNumberofConvertedLeads
Type
int
Properties
Filter
Description
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
Type
int
Properties
Filter
Description
Calculated field for total number of leads associated with the campaign hierarchy. This number also includes converted leads. Label is Total Leads in Hierarchy.
TotalNumberofOpportunities
Type
int
Properties
Filter
Description
Calculated field for the total number of opportunities associated with the campaign hierarchy. Label is Total Opportunities in Hierarchy.
TotalNumberofResponses
Type
int
Properties
Filter
Description
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
Type
int
Properties
Filter
Description
Calculated field for the total number of won opportunities associated with the campaign hierarchy. Label is Total Won Opportunities in Hierarchy.
Type
Type
picklist
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Type of campaign, for example, Direct Mail or Referral Program. Limit: 40 characters.

Usage

Client applications can create, update, delete, and query Attachment records 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 can’t use describeSObjects() or query() with the Campaign object.

Note

Note

The main constituent of a campaign is a CampaignMember. You will commonly need to update campaigns with CampaignMember.

See Also