The user object

The user object contains information about a logged-in user, like their internal ID, email address, postal address, and so on.

Important

The user object can be placed in the context object or directly in the value object. We recommend that you place it in context, as the value.user object is deprecated.

The following are the attributes supported by the user object:

Name

Type

Description

Value

id

string

Required.

Any persistent ID you use to identify the user. Can be a primary key in a user database, or an ID in any system used to manage user info.

Important

id is different from the uuid or user_id attributes, which are anonymous.

n/a

email

string

Optional.

User's email address.

n/a

fbid

string

Optional.

User's Facebook ID.

n/a

eid

string

Required when using email.

User's opaque email ID as identified by your email service provider.

n/a

address

Address object

Optional.

User's postal address information. This is usually also the billing address.

Note

This can be different from the shipping_address attribute, which is provided as part of the checkout object.

n/a

groups

array of strings

Optional.

Custom groups or group segments that are assigned to the user. Strings are free-form.

n/a

gender

string

Optional.

User's gender.

  • male

  • female

  • other

addn_attributes

object

Optional.

A map of customer-specific user attributes.

n/a

The following is an example of the user object:

RequestResponse
"user": {
  "id": "user-1234",
  "email": "[email protected]",
  "eid": "<email_identifier>",
  "address": {
    "address_line_1": "123 Main Street",
    "address_line_2": "apartment 123",
    "state": "CA",
    "zip": "90210",
    "country": "US" 
  },
  "groups": ["group1", "group2"],         
  "gender": "female",     
  "addn_attributes": {            
    "<attr_key1>": "<attr_value1>",            
    "<attr_key2>": "<attr_value2>",              
    ...
  }
}

Do you have some feedback for us?

If you have suggestions for improving this article,