User Object

This document explains the user object.
See the example of the user object.

id

typedescription
stringThe id of a user.

memberId

๐Ÿ“˜

To create a member user, you have to use memberId.

See the memberId of the boot option and boot.

typedescription
stringThe id used for identifying a member user.
If you set memberId in the boot option, the user is regarded as a member user.

name

typedescription
string | undefinedThe name of a user.
Set by updateUser.

avatarUrl

typedescription
stringThe avatar image URL of a user.

alert

typedescription
numberThe number of messages the user has not yet read.

profile

typedescription
object | undefinedA userโ€™s profile information.
Set by updateUser or profile of boot option.

๐Ÿ“˜

onFollowUpChanged registers a callback invoked when the user changes his profile.

unsubscribeEmail

typedescription
booleanWhether to unsubscribe the marketing email.
Set by updateUser or unsubscribeEmail of boot option.

unsubscribeTexting

typedescription
booleanWhether to unsubscribe the marketing email.
Set by updateUser or unsubscribeTexting of boot option.

tags

typedescription
string[]The tags of a user.
Always lowercase.
Set by updateUser, addTags, and removeTags.

language

typedescription
stringThe language of a user.
Used for translation.
Set by updateUser and language of boot option.

Following 32 languages supported.
: 'de'(German), 'hi'(Hindi), 'no'(Norwegian), 'ru'(Russian), 'fi'(Finnish), 'pt'(Portuguese), 'hr'(Croatian), 'fr'(French), 'hu'(Hungarian), 'uk'(Ukrainian), 'sk'(Slovak), 'ca'(Catalan), 'sv'(Swedish), 'ko'(Korean), 'id'(Indonesian), 'ms'(Malay), 'el'(Greek), 'en'(English), 'it'(Italian), 'es'(Spanish), 'he'(Hebrew), 'zh'(Chinese), 'cs'(Czech), 'ar'(Arabic), 'vi'(Vietnamese),'th'(Thai), 'ja'(Japanese), 'pl'(Polish), 'ro'(Romanian), 'da'(Danish), 'nl'(Dutch), 'tr'(Turkish)

Example

{
    "id": "USER_ID",
    "memberId": "MEMBER_ID",
    "name": "USER_NAME",
    "avatarUrl": "AVATAR_URL",
    "alert": 0,
    "profile": {
      "name": "USER_NAME",
      "email": "USER_EMAIL",
      "mobileNumber": "+821012345678",
      "CUSTOM_VALUE_1": "VALUE_1",
      "CUSTOM_VALUE_2": "VALUE_2"
    },
    "unsubscribeEmail": true,
    "unsubscribeTexting": true,
    "tags": ["TAG_1", "TAG_2"],
    "language": "ko"
}