User Profile Settings

How to set user property information using DFINERY SDK. SDK integration must be done first.

User property information

Before you start

Before setting user attribute information, create and link user profile attributes in the DFINERY console. User profile attributes can be created in Additional Settings / Data Linkage / Attribute Management / User Profile Attribute List.

Note

  • If an unregistered user profile or an incorrect type of user profile attribute is recorded, the user profile will not be set.

  • Array of String You can create up to 10 user profile properties of a type.

  • Array of Long, Array of Double you can create up to 5 types.

  • There is no limit to the number of values ​​entered, but the total size cannot exceed 8KB.

Setting user property information

setUserProfile

Set user property information by calling one of the following methods:

func set(userProfiles: [String: Any])

func setUserProfile(key: String, value: Any?)

Each parameter means:

  • userProfiles: A dictionary with user attribute information names and values.

  • key: User property information name

  • value: User property information value

Example of use

Dfinery.shared().setUserProfile(key: DFUserProfile.GENDER, value: DFGender.MALE)
            
Dfinery.shared().setUserProfile(key: "custom_key", value: "custom_value")
            
Dfinery.shared().set(userProfiles: [DFUserProfile.NAME: "Jimmy",
                                    "custom_user_profile": 100])

Standard user property information

For standard user property information, the profile name is provided as a predefined static constant as follows:

Constant name
User property information
Input value type

DFUserProfile.NAME

df_name

String

DFUserProfile.BIRTH

df_birth

String(yyyy-MM-dd)

DFUserProfile.MEMBERSHIP

df_membership

String

DFUserProfile.GENDER

df_gender

DFGender.xxxxx(String)

Consent to receive notifications is part of the user profile and you can set consent values ​​for various channels.

User profiles for consent to receive notifications are automatically registered when creating a service in DFINERY, so they can be set up without having to set them in the DFINERY console.

  • Support Type

    • key: Notification consent type (DFUserProfile)

    • value : Boolean

Example of use

Dfinery.shared().setUserProfile(key: DFUserProfile.PUSH_OPTIN, value: true)
Dfinery.shared().setUserProfile(key: DFUserProfile.PUSH_ADS_OPTIN, value: true)
Dfinery.shared().setUserProfile(key: DFUserProfile.PUSH_NIGHT_ADS_OPTIN, value: false)

//or

Dfinery.shared().set(userProfiles: [
    DFUserProfile.PUSH_OPTIN: true,
    DFUserProfile.PUSH_ADS_OPTIN: true,
    DFUserProfile.PUSH_NIGHT_OPTIN: false,
])
Designation
Channel
Explanation

DFUserProfile.PUSH_OPTIN

push

Consent to receive informational notifications for push channels

DFUserProfile.PUSH_ADS_OPTIN

push

Consent to receive promotional notifications for push channels

DFUserProfile.PUSH_NIGHT_ADS_OPTIN

push

Consent to nightly promotional notifications for push channels

DFUserProfile.SMS_ADS_OPTIN

message

Consent to receive promotional notifications for text channels

DFUserProfile.KAKAO_ADS_OPTIN

Friend Talk

Consent to advertising notifications for Kakao Friends Talk channel

Last updated