How customers are represented in Clerk.io
Each Customer is represented as a customer object where each key-value pair corresponds to a Customers attribute name and value. Just as for product objects, customer objects allow you to have any number attributes.
All attribute names must be strings, and values can be either bool
, int
, float
, string
or a list
of the former.
A customer can have any number of attributes but must at least contain the following marked as Required:
Attribute | Type | Required | Description |
---|---|---|---|
customerid | int or str | Optional | The customers ID. Having either customerid or email is required |
email | str | OptionalNeeded for using our Auto-Email and Audience products. | The customers email. Having either customerid or email is required |
name | str | Optional | The customers full name. |
subscribed | bool | Optional | Boolean indicating whether the customer has subscribed to newsletters. This must be true for Clerk.io to send marketing emails to this customer. |
zip | str | Optional | The customers zip code. |
gender | str | Optional | The customers gender. |
age | int | Optional | The customers age. |
is_b2b | bool | Optional | Boolean indicating whether a customer is B2B or not. |
Note that for legacy reasons: Once a customer object has been created with a customerid
and/or email
those two fields cannot be changed. If you need to modify the email address or customerid
of a customer at a later date you have to delete the customer first and then recreate it.