When a new person triggers the RingLead DMS webhook to be called, it can take several seconds to a minute or more for RingLead DMS to process the new person. During this time, Marketo should not sync the person to SFDC; otherwise, a potential duplicate or record with incomplete data can be created and SFDC assignment rules, workflow rules and Apex triggers may cause the record to be processed incorrectly.
A new person can be synced to SFDC in one of the following ways.
- Explicitly through a 'Sync Person to SFDC' flow action
- Implicitly through several flow actions (e.g. Add to SFDC Campaign, Change Owner, Create Task)
- Implicitly though a Marketo program that has the Salesforce Campaign Sync option enabled
You can identify which of your smart campaigns have these flow actions by using the Marketo Campaign Inspector feature. If you are unfamiliar with this feature, you can learn more about it in the Marketo support document Campaign Inspector for Triggered & Recurring Campaigns.
Once you've identified all of the smart campaigns and programs that might cause a new lead to sync to SFDC, you can implement the following methods to ensure that new persons aren't synced to SFDC prematurely, .
Prevent Explicit Syncing of New Persons to SFDC
If you have Marketo smart campaigns with a 'Sync Person to SFDC' flow action and have a single 'Person is Created' trigger, you can replace the trigger with a 'Data Value Changes' trigger and the 'Attribute: RingLead DMS Status' and 'New Value is true' constraints. This will ensure that RingLead DMS has completed its processing, and it has either merged the lead with an existing duplicate or set the RingLead DMS Status field value to 'true' indicating that this is truly a new unique lead.
Note: If you have chosen to link new persons to matched Accounts or convert new persons to Contacts at matched Accounts, you will need to add additional values in the New Value constraint's Multiple Value Chooser as described in the Explanation of RingLead DMS Status Values below.
Explanation of RingLead DMS Status Values:
|Marketo Trigger||Attribute||New Value is:||Purpose of this Value|
|Data Value Changes||RingLead DMS Status||true||This value is set by RingLead DMS to identify truly new Marketo persons who do not match Salesforce Leads or Contacts.|
|Data Value Changes||RingLead DMS Status||link_to_account||This value is set by RingLead DMS to identify Marketo persons which will be linked to matched Accounts. By providing a value unique from New Contacts, your Marketo can be configured to immediately sync ONLY new Marketo persons which link to an Account (and not Marketo Persons which are to be created as new Salesforce Contacts).|
|Data Value Changes||RingLead DMS Status||convert_to_contact||This value is set by RingLead DMS to identify Marketo persons which will be converted to Salesforce Contacts at matched Accounts. By separating this from Marketo persons which are to be linked to Accounts, your Marketo can be configured to immediately sync ONLY new Marketo persons to be converted to Salesforce Contacts (and not new Marketo persons which link to an Account).|
|NOTE: the field above is selected as the "RingLead Status Field" in RingLead DMS Marketo Setup|
Ideally you have a single smart campaign that has a 'Sync Person to SFDC' flow step and a 'Person is Created' trigger for handling the sync of new persons to SFDC. However, many Marketo implementations have smart campaigns with other triggers (e.g. Fills Out Form, Revenue Stage is Changed, Data Value Changes) that contain 'Sync Lead to SFDC' flow steps that both existing and new persons may flow through. If an existing person who is already synced to SFDC flows through those smart campaigns, the 'Sync Person to SFDC' flow action is unnecessary as Marketo will automatically sync updates to SFDC. If a new person flows through those smart campaigns, you can prevent the person from syncing to SFDC before RingLead DMS has finished processing the record using one of the following methods.
Method 1: Add a Wait flow step before the 'Sync Person to SFDC' flow step. The Wait Duration should be from 2 to 5 minutes. If your SFDC org has over 100K records, we recommend a 5 minute Wait Duration. Note: This method typically has the least impact on overall processing of new leads and does not require creating another smart campaign that will sync new persons to SFDC when RingLead DMS has completed its processing.
Method 2: Remove the 'Sync Person to SFDC' flow step from the smart campaign. Note: If you use this method, you will need to create another smart campaign (described at the beginning of this help article) that will sync new persons to SFDC when RingLead DMS has completed its processing.
Prevent Implicit Syncing of New Persons to SFDC
When a new person that has not been synced to Salesforce is in a smart campaign with the following flow steps, the 'Sync Person to SFDC' flow action is run implicitly and the new person may be synced to Salesforce before before RingLead DMS has finished processing.
|Marketo Flow Steps|
Add to SFDC Campaign
Change Status in SFDC Campaign
Also, if a new person becomes a member of a Marketo program that is synced to an SFDC campaign with the Salesforce Campaign Sync option enabled, then the 'Sync Person to SFDC' flow action will run implicitly.
You can use the following methods to prevent the implicit 'Sync Person to SFDC' flow action from occurring before RingLead DMS has finished processing.
Method 1: Add a Wait flow step before the implicit sync flow steps or a 'Change Program Status' flow step with a program synced to a SFDC campaign. The Wait Duration should be from 2 to 5 minutes. If your SFDC org has over 100K records, we recommend a 5 minute Wait Duration.
The execution priority of smart campaigns with Wait step durations over 5 minutes is lowered in the campaign queue.
Method 2: Use the previously-created RingLead DMS Status custom Salesforce Lead field in a Salesforce validation rule as follows.
Caution: This method should not be used if new persons that have not yet synced to SFDC will flow through smart campaigns with implicit sync flow steps, as the flow action will fail to execute if RingLead DMS has not finished processing.
For new persons that become members of programs with the Salesforce Campaign Sync enabled, those persons will not be added as a member of the corresponding SFDC campaign once they sync to SFDC; however, they will be added as a member of the SFDC campaign if their Marketo program member status changes. You can work around this limitation by creating a smart campaign in those programs as follows.
Smart List: 'Person is Synced to SFDC' trigger, 'Member of Program' filter.
Flow: 'Add to SFDC Campaign' step (if your new person and program member is likely to have more than one member status, you'll need to either add choices to the 'Add to SFDC Campaign' flow step(s) or create multiple smart campaigns to set the appropriate status in the SFDC campaign.
Step 1) Confirm the custom Salesforce Lead field exists in Salesforce Setup (Customize | Lead | Fields):
|Custom Lead Field Option||Value|
|Name||RingLead DMS Status|
|Description||Prevents Marketo creating duplicate Salesforce Leads if it has not yet been processed by the RingLead Webhook.|
|Check for all Salesforce Profiles except for the RingLead user.|
|Ensure that the new field is visible to the Marketo sync user profile and is not Read Only.|
Step 2) Create a Salesforce Lead field Validation Rule for the RingLead DMS Status field by copying and pasting the values in the table below into the new validation rule.
Note: This validation rule uses the value in the Marketo system field 'Original Source Type'. After January 31, 2017, this field is no longer syncing to SFDC as part of the original Marketo Lead Management AppExchange package. To continue syncing this field to SFDC, you need to create a custom Salesforce Lead and Contact field with the field name 'mkto71_Original_Source_Type'. The Marketo Community article Adding Marketo Fields to Salesforce provides step by step directions for doing this.
|Rule Name||Prevent Creation of Non-Processed Leads|
|Error Condition Formula|
IF ( $Profile.Id ="[insert the Salesforce Profile Id (example: 00ea0000000jSZF) for your 'Marketo Sync' Salesforce User's Profile]", RingLead_DMS_Status__c="" && (mkto71_Original_Source_Type__c <> "salesforce.com" && mkto71_Original_Source_Type__c <> "" ),false)
|CAUTION: Often on Microsoft Windows computers, the double quotes (") above will not paste correctly.|
|Error Message||This Lead has been prevented from syncing to Salesforce because it has not yet been processed by RingLead DMS.|
|Active||Check this box only after you have activated the 'Send New Person to RingLead DMS' Marketo smart campaign|
After pasting the value above into the Error Condition Formula, replace the text enclosed in the square brackets including the square brackets with the Profile ID of the Marketo Sync user. When the Marketo Sync profile is displayed, its ID is the 15 digit code at the end of the URL in your browser's address bar.
When you are finished, click Save. After activating the 'Send New Person to RingLead DMS' Marketo smart campaign, be sure to come back and check the Active checkbox if you have not done so already, but only after you have completed Step 3 below.
Step 3) Before activating the validation rule, create a Marketo smart campaign as follows to set the RingLead DMS Status field value to 'True' on ALL records whose RingLead DMS Status field value is empty and have not been synced to SFDC. This will ensure that any existing records, not yet synced to SFDC will not trigger the validation rule when they are synced to SFDC.
Smart List: 'RingLead DMS Status is empty' filter, 'SFDC Type (person) is not Lead or Contact' filter
Flow: 'Change Data Value: RingLead DMS Status → True' filter
Note: When the validation rule is active, if an explicit or implicit 'Sync Lead to SFDC' flow action is run on the new person before RingLead has completed its processing, the flow action will generate a sync error, and you’ll see its email address listed in the ‘Salesforce Sync Error: Unable to update Lead’ notification email that is sent to Marketo admins early the next morning.
Not to worry though! As long as you have a smart campaign with a 'Data Value Changes' trigger as described in the Prevent Explicit Syncing of New Persons to SFDC section above, and an explicit or implicit 'Sync Lead to SFDC' flow action, the new person will be synced to SFDC as soon as RingLead DMS finishes processing and sets a value in the RingLead DMS Status field.