I am trying to figure out if it's possible to get the ContactKey that the SFMC SDK generates when a user installs and opens the app (with DelayRegistrationUntilContactKeyIsSet = false). With val currentRegistration = sdk.sdkState I can see things like deviceID and deviceToken but not the ContactKey that was set.

The use case is to collect events a user makes in the app using Tealium and have the random uuid that SFMC generates included so that we can create calculated insights and link these back to the Contact within SFMC. I guess we can also use the deviceID to link it back but if we have the contact key we can add some additional use cases like trigger a mobile app journey in realtime from Tealium. Would appreciate any help (even if that means explaining why this is a stupid idea if that's the case). Is it possible to get this value through the SDK in some way?

1 Answer 1


I found it in the documentation

"If your app doesn’t set the contact key using sfmc_setContactKey:, Marketing Cloud uses the registration sent with a contact record that matches the system token included in the registration payload. If Marketing Cloud doesn’t find a match, it sets a new contact key and doesn’t send the value back to the SDK."

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .