Marketing Cloud SDK / com.salesforce.marketingcloud.registration / RegistrationManager / Editor / setContactKey

setContactKey

@NonNull abstract fun setContactKey(@NonNull @Size(1) contactKey: String): Editor

Setter for contactKey which was formerly known in the SDK as SubscriberKey. The name was changed to align the SDK's nomenclature with the Marketing Cloud Contacts DB.

A ContactKey, once set, may never be unset. If a ContactKey is not provided the Marketing Cloud will generate a random GUID to serve as a ContactKey until one is set by the SDK.

Parameters

contactKey - String: any non-null string with at least 1 non-white space character.

Return
Editor: RegistrationManager.Editor