requestCampaign

This function runs an existing Marketo lead in a Marketo Smart Campaign. The Smart Campaign must have a “Campaign is Requested” trigger with Web Service API source (see below).

webserviceapi

There are two parameter sets that can be used. The first case is using campaignName + programName + programTokenList. The programTokenList can be empty in this case. The second case is using campaignId alone. Any other combinations will throw a bad parameter exception.

Note: Limit of 100 leadKey values per call. Additional keys will be ignored.

Field Name

Required/Optional

Description

leadList->leadKey->keyType Required keyType allows you to specify the field you wish to query the lead by. Possible values include:

IDNUM: The Marketo ID (e.g. 64)

EMAIL: The email address associated with the lead. (e.g. rufus@marketo.com)

SFDCLEADID: The lead ID from SalesForce

LEADOWNEREMAIL: The Lead Owner Email

SFDCACCOUNTID: The Account ID from SalesForce

SFDCCONTACTID: The Contact ID from SalesForce

SFDCLEADID: TheLead ID from SalesForce

SFDCLEADOWNERID: The Lead owner ID from SalesForce

SFDCOPPTYID: The Opportunity ID from SalesForce

leadList->leadKey->keyValue Required keyValue is the value you wish to query the lead by.
source Required The campaign source. Possible values: MKTOWS or SALES. Enumeration is defined in WSDL.
campaignId Optional when campaignName, programName, and programTokenList are together in a parameter site; Otherwise campaignId is required The ID of the campaign.

NOTE: A bad parameter error will occur if campaignID and campaignName are both passed.

campaignName Optional when campaignId is present; Otherwise required in a set as campaignName, programName, and programTokenList The name of the campaign
programName Optional when campaignId is present; Otherwise required in a set as campaignName, programName, and programTokenList The name of the program
programTokenList Optional when campaignId is present; Otherwise required in a set as campaignName, programName, and programTokenList Array of tokens to be used in the campaign. When specifying tokens, programName and campaignName are required.
programTokenList->attrib->name Optional The name of the program token you wish to pass the value of. Ex:{{my.message}}
programTokenList->attrib->value Optional The value for the specified token name.

Request XML

Response XML

Sample Code – PHP

Sample Code – Java

Sample Code – Ruby