Set user identification information
How to set user identification information using DFINERY SDK. SDK integration must be done first.
Set up
User identification information can be set using DfineryProperties.setIdentity
and DfineryProperties.setIdentities
methods. User identification information is defined in DFIdentity
, and only defined values can be used.
EXTERNAL_ID
In this case, it is recommended to use a fixed value as it is used as an important value to distinguish users among user identification information. Please be careful not to include personal information. If personal information such as email address or phone number is included, it is recommended to encrypt it.
User identification information
DFIdentity.EXTERNAL_ID
User ID
DFIdentity.EMAIL
User's email
DFIdentity.PHONE_NO
User's phone number
DFIdentity.KAKAO_USER_ID
User's Kakao account ID
DFIdentity.LINE_USER_ID
User's Line account ID
Set by item
func setIdentity(key: String, value: String?)
key
: User identification information key (using the DFIdentity constant)value
: User identification information value
Dfinery.shared().setIdentity(key: DFIdentity.EMAIL, value: "[email protected]")
Set multiple items at once
func set(identities: [String: String])
identities
: You must enter the type and value of user identification information in the form ofDictionary<String, String>
. Thevalue
cannot benil
.
Dfinery.shared().set(identities: [
DFIdentity.PHONE_NO: "821012345678",
DFIdentity.EXTERNAL_ID: "external_id"
])
For phone numbers, please enter them in the following format: ex) 821012345678, 82212345678
Reset user identification information
You can call the resetIdentity()
method to remove and initialize any previously stored user identification information.
Please be careful when making calls, as initializing user identification information will interrupt any ongoing event flow and disconnect the terminal from the user.
If you still call, please call the event you want to reflect before calling the API to reflect the collected events.
Dfinery.shared().resetIdentity()
Learn more
If you need more details on user federation, see User Federation Scenarios in Advanced Use Cases.
Last updated