Determine Your Contact Key Strategy

A contact key is a unique identifier that represents an individual in Marketing Cloud and is required when sending messages. In Marketing Cloud Engagement, the contact key is used to map and unify an individual’s identity across Email, MobileConnect, and MobilePush. It also unifies, aggregates, and helps identify each contact’s devices. You can use the SDK to manually specify the contact key. If you don’t specify the contact key, the SDK assigns each contact a random GUID as the contact key. Review these use cases and implications for each option.

Work with your marketing team to determine your contact key strategy. Your strategy can influence your approach to implementing the registration of contacts and devices. It’s also important to decide on your contact key strategy because frequent changes to a user’s contact key can lead to contacts being disassociated or orphaned from a device. It can also cause confusion when sending to contacts, and while troubleshooting implementation and billing issues. Also determine whether to send messages to anonymous users only, known users only, or both.

Message Targeting and Contact Key Timing 

Send to both anonymous and known users

To send to both anonymous and known users, set the contact key after you’ve identified the user (after they create an account and log in), but don’t delay registrations. Sending to both anonymous and known users can cause contacts to become disassociated from a device (orphaned), but your marketer can manage these contacts in Engagement.

Send only to known users

To send only to known users, set the contact key yourself, and delay registration of anonymous users in the SDK until the contact key is set. Delaying registration until after the user is known prevents contacts from being disassociated from a device.

Send only to anonymous users

To send to anonymous users only, don’t set the contact key, and don’t delay registrations.

For information about delaying registrations until the contact key is set, see Contact Dissociation.

Contact Key Selection 

Set the contact key to a specific value provided by your end user or to a unique identifier. Use a value such as a customer ID, mobile number, email address, or loyalty number. This value should be the same identifier that your company uses to identify the user across other Marketing Cloud Engagement channels, such as email and SMS.

The contact key must meet these requirements:

  • It can’t be null or an empty string.
  • It can’t have leading or trailing whitespaces.
  • After it’s set, you can change the contact key for a contact, but you can’t clear it.
  • It must be unique.