1. Home
  2. Docs
  3. Dynamic Integration
  4. [Customer Lifetime] Endpoint 5 – Retrieving customer lifetime information

[Customer Lifetime] Endpoint 5 – Retrieving customer lifetime information

Resource

GET https://demo.com/customerlifetime?=$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

KeyTypeRequiredDescriptionExample
email_addressstringYesEmail address from the customer"email@address.com"
customer_sincestringYesDate of the first order"2017-01-12T12:34:56Z"
order_countintegerYesThe count of how many orders the customer has12
currencystringYesDefault currency from the customer"$"
total_revenuefloatYesTotal amount of revenue the customer has brought in154.95
last_order_datestringYesDate of the last order"2017-04-05T12:34:56Z"