How to Create a Custom Sync Between Salesforce and Marketo

When integrating Salesforce and Marketo, you may want to prevent certain leads from syncing.  That’s usually because you want you want to keep your Marketo database size low.  Or you have old records in Salesforce with a history of sales activity, but they don’t have emails and aren’t “marketable.”  To remedy this, you’ll want to create a custom sync between Salesforce and Marketo.

But when you start your integration with Salesforce, you can’t set up a custom sync filter until the field mapping schema has been configured. The ideal time to request a custom sync filter is after the schema has been configured in Marketo and before you start the record sync.

Step 1 – Creating a Sync Rule field

  1. Create the field for the Sync Rule in Salesforce on the Lead and Contact Objects.  Make sure you map the two fields together.
  2. Make the fields visible to Marketo, and check in Marketo to see if the field appears.  (You do this in Marketo Admin → Field Management)
  3. Then map the field in Marketo to both the Salesforce Lead and Contact Object fields.

Salesforce Field Example = Sync with Marketo (sync_with_marketo) (Type Boolean (aka True/False))

Advice:

  • Don’t use a formula field since the sync will automatically stop whenever the field changes to False.  Marketo won’t recognize the value change, and it will cause you headaches.
  • Marketo won’t see when you delete the record in Salesforce.
  • The custom sync field in SFDC will work better and cause less confusion if the sync rule logic dictates that when the field value is checked or True, the record should sync to Marketo fro Salesforce.

Step 2 – Workflow rules

  1. Create a workflow rule in Salesforce that automatically changes the field from False to True for any new lead that is created in Salesforce with an email address.
  2. Then create a second rule which changes the field from False to True if the email address field changes from empty to not empty.
  3. In Salesforce, update all records for the sync_with_marketo field based on your criteria.

Advice:

  • Don’t create a rule to change the field back from True to False if the email address is changed to NULL. The workflow rule should only run if the sync_with_marketo field is set to False.
  • Run it every time a lead is created, or the email address field changes from NULL.

Step 3 – contact Marketo Support

  1. Contact Marketo support and ask them to implement a custom sync rule. You want to implement the workflows before asking them to sync the records. 
  2. Include the Account String for the instance (found in the Admin → Landing Page area). Example: yourcompany

Marketo Support Ticket Template

Hi Support,

I need to create a custom sync between Salesforce and Marketo.  If the Salesforce field below is checked (True) the record should sync between Salesforce and Marketo. If the field is not checked the record should not sync. The rule should apply to both Leads and Contacts.

The field is

API Name

sync_with_marketo

Friendly Label

Sync_with_marketo or Sync with Marketo

Advice:

  • You can use custom sync filters on the Lead and Contact object plus the Account and User object. Check with Marketo support about other objects.

Reducing synced records

If the integration has already been completed and you want to reduce the number of synced records in the Marketo database, follow these steps:

  1. Create “sync_with_marketo” field in Salesforce on the Lead and Contact Objects
  2. Map the Lead field to the Contact field
  3. Expose the field to the Marketo sync user in Salesforce
  4. Create a workflow rule in Salesforce that defines which records to sync
  5. Update records accordingly via Data Loader or a similar tool
  6. Run Salesforce and Marketo reports to get record counts, for both Leads and Contacts
  7. Compare record counts in Marketo and Salesforce
  8. Schedule the go-live time with Marketo Support
  9. Write Marketo Support to implement the sync rule
  10. Identify the Salesforce records in Marketo you want to delete
    1. “Salesforce is Created” is not empty
    2. sync_with_marketo = True
  11. Create and Run a batch campaign to set sync_with_marketo to False (based on the criteria outlined for which records you do not want to sync)
    1. Use the sync flow step to push the updates to Salesforce
    2. Use a wait step of an hour to make sure updates have synced
    3. Then use the delete record flow step to delete the record in Marketo only

A lot of nuances

There are a lot of gotchas or “mysteries” to this process.  Read on!

 

Curious if you’re leveraging the full power of your marketing tech stack?  Request a free audit and we’ll benchmark your setup.

Sponge | Marketing and Operations Analysts

Get a Free System Audit

Whether you inherited a new instance or just want a second opinion, we'll dive in and benchmark your tech stack.

Sponge | Marketing and Operations Analysts

Download Resource

Use this form to recieve your free resource in your inbox today!