Add SalesPerson Data to Marketo

August 21, 2015 | by

With the new SalesPerson APIs, you can freely associate Marketo leads to SalesPerson records in instances without a native CRM integration. This allows usage of {{lead.Lead Owner Email Address}} and related fields and tokens within Marketo.

Creating SalesPerson records

In order to associate leads to SalesPerson records, we first need to input our SalesPerson records into Marketo. This is done with the Create/Update/Upsert SalesPerson endpoint. Here’s an example class in PHP:

In the above class, the $input variable is an array of stdClass objects with possible members:

  • externalSalesPersonId(only valid on create)
  • id(only as key in updateOnly mode)
  • email
  • fax
  • firstName
  • lastName
  • mobilePhone
  • phone
  • title

More detailed information about types and fields lengths can be retrieved through the Describe SalesPerson call.

Synching Leads

Here’s a quick example class for synching the leads we need:

Process

Here’s an example creating two salesperson records and associating them to two lead records:

For our example classes, we’re just creating stdClass objects to represent our SalesPerson and Lead records which need to be synched, with each desired field added as a member. After execution of this code, the leads marketoDev@example.com and devBlog@example.com will both have the Lead Owner Email, Lead Owner First Name, and Lead Owner Last name fields populated, affording them the ability to use the relevant tokens for those fields and be filtered by the relevant smart list filters.

Auth Class