User context object

The following table describes the keys in the user context object:

Key

Type

Description

Value

user_id

string

User ID identified by the developer.

Note

You must specify either user_id or uuid to allow user activity tracking and assignment to active experiments if any.

n/a

uuid

string

User ID identified by Discover.

n/a

gender

string

User gender.

male

female

email

string

User email address.

n/a

order_id

list of strings

Order ID associated with the request.

n/a

new_user

boolean

If yes, indicates that the current user is new.

n/a

groups

list of strings

Custom groups or segments assigned to the user.

n/a

custom

custom object

Custom user context. Pass the name of the custom user context as the key (string) and the actual value as the value (string). You can pass more than one key:value pair.

Example:

RequestResponse
{"customID1": "value1",
 "customID2": "value2"}

n/a

Do you have some feedback for us?

If you have suggestions for improving this article,