Customers

Customer entities represent your customers and their attributes. Customer attributes are usually slowly changing or represent high-level information about the customer. For example their email address, first_name, or timezone.

A customer must be sent with at least one identifying field. These fields are: customer_id, email, vuid, *_push_tokens or zaius_alias_* field. If new identifiers are discovered later on they can easily be applied.

zaius.entity("customer",
            {customer_id: "zaius-342",
             email: "johnny.zaius@zaius.com",
             first_name: "Johnny",
             last_name: "Zaius",
             phone: "617-545-5001"}
);
POST /v2/entities
Host: api.zaius.com
Content-Type: application/json
Zaius-Tracker-Id: <YOUR TRACKER ID>

{"type": "customer",
"data": {"customer_id": "zaius-342",
         "email": "johnny.zaius@zaius.com",
         "first_name": "Johnny",
         "last_name": "Zaius"}
}
curl -H 'Content-Type: application/json' -H 'Zaius-Tracker-Id: <YOUR TRACKER ID>' -d '{"type": "customer",
"data": {"customer_id": "zaius-342",
         "email": "johnny.zaius@zaius.com",
         "first_name": "Johnny",
         "last_name": "Zaius"}
}' https://api.zaius.com/v2/entities

All entity calls are additive, meaning you can provide just updated details for a customer. If you wish to unset a field then provide the empty string as the value ("") or your programming language's null symbol (javascript null, ruby nil).

zaius.entity("customer",
            {customer_id: "zaius-342",
             phone: "",
             country: "USA"});

Customer Fields

Zaius has a rich predefined set of fields for customers. You can add new fields to your customer representation using Custom Fields.

Field
Description

customer_id
string

Your unique identifier for this customer. This identifier should come from your database.

email
string

The customer's email address.

name
string

The customer's name. If this field is not provided, but first_name and / or last_name are provided, name is populated from these fields. The name field is displayed in the Zaius customer list and customer report page.

first_name
string

The customer's first name. This field is only populated if provided, i.e., Zaius does not attempt to parse first_name from the name field. Provide this field if, for example, you want to address a customer by their first name in an email greeting.

last_name
string

The customer's last name. This field is only populated if provided, i.e., Zaius does not attempt to parse last_name from the name field.

phone
string

The customer's phone number.

street1
string

The customer's first line of their street address.

street2
string

The customer's second line of their street address.

city
string

The customer's city.

state
string

The customer's state or region.

zip
string

The customer's zip or postal code.

country
string

The customer's country.

timezone
string

The timezone associated with the customer. Must be in Olson format.

gender
string

The customer's gender. Valid values are M for male and F for female.

image_url
string

URL of an image to use for the customer.

Customers


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.