Instructions for Creating a Custom Sync Rule

Brian_Law_MKTO
Marketo Employee
Marketo Employee

All the great articles about implementing a custom sync rule in one location. Enjoy!

First, what is a custom sync rule? A custom sync rule can be used to keep specific records from syncing with Marketo. For example, if you have a lot of records without an email address it is recommended not to have them sync to Marketo.

 

"Sync with Marketo" mysteries part 1 by Grégoire Michel

"Sync with Marketo" mysteries part 2 by Grégoire Michel

Greg's articles go in-depth about how the custom sync rule works.

 

Finally, here are my instructions for creating a custom sync rule in SFDC including step by step instructions.

 

Step 1 - Create the field for the Sync Rule in SFDC (Lead and Contact Object). Make sure you map the two fields together. Make the fields visible to Marketo. Check in Marketo to see if the field appears. The field in Marketo should be mapped to both the SFDC Lead and Contact Object fields. (Marketo Admin => Field Management)

 

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

 

Note: Do not use a formula field since the sync will automatically stop whenever the field changes to false which will cause you headaches since Marketo won’t recognize the value change. Marketo won't see when you delete the record in SFDC. Also, the custom sync field will work much better and be less confusing if the logic is if the value of the field is True the record should sync.

 

Step 2 – Create a workflow rule in SFDC to automatically change the field from False to True for any new lead that is created in SFDC with an email address. Create a second rule which changes the field from False to True if the email address field changes from empty to not empty.

 

Do not create a rule to change the field back from True to False is the email address is changed to NULL. The workflow rule should only run if the sync_with_marketo field is set to False. It should run every time a lead is created or the email address field changes from null.

 

In SFDC, update all records for the sync_with_marketo field based on your criteria.

 

Step 3 - Contact Marketo support and request a custom sync rule be implemented. Best practice is implement the rule prior to the record sync.

 

Ticket Example

Account String for the instance (Information can be found in Admin => Landing Page) Example: acmecompany

 

Hi Support,

 

I need a sync filter rule created. If the SFDC field below is checked (True) the record should sync between SFDC 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

 

Notes:

  • When you start your integration with SFDC, you cannot setup 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.
  • 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.
  • If the integration has already been completed, and a custom sync rule is necessary to reduce the number of synced records in the Marketo database, follow these steps:
    • Create "sync_with_marketo" field in SFDC on the lead and contact objects
    • Map the lead field to the contact field
    • Expose the field to Marketo sync user in SFDC
    • Create workflow rule that defines which records to sync
    • Update records accordingly via data loader or similar tool
    • Run reports to get record counts, for both lead and contact
    • Compare record counts in Marketo and SFDC
    • Schedule the go-live time with Marketo support
    • Marketo support to implement sync rule
    • Identify the SFDC records in Marketo you want to delete
      • SFDC is Created is not empty
      • sync_with_marketo = False. These will be the records you didn't change to sync_with_marketo to True.

 

Here are some additional resources for learning about the Marketo integration with SFDC.

 

Here is a checklist if you are preparing for your initial SFDC sync

48573
11
11 Comments
Anonymous
Not applicable

Good Work Brian

Valerie_Whitin2
Level 5

This is awesome! Where were you 6-9 months ago when I went through this myself?

We ended up creating additional logic into our SFDC triggers, preventing sales prospecting leads from coming into Marketo (we had a hard rule against marketing to purchased lists) until they became a customer. We had RingLead running to manage any problems with duplicates. The idea was to eventually build even more logic into the filters for specific instances, but I have since left that company so not sure whether or not they followed through on the advanced strategy.

Thanks,

Valerie

Emily_Miller
Level 2

This is amazing!!

Emily_Henson1
Level 1

Brian Law‌ Hi there! This is an amazing post and I'm grateful for the work you put in to put it together. I have a question about the workflow rules you mentioned in the OP. We already have a current SFDC integration, so I just completed the step of creating the custom field and the mapping. Is it absolutely necessary to create the workflow rules in SFDC alongside it? I'm mostly just trying to do a one-off project and delete people from our Marketo database but still keep them in SFDC. We have a bi-directional sync and the only field we require to be filled out in order for a Marketo web lead to sync to SFDC is Company Name. Other than that, i'm pretty sure everything else that is created co-exists in both platforms. 

*disclaimer: I'd love to have more regulation behind these rules, but i'm new still and we're not at that point of deciding these rules. 

Brian_Law_MKTO
Marketo Employee

Hi Emily, I've been sick and been slow to catch up on questions. One way to handle a custom sync rule without a SFDC workflow rule would be to set the value of the custom field using Marketo. This option will work as long as you don't have a large volume of records syncing daily, say less than 10,000. The requirement would be the custom field will need to be backwards from the recommendation noted in my article. Let's call it Don't Sync with Marketo. Use a batch smart campaign to do the following: Set the custom field used in the sync filter to True, use the sync with saleforce flow step to push the update to SFDC, wait 1 hour and delete the record in Marketo only. This goes completely against my article. Thanks!

BrennaLofquist
Level 1

@Brian_Law_MKTO Hi Brian, does this apply for an initial sync when migrating from Pardot to Marketo? For our initial sync, we don't want to port everyone over and only a select group. Thanks!

Brian_Law_MKTO
Marketo Employee

Hi, yes the article applies for whenever you don't want all records from SFDC to sync to Marketo. 

Dan_McGinn3
Level 2

Hi @Brian_Law_MKTO,

Relating to your answer to Emily - we too have a number of inactive contacts we would like to delete from Marketo, but keep in SFDC. I have considered doing an initial batch for a not yet created custom field called "Hide from Marketo" or "Unsync from Marketo" where the custom sync rule would look for this to be "true" and then hide from Marketo after updating the SFDC records vs. having a "Sync to Marketo" field where everyone default to true and Salesforce looks for it to be false.  Either way, we would create a workflow in SFDC that says "If Contact = Inactive, Unsync from Marketo = True." Is there a reason to use "Sync to Marketo = False" as the criteria vs. "Unsync to Marketo = True" approach in SFDC?

Thanks!

Dan

micheleprather
Level 1

@Brian_Law_MKTO 

Super helpful and detailed steps. THANK YOU.

Should be incorporated into the Marketo-SF Integration Steps Instructions around Step 3:

https://experienceleague.adobe.com/docs/marketo/using/product-docs/crm-sync/salesforce-sync/setup/en...

dtrosky
Level 2

Hi @Brian_Law_MKTO . We just implemented this in our staging environment which is connected to our Marketo Sandbox environment. We do not have a bi-directional sync between SF staging and the MKTO sandbox though- what is the best way to test this functionality? Do we need to go live in production in order to test? Please let me know your thoughts. Thank you!