Solving the Duplicate Problem in Marketo with FlowBoost

How to: Solving the Duplicate Problem in Marketo with FlowBoost

Let’s face it–duplicate records are a headache. But sometimes, there may be legitimate reasons for duplicates to exist. Even if they aren’t desired, there may be cases where you want to ensure that certain fields are kept in sync across duplicate records. A common use case for this is custom email preferences. Imagine for a moment that you have two records for the same person. That person fills out your preference center form to update their email preferences. While Marketo will automatically keep the default Unsubscribed field in sync across duplicate records with the same email address, the same is NOT true of any custom fields you have to store their communication preferences. The form submission will only be tied to one of the duplicate records, and the other will not have its custom preference fields updated by the form submission.

This is pretty obviously bad for both the person and your business. They’ve just told you what kinds of communications they’d like to receive, but it’s likely that you may inadvertently violate those preferences because the duplicate hasn’t been updated accordingly. Ideally, we’d like to keep these fields in sync across all duplicates. That way we’ll be sure to always have the correct preferences for all records, and, if the duplicates are ever merged later, we’ll ensure that the surviving record has the correct preferences as well, since the duplicates won’t have any conflicts. Marketo can’t handle this by itself, but…

Once again, my friends, enter FlowBoost

As I’ve mentioned in previous blog posts, that I love using FlowBoost for adding scoring fields or associating Munchkin activity with known records when using non-Marketo forms. For this use-case, we can call a FlowBoost webhook whenever our custom preferences are updated (either via form submission or manual updates) and have those new values propagated across all records with the same email address.

In the webhook, you’ll pass the email address and any fields that you want to be updated across any duplicate records. FlowBoost will call the Marketo API to fetch any records with that email address, set the fields on all of those records, and push the updates back to Marketo.

Step-by-Step on Solving the Duplicate Problem in Marketo with FlowBoost

  1. Get a FlowBoost license. Which version you need will depend on the volume you expect to use and which features you need, but this particular use-case can be done with the free community license as long as you are under 100k calls/month.
  2. Create an API-only Marketo User with at least Read-Write Person API permissions. Save the Client Id and Client Secret in a text editor.
  3. Create a new webhook in Marketo.
    1. Copy and paste the code here into a text editor and update the values for identityURLrestURLclientIdclientSecret, and fieldsToPropagate. Be sure to use the REST API Name of your field(s). You can find the identityURL and restURL values under Admin > Web Services > REST API
    2. Under URL, enter: https://api.teknkl.com/flowboost/v20/run?authoringEnv=pro
    3. Copy and paste your customized code into the Template section of your webhook.
    4. Set Request Type = POST.
    5. Set Request Token Encoding = JSON.
    6. And set Response Type = JSON.
    7. Save.
    8. Select your new webhook, and select Webhooks Actions > Set Custom Header.
    9. Add the following headers and values:
      1. Content-Type: application/javascript
      2. X-Api-Key: [your FlowBoost API key]
  4. Create a Smart Campaign to call your webhook when someone fills out your preference center form or your custom preferences are updated. Your Smart List might look something like this:Screenshot of Marketo Smart List

Notes

  • This code will only handle up to 300 duplicate records with the same email address. If you have more–and I really hope you don’t–you’d need to adjust the code in order to handle that properly.
  • There is no meaningful error handling here, so you’re on your own for that if required.
  • One obvious potential enhancement is to not make the second API call to update records in Marketo if only a single record is returned from the initial query for matching records. However, I’m handling that in my Smart List, by only calling the webhook in the first place if the person is part of the Possible Duplicates Smart List.
  • I am making no allowances for workspaces or partitions here. If your instance or use-case involves those, you’ll need to adjust the code as required.

Now that you’ve solved the duplicate record problem in Marketo with FlowBoost, you’re on your way to ensuring accurate communication preferences for all your contacts going forward – even when duplicates exist. To get communicated on the latest tips, tutorials and best practices, subscribe to our quarterly newsletter below:

Sponge.io | Marketing and Revenue Ops

Get a System Audit

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

  • This field is hidden when viewing the form
  • This field is hidden when viewing the form
  • This field is hidden when viewing the form
  • This field is hidden when viewing the form
  • This field is hidden when viewing the form

Sponge.io | Marketing and Revenue Ops

Download Resource

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