Avoid Orphaned Contacts

An orphaned contact is a contact that is no longer targetable by the marketer due to the contact becoming disassociated with any known devices in Marketing Cloud Engagement.

The following sections list common scenarios that lead to orphaned contacts in Engagement.

Initializing the SDK without setting sfmc_setDelayRegistrationUntilContactKeyIsSet to true

Initializing the SDK in an app without setting the sfmc_setDelayRegistrationUntilContactKeyIsSet flag to true associates device users with a known identifier.

  • During the first launch of the app, the SDK sends a registration to Engagement. The registration is done before it's possible for an end user to set a contact key.
  • After receiving a registration payload without a contact key, Engagement generates a contact key for the device.
  • At a point in the future (for example, when the end-user logs into their account in the app), the app sets the known contact key in the registration.
  • The device then sends a new registration payload to Engagement, a new contact is created, and the device becomes associated with the new contact.
The application allows for multiple users

Consider a banking app where each user can log into the application and is targeted as an individual user.

  • User A logs into their account in the banking app. The app then sets the contact key in the registration to user.a@example.com.
  • Engagement creates a contact for User A in the contact record.
  • At a point in the future, User B logs into their account on the same device. The app sets the contact key in the registration to user.b@example.com.
  • Engagement then creates a contact for User B in the contact record and associates the device with that contact. The contact for User A is now no longer associated with a targetable device and is now considered "orphaned".

Depending on the design and usage of an application, avoiding orphaned contacts can be difficult. However, you can reduce the likelihood of an orphaned contact being created using the sfmc_setDelayRegistrationUntilContactKeyIsSet configuration flag when initializing the SDK.

The default value for sfmc_setDelayRegistrationUntilContactKeyIsSet is false. However, if you set the flag to true, the SDK doesn't send a registration request to Engagement until the application sets a contact key. For new installs of the application, setting the flag to true prevents an unknown contact from being created in Engagement.

Each contact with a unique ContactKey or SubscriberKey is counted as a distinct contact for billing purposes.