Campaign

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

Supported Calls

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

Special Access Rules

Customer Portal users cannot access this object.

Fields

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

Filter

Nillable

Update

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

Filter

Nillable

Update

Amount of money budgeted for the campaign.
Description textarea Create

Nillable

Update

Description of the campaign. Limit: 32 KB. Only the first 255 characters display in reports.
EndDate date Create

Filter

Nillable

Update

Ending date for the campaign. Responses received after this date are still counted.
ExpectedResponse percent Create

Filter

Nillable

Update

Percentage of responses you expect to receive for the campaign.
ExpectedRevenue currency Create

Filter

Nillable

Update

Amount of money you expect to generate from the campaign.
HierarchyActualCost currency

Filter

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

Filter

Calculated field for the total amount of money budgeted for the campaigns in a campaign hierarchy. Label isTotal Budgeted Cost in Hierarchy.
HierarchyExpectedRevenue currency

Filter

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

Filter

Nillable

Update

Indicates whether this campaign is active (true) or not (false). Default value is false. Label is Active.
IsDeleted boolean Defaulted on create

Filter

Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.
LastActivityDate date Filter

Nillable

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.
Name string Create

Filter

idLookup

Update

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

Filter

Nillable

Update

Number of individuals targeted by the campaign. For example, the number of emails sent. Label is Num Sent.
OwnerId reference Create

Defaulted on create

Filter

Update

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

Filter

Nillable

Update

The campaign above the selected campaign in the campaign hierarchy.
StartDate date Create

Filter

Nillable

Update

Starting date for the campaign.
Status picklist Create

Filter

Nillable

Update

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

Filter

Nillable

Update

Type of campaign, for example, Direct Mail or Referral Program. Limit: 40 characters.

Usage

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.

Note
The main constituent of a campaign is a CampaignMember. You will commonly need to update campaigns with CampaignMember.
See Also:
Standard and Custom Object Basics
© Copyright 2000-2008 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.