edit

fun edit(editor: IdentityEditor.() -> Unit): Boolean

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.

Usage Example

SFMCSdk.requestSdk { sdk ->
sdk.identity.edit {
profileId = "John Doe"
attributes += "key" to "value"
}
}

Error Handling

If an exception occurs within the editor block, the edit will fail gracefully and the exception will be logged. The function will return false in this case.

Return

true if the edit was successful, false otherwise. If false, check logs to see if an exception was caught and logged.

Parameters

editor

A lambda function where the receiver is an IdentityEditor to use for editing the identity.

See also

for available editing operations