All Collections
Contacts
Merging contacts
Scenario 1: SMS and email contacts using broadcast SMS campaigns and SMS in automations
Scenario 1: SMS and email contacts using broadcast SMS campaigns and SMS in automations

For accounts that both send broadcast SMS campaigns and use SMS in automations.

Gareth Burroughes avatar
Written by Gareth Burroughes
Updated over a week ago

For the information in this article to apply to you, you must:

  • have been sending both broadcast SMS campaigns and triggered SMS through automated programs.

  • have had separate SMS contacts and email contacts.

If you need help or guidance at any point, contact your Customer Success Manager.

The process

To merge your data, you need to:

  1. Create a data field which is used identify potential duplicate contacts.

  2. Create a segment to identify contacts with a mobile number stored in a custom data field.
    This is the data field you previously used in your Triggered SMS profile for sending SMS in automations.

  3. Export this segment, and add a column to the exported file to mark these mobile numbers as potential duplicates.

  4. Re-import the contacts, mapping only the custom mobile number data field column in the import file to the mobilenumberid field in Dotdigital, and the potential duplicates column to your POTENTIAL_DUPLICATES data field. At this step, you must not map the email column in your import file.

    The process up to this point has allowed you to identify the mobile numbers that were previously stored against email contacts in a custom data field, and imported these as mobile number only unified contacts. Any of the mobile numbers that also existed in your broadcast SMS contacts also now exist as mobile number only unified contacts, and have been marked as potential duplicates.

    This allows us to delete these mobile number duplicates, so that we can do a final data import to merge the mobile numbers we have gathered with the correct email addresses in a single unified contact record.

    To complete the process:

  5. Create a segment of the potential duplicates and delete these duplicates from your account. The segment must be converted into a list to allow you to monitor the progress of the deletion.

  6. Reimport your data to create merged unified contact records.


Before you start

Things you need to know:

  • Mobile numbers that you import must be in the international format, including the country code. For example, +44, or 44.


1. Create a data field

First, you must create a data field which you can use to mark any duplicates.

To do this:

  1. Expand the User menu, and go to Settings > Contacts > Contact data fields, then select the Custom data fields tab.

  2. Select NEW DATA FIELD.

  3. For Name, enter POTENTIAL_DUPLICATE.

  4. Expand the Data type drop-down menu, then select Yes/No.

  5. Expand the Default value drop-down menu, then select No.

  6. For Access leave the value as Private.
    Optionally, expand the Folder drop-down menu, then choose a folder to store your data field.

  7. Select CREATE.

2. Generate a segment of contacts who have a mobile number in a custom data field

Before you start

Find the name of the custom data field you have previously stored mobile numbers in.

If you’re not sure, expand the User menu, then go to Settings > Digital marketing channels > Triggered SMS. Select the name of your Triggered SMS profile and check the Mobile number data field selected there.

To generate a segment for your contacts with a mobile number in a custom data field:

  1. Create a segment called Contacts with a mobile number in a custom data field.
    To learn more, check out the article Create a segment.

  2. Drag the data field block onto your segment Include area. Then select the block to open the rule settings.

  3. Select the custom data field you have been storing mobile numbers in.

  4. Expand the rule drop-down menu, select Is not empty, then select OK.

  5. Select SAVE, then GENERATE SEGMENT.

3. Export your segment

  1. Go to Audience > Segments.

  2. Select the Mobile number in a custom field segment.

  3. Select Display, and ensure you select at least the Email, POTENTIAL_DUPLICATE, and custom phone number data fields. Then select APPLY.
    If you want to export a copy of all data field data you hold for these contacts, you can select Select all to include all data fields in the export file.

  4. Expand the Export drop-down menu, and select Export all. You don’t need to include marketing preferences.

  5. Select CONTINUE.

  6. On the Exports page, wait for your export to finish, then select Download. A CSV export downloads to your local computer.

4. Edit and reimport your segment export file

In this step, we find and match up the potential duplicate contacts.

When your account switched to using unified contacts, any SMS contacts you had were converted to mobile number only unified contacts, but the system can’t automatically match these mobile numbers with corresponding email addresses, where they exist.

To solve this, we mark these contacts as potential duplicates so that we can identify and delete them. Then, we can perform a final import to match the mobile numbers with the corresponding email addresses.

To edit the exported CSV file:

  1. On your computer, open the exported segment file in Excel.

  2. Enter Yes in every cell in the POTENTIAL_DUPLICATE column.

  3. Save the file to your computer.

To reimport the edited CSV file:

  1. Go to Audience > Contacts, then expand the NEW CONTACT drop-down menu and select Import contacts.

  2. For File, select CHOOSE FILE and select the CSV file that you edited in the previous step.
    Optionally, for Email address to notify, enter an email address to receive a notification when the import is complete.

  3. Expand the Encoding type drop-down menu, then select Unicode (UTF-8).

  4. Select UPLOAD.

  5. ⚠️Under Data mapping, you must map these two fields only:

    1. Map the custom data field you previously stored mobile numbers in to MobileNumberId.

    2. Map POTENTIAL_DUPLICATE to potential_duplicate.

    You must not map any other fields. Set any other fields on the Data mapping page to Skip column.⚠️

  6. Select FINISH.

5. Remove duplicate contacts

If you want to keep data field or list information from your contacts with only a mobile number, then add it to a unified contact when matching up email and SMS data, complete the steps in Merging to unified contacts: keep contact information from mobile number-only contacts before you proceed with Step 5.

Next, we generate a segment for your potential duplicates, so that we can identify and delete them.

  1. Create a new segment called Potential duplicates.

    To learn more about creating a segment, check out the article Create a segment.

  2. Drag the data field block onto your segment Include area. Then select the block to open the rule settings.

  3. Select the data field POTENTIAL_DUPLICATE.

  4. Expand the rule drop-down menu, select Is yes, then select OK.

  5. Drag the data field block onto your segment Exclude area. Then select the block to open the rule settings.

  6. Select the data field Email.

  7. Expand the rule drop-down menu, select Is not empty, then select OK.

  8. Select SAVE, then GENERATE SEGMENT.

Before proceeding

Your segment must not contain any contacts with an email address. If it does, then do not complete this step, and contact your Customer Success Manager or our Support team.

  1. Go to Audience > Segments.

  2. Select the Potential duplicates checkbox.

  3. Expand the MORE ACTIONS drop-down menu and select Convert to list.

  4. Go to Audience > Lists, select the checkbox for the Potential duplicates list, then expand the MORE ACTIONS drop-down menu, then select Remove selected contacts from your account.
    ⚠️This action deletes contacts with just a mobile number and permanently erases their engagement data. If you're unsure, contact your Customer Success Manager or our Support team for help.

  5. Confirm you understand the conditions, then select DELETE CONTACTS.

  6. Periodically refresh the Lists page until the contact count for the Potential duplicates list reaches zero.

Now, you must empty the recycle bin.

To do this:

  1. Expand the User menu, then go to Settings > General > Recycle bin.

  2. Expand the MORE ACTIONS drop-down menu, then select Empty recycle bin.

⚠️Depending on the number of contacts you are removing from the recycle bin, this process may take some time to complete. We advise that you wait for 15 minutes after emptying the recycle bin before proceeding to the next step.

6. Import your contacts to match data

In this step, we reimport our contacts to match up the data. To do this:

  1. Go to Audience > Contacts, then expand the NEW CONTACT drop-down menu and select Import contacts.

  2. For File, select CHOOSE FILE and select the same CSV file that you edited and uploaded previously.
    Optionally, for Email address to notify, enter an email address to receive a notification when the import is complete.

  3. Expand the Encoding type drop-down menu, then select Unicode (UTF-8).

  4. Select UPLOAD.

  5. Under Data mapping, map the following fields:

    1. Email Address to email

    2. Your custom phone number data field to mobilenumberid

    3. Any other data fields you want.

  6. For Potential_duplicate, expand the drop-down menu and select Skip column.

  7. Select FINISH to merge your contact data.

Did this answer your question?