Marketo Targets
When you configure a target in a Data Synchronization task or Mapping Configuration task, select the target object to write specific data about that target object.
You can configure target objects to perform the following operations:
- •Insert, update, upsert, or delete a lead.
- •Associate leads.
- •Merge leads.
- •Add a lead to a list.
- •Remove a lead from a list.
You can also configure a custom object as a target object to write to Marketo.
Lead
When you configure a lead data object to write to a Marketo target, you can insert, update, upsert, or delete leads in Marketo. To create leads in Marketo, you can use the Standard or Bulk API to insert data.
You can configure the target object to perform the following operations:
- Insert a lead with the Standard or Bulk API.
- Use the Standard API when you want to insert few leads at a time. Use the Bulk API to insert many leads in the Marketo database. The Bulk API processes the leads in a staging directory on the Secure Agent machine. The Secure Agent then inserts the leads in Marketo.
When you configure a task to use the Standard API, you can specify the following properties in the advanced target properties:
- - Type of API to be used. Select Standard API. API type is a mandatory parameter.
- - Create Duplicate. Set to Yes if you want to add duplicate leads.
- - Lookup Field. If there are duplicate leads while adding leads, Marketo uses the default email field from the record to check if there are any duplicate leads. If you do not want to use the email field, specify the lookup field value to find the duplicate leads.
- - Success File Directory. The directory for the success file.
- - Error File Directory. The directory for the error file.
- When you configure a task to use the Bulk API, you can specify the following properties in the advanced target properties:
- - Type of API to be used. Select Bulk API. API type is a mandatory parameter.
- - Staging Folder for Bulk Load API. The staging directory for the .csv file where you want to write lead data in bulk. The staging directory is a mandatory parameter.
- - Partition Name. The partition name in Marketo to which you want to add the lead.
- - List ID for Leads. The ID of a list for leads where you want to create the lead.
- - Success File Directory. The directory for the success file.
- - Error File Directory. The directory for the error file.
Note: If you specify any other field for the standard and bulk API in the target properties, an error appears.
- For example, you have source data that contains leads and you want to insert those leads in Marketo.
- The following table shows sample data to insert leads to Marketo:
firstName | salutation | middleName | lastName | email | phone |
---|
Renzege | Mr | Joe | Olson | Renzege@intergraph.com | 9880205707 |
Micheal | Mr | Don | Kutkinson | Micheal.Kutkinson@intergraph.in | 990355707 |
Bobslinger | Mrs | Jack | Mario | bob.Slinger@intergraph.com | 721-530-2000 |
Renzege | Mr | Ron | Olson | Renzege.Aurther@intergraph.com | 9880205678 |
- Select the flat file as the source object and lead as the target object. Create a Data Synchronization task or Mapping Configuration task with the insert operation. Map the incoming fields with the appropriate Marketo fields. When you run the task, the Marketo API inserts the source rows in the Marketo database.
- Update a lead.
- To update a lead in Marketo, provide the lead details. Map the incoming fields with the appropriate Marketo fields.
- You can configure the following advanced target properties to update leads in Marketo:
- - Partition Name. You can specify the partition name in Marketo to which you want to update the lead.
- - Lookup Field. Specify the lookup field to determine which lead you want to update. When you do not specify a lookup field, Marketo uses email ID as the default lookup field. You can specify any one of the following lookup fields: id, cookie, email, twitterId, facebookId, linkedInId, sfdcAccountId, sfdcContactId, sfdcLeadId, sfdcLeadOwnerId, sfdcOpptyId, or custom field.
- Upsert a lead.
- You can upsert leads that are not present in Marketo. If the leads are present, the Marketo API updates those leads. Specify the lookup field to determine which lead you want to upsert. If you do not specify a lookup field, Marketo uses email ID as the default lookup field.
- The insert and update configurations are applicable for the upsert operation. You can specify any one of the following lookup fields: id, cookie, email, twitterId, facebookId, linkedInId, sfdcAccountId, sfdcContactId, sfdcLeadId, sfdcLeadOwnerId, sfdcOpptyId, or custom field.
- Delete a lead.
- You can delete a lead in Marketo. When you map the lead ID from the source field to the target lead ID in the field mapping of a Data Synchronization or Mapping Configuration task, the Marketo API deletes the lead containing that ID in marketo.
Associate Leads
You can track a lead anonymously by associating the cookie value of the anonymous lead with a known lead and updating that lead in the Marketo database.
For example, you want to synchronize information of an anonymous lead with a known lead to track all activities of the anonymous lead. Create the following flat file source that contains the ID of the known lead and the cookie value of the anonymous lead.
The source file is the following .csv file that you use in a task:
id cookie
6844410 561-HYG-937&token:_mch-marketo.com-1419231564967-41981
When you choose AssociateLead as the target object and the update operation in a task, the REST API updates the known lead with the cookie value of the anonymous lead in the Marketo database and you can track the activities of the anonymous lead.
Merge Leads
You can merge two leads and update the information for that lead in Marketo.
You must specify the winning lead ID and the losing lead ID. Also, specify if you want to merge the leads in the CRM. When you run the mapping, the Marketo API deletes the losing lead ID and adds the data from the losing lead ID to the winning lead ID. The Marketo API adds the data only if the winning lead ID field does not have any data, but does not overwrite the winning lead ID data.
For example, you have data for similar leads and you want to merge that data. The source is a flat file source that contains the following lead IDs and the value for the merge in Customer Relational Management (mergeinCRM) as TRUE.
You must designate the winning lead and a losing lead with the following convention:
Id, leadid, MergeInCRM
1,2,True
In the flat file, Id is the winning lead column and leadid is the losing lead column.
Choose the flat file as the source and MergeLead as the target object and run the task. The attributes of the winning lead take precedence. In the example, the losing lead ID is 2 and the winning lead ID is 1. The Marketo API deletes the lead with ID 2.
Add a Lead to a List
You can add a lead to a static list. If the source contains the Lead IDs and the List ID, choose AddLeadToList as the target object in a task. The Secure Agent inserts the leads with those IDs to the list you specify.
Before you add leads to a list, ensure that the lead that you want to add and the list exist in Marketo. To get the list ID from Marketo, select the list you require in Marketo. The list ID appears in the URL for that static list.
For example, when you select a list in Marketo, the URL for the page displays as https://app-<XXX>.marketo.com/#ST1001A1. In this URL, 1001 is the list ID.
The following source file is a sample .csv file that you can use to add leads to a list:
Listid, id
1001, 2
The Marketo API adds the lead with ID 2 to the list with ID 1001.
Remove a Lead from a List
You can choose RemoveLeadFromList as the target object in a Data Synchronization task when you want to remove a specific lead from a static list. When you run the task, the REST API removes that lead from the list in Marketo.
Before you remove a lead from a list, ensure that both the lead that you want to remove and the list exists in Marketo. When you select a list in Marketo, the list ID appears in the URL for that static list.
The following source file is a sample .csv file that you can use to add leads to a list:
The following source file is a sample .csv file that you can use to remove leads from a list:
Listid, id
1111, 2
The Marketo API removes the lead with ID 2 from the list that contains ID 1111.
Writing Custom Object Records to Marketo
You can insert, update, upsert, or delete custom object records, but not custom objects in Marketo.
You can choose a custom object as the target object in a Data Synchronization task or Mapping Configuration task.
If you choose a Marketo custom object as a target in a task to write data, you cannot write to the createdAt, updatedAt, and MarketoGUID fields of a custom object in Marketo. Marketo creates the following fields, by default, when you add a record to a custom object in Marketo:
- •createdAt. Date when the custom object record was created.
- •updatedAt. Date when the custom object record was updated.
- •MarketoGUID. The Marketo field ID for a record created in a custom object.
To write custom object records to Marketo, you can configure the following advanced target properties in a Data Synchronization task or Mapping Configuration task:
- •Custom Custom Object Dedupe Fields. The dedupe fields or ID fields of the custom object in Marketo to which you want to write the record.
- •Success File Directory. Specify the directory for the success file.
- •Error File Directory. Specify the directory for the error file.
When you configure an update or delete operation, you can either provide the ID field or the dedupe field of the custom object in Custom Object Dedupe Field of the advanced target properties. The Secure Agent writes the custom object record to the field you specify. If you do not specify a value for the Custom Object Dedupe field, the Secure Agent considers the dedupe field of the custom object in Marketo as the default.
For example, you want to insert records to the reservation custom object in Marketo. Specify the following dedupe field value: pnr, TicketNumber
The following table shows the details of the records that you want to create in Marketo:
arrivalDateTime | flightCode | pnr | fare | TicketNumber |
---|
7/21/2015 05:30:00 | BA-754B1 | BAF57HG1 | 55000 | 1001 |
12/29/2014 03:00:00 | JA-555S2 | BAF57HG1 | 79000 | 1002 |