Identity
An immutable Identity class that represents the identity of a user within the Salesforce Marketing Cloud SDK. This class encapsulates user identification information including profile ID, party identification details, and custom attributes.
Getting an Identity Instance
The only way to get an instance of this class is to callSFMCSdk.requestSdk { sdk -> sdk.identity }.Updating Identity
There are two ways to update the identity:Properties
profileId: The unique identifier for the user profile (used by Marketing Cloud Engagement)
partyIdentificationName: The user's display name or full name (used by Mobile App Messaging)
partyIdentificationNumber: A unique identifier number for the user (used by Mobile App Messaging)
partyIdentificationType: The user's category or classification (used by Mobile App Messaging)
attributes: A map of custom attributes associated with the identity (shared by both services)
See also
for creating modified instances
for the Kotlin DSL editing interface
Types
Properties
Functions
Kotlin-only DSL editing syntax for Identity properties through an IdentityEditor. This function provides a convenient way to modify identity properties using Kotlin's DSL syntax.
Creates a new Builder instance with the current identity values, allowing them to be modified. This is the primary way to create a mutable copy of the current identity for updates.
Converts the Identity to a JSONObject representation. This method serializes all identity properties including platform, profile ID, installation ID, party identification details, and attributes into a JSON format.