Data source merge strategies

Overview

When you import person (contact) records into Ortto via a data source like Salesforce, Segment, or a CSV import, you will need to decide how you want to handle the incoming records in relation to any existing records in your CDP. 

You can select from a number of merge strategies which tell Ortto what to do if a person’s record already exists in your CDP. 

Merge strategy options

  • Import and merge new data only. When a record exists, only new data will be added.
  • Import and merge new data for existing records only. When a record exists, only new data will be added. Don’t add new records.
  • Import and overwrite any data that exist. When a record exists, all fields will be overwritten.
  • Import and overwrite any data that exist for existing records only. When a record exists, all fields will be overwritten. Don’t add new records.
  • Import new records only. If a record exists, it will not be modified.

TIP: For CSV imports, the recommended merge strategy option is Import and merge new data only. Otherwise, the recommended merge strategy for all other data sources is Import and overwrite any data that exist.


About merge key strategies

When connecting a data source, you will be asked to select a merge strategy and a merge key strategy (this may also be referred to as a find strategy). The merge key strategy refers to the unique identifiers set in your Ortto account when determining how to merge contacts and accounts (previously organizations).

The merge key strategies are:

Your chosen merge strategy will be applied according to the merge key strategy you select. 

Example of merge option and merge key strategy.

NOTE: If you are connecting a Salesforce data source, in addition to the merge and merge key strategy options, you will see the options for how to handle conversions (whether or not to merge a lead who converts to a contact). Learn more about Conversions in our guide on Preparing to connect to Salesforce.

TIP: If you are using Ortto's API to create or merge contacts, you can set the merge strategy for each call. Learn how to do this here.

Merge with any key match

This merge key strategy will review the merge keys present in the inbound (data source) data and merge with existing Ortto records based on any key match.

This strategy will look at both your primary and fallback unique identifiers (e.g. email and phone number) to determine whether a match can be found.

For example, you have your unique identifiers set to use email as the primary identifier and phone number as the fallback. Using Shopify as an example, if your Shopify contact’s email address or phone number matches with an existing Ortto record, the system will merge with that record. If no Ortto record exists with a matching email or phone number, a new record will be created.

Match only if previous merge key is empty

This merge key strategy will review the merge keys present in the inbound (data source) data in priority order and look for a matching record in Ortto. If we can’t find a match on the first key but find a match against the second key, we check if the first key value is present (not empty) on the existing contact which matched the second key, and -

  • If the first key value is present, we skip that contact and create a new record.
  • If the first key value is empty, we merge the inbound data with that record.

The merge key priority order is determined by whether or not the data source has a hidden identifier (ID), and your unique identifiers

Let’s look at an example using 3 merge keys: data source record ID, email and phone. This merge key strategy will firstly check if a match can be found based on the data source record ID:

  • If a match is found, the contact will be merged.
  • If no match is found, we will check for a match on the email:
    • If an email match is found and the data source record ID is empty, the contact will be merged.
    • If the email match is found but the data source record ID has a different value, a new contact will be created.
  • If no match on the data source record ID or email is found, we will check for a match on the phone number:
    • If a phone number match is found and the data source record ID and the email are empty, the contact will be merged.
    • If the phone number match is found but the data source record ID and/or the email have different values, a new contact will be created.

Data sources have hidden identifiers

Ortto applies a hidden unique identifier (ID) to data source records as an additional merge key.

The hidden ID is used to handle cases where two records in the same data source share identifying information - such as email or phone - but represent different people. Each record carries its own unique record ID which Ortto uses to evaluate whether records should be merged, based on your chosen merge and merge key strategy.

As an example, you have Salesforce integrated with Ortto and you have two unique Contact records:

  • Contact A - John Smith (john@email.com)
  • Contact B - John Smith (john@email.com)

Using "Merge with any key match" while having the unique identifier set to Email results in Orto merging these two Salesforce contacts into a single record.

This occurs because:

  • The email address matches.
  • The strategy allows merging on any matching key.
  • The Salesforce record IDs are not enforced as a blocking condition.

Using "Match Only If Previous Merge Key Is Empty" changes the outcome because the merge key priority is:

  1. Hidden Salesforce record ID (data source ID)
  2. Email

This means that when the second person record (Contact B) syncs into Ortto:

  • Ortto first checks the hidden Salesforce record ID > No match found.
  • Ortto then checks Email > A match is found.
  • Ortto checks whether the higher-priority key (Salesforce record ID) is empty on the matched contact.

Because the existing contact already has a Salesforce record ID (and it is different), Ortto will not merge. This results in a new person record created in Ortto with the same email address.

Here is an illustration of how the merge key strategies work in conjunction with the hidden ID. This example uses the email as the primary unique identifier and phone number as the fallback identifier:

Example of how merge key strategies function.

Choosing a merge key strategy

When choosing a merge key strategy, it’s important to consider what type of records you have and whether they share any common values. Depending on the identifier values your data source contacts have, you may need to adjust the unique identifiers in Ortto to suit your merge key strategy.

For a CRM data source like Salesforce, Pipedrive or HubSpot, you might have contacts that share a common work email address or phone number. As such, you may find it more suitable to use the Match only if previous merge key is empty strategy, as Ortto will automatically use the data source record ID as the highest-priority merge key, preventing contacts who share an email address or phone number from being incorrectly merged.

For an e-commerce data source like Shopify, you might prefer to keep the default unique identifiers (email as primary, phone number as fallback) and use the Merge with any key match strategy to merge records with matching identifiers to avoid creating duplicate customer records.