Resource
GET https://demo.com/customerlifetime?email=$Email
Parameters: $Email
We call Endpoint 5 when:
1. Every time a customer opens a conversation.
Endpoint
The “Customer Lifetime” endpoint shows the total amount of orders and the total amount of revenue per customer.
What is important to know
1. Endpoint 5 works in combination with the Customers POST
The Minimum response
The minimum response from endpoint five consists of just one response
Situation 1: A customer opens his first conversation
Down below is the JSON you need to give as a response.
Situation 1: A customer opens his first conversation
{
"email_address": "email@address.com",
"customer_since": "2017-01-12T12:34:56Z",
"order_count": 12,
"currency": "$",
"total_revenue": 154.95,
"last_order_date": "2018-04-05T12:34:56Z"
}
At this point you’re not yet done with Customer Lifetime — to finish this you need to set up the Customers POST. This will be explained in the next chapter “Customers POST”.
Schema of Endpoint 5
Key | Type | Required | Description | Example |
---|---|---|---|---|
email_address | string | Yes | Email address from the customer | "email@address.com" |
customer_since | string | Yes | Date of the first order | "2017-01-12T12:34:56Z" |
order_count | integer | Yes | The count of how many orders the customer has | 12 |
currency | string | Yes | Default currency from the customer | "$" |
total_revenue | float | Yes | Total amount of revenue the customer has brought in | 154.95 |
last_order_date | string | Yes | Date of the last order | "2017-04-05T12:34:56Z" |