Skip to main content

Create a cloud profile sync

Keep the cloud profile current so triggered journeys always send to the right address with the right data. A cloud profile sync runs a SQL query against your data warehouse and loads the results into the cloud profile, matching recipients on RecipientId. Run it on a recurring schedule, on demand, or both.

You can create as many syncs as you need. For example, one sync can load email addresses and loyalty tiers from a customer table every hour, while a second loads mobile user IDs from an app installs table once a day. Each sync only adds or updates the recipients and attributes its own query returns. For more information about how the cloud profile stores this data, see Cloud profile overview.

Version notice

Cloud profile syncs are available in Accelerator version 26.4.2.


Before you begin​

  • Provision a Managed Data Schema - Syncs run on the Managed Data Schema connection. If no Managed Data Schema is provisioned, the sync page displays A provisioned Managed Data Schema is required and you can't build or save the sync. For more information, see Managed Data Schema.
  • Check your role - Creating, editing, and running syncs requires the Data Engineer role at the Standard or Admin level. For more information, see User roles.
  • Prepare your query - The query must return one row per recipient, with a column that holds RecipientId. Every column you don't map to a recipient or channel field becomes a custom attribute, so return only the columns you want to personalize with.

MessageGears stores the tables it uses to track changes between runs in your Managed Data Schema. You don't need to create a separate schema for them.


Create a sync​

To create a sync:

  1. Select Admin > Data > Cloud profile, then select the Syncs tab.
  2. Select Add sync.
  3. In the Add cloud profile sync dialog, enter a Name and an optional Description, then select Save.

The sync opens on the Query tab. Sync names must be unique and can be up to 75 characters.

Cloud profile Syncs tab with the Add sync button and a list of syncs showing Status, Last sync and duration, Last modified, and Sync now buttons
Cloud profile Syncs tab

Configure the query​

On the Query tab, under Configure cloud profile sync, write the SQL query the sync runs. The query runs on your Managed Data Schema connection.

To check the results before you save, preview the query. The preview shows a sample of rows and the data type of each column.

If you open a sync that was saved against a different database connection, the page displays This sync moves to the Managed Data Schema connection when saved. Because the connection changes, the query can fail or return different columns. Before you save, refresh the columns so your field mappings still work, and preview the results.

Query tab of a cloud profile sync with a SQL query in the editor and Preview results showing RecipientId, EmailAddress, MobileUserId, Phone, and custom columns
Query tab with preview results

Map recipient and channel fields​

In the Recipient & channel fields section, map query columns to the reserved attributes that identify each recipient and the channels triggered messages send on:

FieldPresenceDescription
Recipient IDRequiredThe column that holds each recipient's RecipientId. MessageGears matches recipients on this value, so a sync updates existing profiles instead of creating duplicates.
Email addressOptionalThe column that holds the recipient's email address. Required for triggered email messages.
SMS addressOptionalThe column that holds the recipient's phone number. Required for triggered SMS and MMS messages.
Mobile appRequired for each mobile app you addThe app whose push and inbox notifications this mapping supports. Appears after you select Add mobile app in the Mobile apps section.
Mobile user IDRequired for each mobile app you addThe column that holds the recipient's mobile user ID for the selected app. Required for triggered push and inbox notifications.
Recipient channel preferenceOptionalThe column that holds the recipient's preferred channel, from your own models.

To map a mobile user ID, in the Mobile apps section, select Add mobile app, select the Mobile app, then select the column that holds the Mobile user ID for that app. To support more than one app, select Add mobile app again for each app.

Recipient & channel fields section with Recipient ID, SMS address, and Email address fields, a Mobile apps section with Mobile app and Mobile user ID fields and an Add mobile app button, and a Recipient channel preference field
Recipient & channel fields section

Map every channel you want triggered journeys to send on. The canvas only offers a channel for a real-time message when a sync maps that channel's field. For each recipient, MessageGears sends to the identifiers in their cloud profile record if they have one, so a recipient whose record has no identifier for a channel can't receive messages on that channel. Identifiers in the journey's entry event are used only for recipients with no cloud profile record.


Review the column mapping​

Every other column in the query becomes a custom attribute. The Column mapping section lists each column with its Data type and a Status that compares it with any existing attribute of the same name. Names aren't case-sensitive.

StatusMeaning
New attribute - will be created as typeNo attribute has this name yet. The sync creates it with the type shown on its first run.
New attribute - final data type is set on first run.No attribute has this name yet, and the column holds complex data whose type is confirmed only when the sync runs.
Matches existing attributeAn attribute with this name and type already exists. The count shows how many syncs update it.
Data type mismatch - existing attribute is typeAn attribute with this name exists with a different type. The attribute keeps its original type, and MessageGears stores the values as they arrive, without converting them.
UnverifiedThe column holds JSON, object, array, or variant data that can't be compared before the sync runs. Check that the structure matches the existing attribute.

The status is for your information and doesn't block saving. If any columns don't match, a banner shows the number of data type mismatches found. To fix a mismatch, update your query so the column returns the existing type.

If you change the query, select Refresh to update the column list. Columns the query no longer returns are removed from the mapping.

Recipient and channel fields mapped to query columns, and the Column mapping section listing each column with its Data type and a Matches existing attribute or New attribute status
Recipient and channel fields and Column mapping

Schedule the sync​

On the Sync schedule tab, choose how and when the sync runs.

Sync execution type​

OptionUse it to
Incremental SyncProcess only the records that changed since the last run. This is the default, and we recommend it for ongoing scheduled syncs.
Full SyncReprocess every record the query returns. Use it to backfill a new attribute, recover from a failed run, or rebuild after you change the sync's configuration.

Neither type deletes profiles or clears values for recipients the query doesn't return.

Refresh cadence​

  • Recurring - The sync runs on the schedule you set. Next refresh shows when the next run starts. Recurring syncs show as Active on the Syncs tab.
  • Unscheduled - The sync runs only when you select Sync now. Unscheduled syncs show as Inactive.

Notification email​

In the Notification email section, enter an email address to alert whenever a sync run fails.

After you configure the sync, select Save.


Run a sync now​

To run a sync immediately, whatever its schedule, select Sync now. Sync now is unavailable while the sync is already running and for archived syncs.


Review sync history​

The History tab lists each run of the sync:

ColumnShows
Start time and End timeWhen the run started and finished.
No. records syncedThe number of records the run added or updated.
Extraction typeHow the run read your data. See the following list.
StatusCompleted, Failed, or Skipped.
Additional detailsSelect View details to see the SQL that ran and, for failed runs, the full error.

Each run uses one of three extraction types:

  • Initial - Reads every record and starts tracking changes. MessageGears runs an initial extraction on the first run, after you change the query, its mappings, or the connection, after a failed run, and after you switch back from Full Sync.
  • Differential - Reads only the records that changed since the last run.
  • Full - Reads every record, on every Full Sync run.

A Skipped run started while a previous run was still in progress, so it didn't run.

Sync history tab listing runs with Start time, End time, No. records synced, Extraction type (Initial or Differential), Status, and View details
Sync history tab

Manage syncs​

From the â‹® menu on the Syncs tab, you can:

  • Edit - Open the sync. With read-only access, this option is View.
  • Duplicate - Copy the sync's configuration into a new sync.
  • Archive or Unarchive - Hide a sync you no longer run. Scheduled syncs can't be archived, so set the sync to Unscheduled first.
  • Delete - Remove the sync permanently. Deleting a sync only stops future runs. Existing cloud profile data isn't affected.

To remove the attributes a deleted sync created, delete them on the Attributes tab. For more information, see Cloud profile overview.