Salesforce merge strategy

Overview

Explore the Salesforce merge strategy options available in Ortto when connecting Salesforce as a data source. This feature allows you to customize how data from Salesforce merges with existing records in Ortto.

Accessing Salesforce merge strategy

To access merge strategy, go to CDP > Data Sources > Salesforce > Merge.

Example of merge strategy settings.

Key Points

  • Email is not always unique: In some Salesforce setups, multiple records may share the same email address (e.g., family members or employees). This is common in non-profits and other scenarios.
  • Use Salesforce (SF) record ID as primary identifier: When email is not unique, Saleforce (SF) Record ID should be used as the main unique identifier.

Merge strategy

When importing contact records into Ortto from Salesforce, you must choose a merge strategy for handling any existing records in your CDP.

The merge strategy options are:

  • 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. This is our recommended option.
  • 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.

Merge key strategy

  • Automatic Salesforce (SF) record ID use: Ortto automatically uses Salesforce (SF) Record ID as a hidden unique identifier during the merge process.
  • Default merge key strategy: If you choose Match only if previous merge key is empty, Ortto will use the Salesforce (SF) Record ID as the primary identifier by default.
Example of merge key strategy options for contacts.
Example of merge key strategy options for organisations.



IMPORTANT: Ortto doesn’t have a separate Lead object. Leads are automatically synced as Contacts and therefore use the same merge strategy.

Merge with any key match

The Merge with any key match strategy helps combine records from your data source with existing Ortto records when there is a match on any key identifier.

How it works:

  • The system checks both your primary and fallback identifiers (e.g., email and phone number) to find matches.
  • For example, if your primary identifier is email and the fallback is phone number, Ortto will merge records if either the email or phone number matches an existing record. If no match is found, a new record will be created.

Match only if previous merge key is empty

The Match only if previous merge key is empty strategy checks for matching records in Ortto based on the priority of merge keys.

How it works:

  1. Check in Priority Order: The system looks for matches using the merge keys from your data source in a set order.
  2. Merge or Create Record:
    • First key: If a match is found with the highest priority key (e.g., data source record ID), the records will be merged.
    • Second key: If no match is found with the first key, it checks the second key (e.g., email). If the email matches and the first key is empty, the records will be merged. If the first key has a value, a new record is created.
    • Third key: If no match is found with the first or second key, it checks the third key (e.g., phone number). If the phone number matches and both previous keys are empty, the records will be merged. If the first or second key has a value, a new record is created.

EX 1:

Data Source Keys: Record ID, email, and phone number.

  • Record ID Match: If there’s a match, merge the records.
  • Email Match: If the email matches but the Record ID is not empty, create a new record.
  • Phone Match: If the phone matches but the previous keys have values, create a new record.

EX 2:

Merge Process

  1. Instance Unique Identifer: Email
  2. Salesforce Merge Strategy: ‘Match only if previous merge key is empty’

Process

  1. Inbound Data from Salesforce: Ortto looks for a record with a matching Contact/Lead ID.
    • Match Found? > Merge
    • No Match? > Continue searching
  2. Search by Email: If no match is found with the Contact/Lead ID, Ortto searches for a match by email.
    • Match Found? > Check if the existing record has a Contact/Lead ID. If the Contact/Lead ID field is empty, merge the data. If it has a value, create a new record.
    • No Match? > Create a new record with the inbound data.
  3. Handling multiple matches: If multiple records match, Ortto merges data with the most recently updated record.

Learn more about the instance Unique Identifier here.

Choosing a merge key strategy

When selecting a merge key strategy, consider the types of records you have and their common values. Adjust your unique identifiers in Ortto to align with your merge strategy.

  • Common identifiers: Contacts may share work emails or phone numbers.
  • Recommended strategy: Set a unique identifier like Contact ID as primary, with email as a fallback. Use the Match only if previous merge key is empty strategy to avoid merging contacts with the same email but different IDs.

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.


Conversions

When connecting a Salesforce data source, you’ll have additional options beyond merge and merge key strategies. You can also choose how to handle conversions:

  • Lead to contact conversion: Decide whether to merge a lead into an existing contact when it converts.
Conversion options for leads.

Hidden identifiers

Ortto uses a hidden unique identifier (ID) for Salesforce to manage merges effectively.

What is a hidden identifier?

  • Purpose: It helps distinguish between records from different data sources. Each data source has a unique hidden ID to prevent incorrect merging of records.

EX:

  • You have two Salesforce accounts (A and B) connected to Ortto. Both have a record named Rainy Day Insurance.
  • When importing Rainy Day Insurance from Salesforce account B, Ortto sees it as a separate record due to its unique hidden ID.

Merge strategies with hidden IDs:

  • Match only if previous merge key is empty: You might end up with two separate Rainy Day Insurance records if Ortto identifies them with different hidden IDs.
  • Merge with any key match: If the records share a common identifier (like phone number or email), Ortto will merge them even if they come from different data sources.

Limitations

  • Integration issues: When integrating other data sources (e.g. CSV, or third-party systems), these sources may not reference the Salesforce (SF) Record ID, which can lead to random merging (often by email or another unique identifier).
  • CSV import risks: Using this strategy with CSV imports might result in incorrect or multiple matches being updated rather than just the intended user.