Resource
GET https://demo.com/customers?email=$EmailAddress&phone=$PhoneNumber
Parameters: $EmailAddress, $PhoneNumber
We call Endpoint 1:
1. Every time a ROBIN Agent opens a conversation.
Endpoint
The first endpoint has been designed to showcase the details of the customer. This endpoint gives the ROBIN Agent a general overview of who the person is and his history with the company.
The Minimum response
The minimum response from endpoint 1 consists of 1 part; this is to show the general overview of who the person is.
{
"name": "John Doe",
"phone_number": "+31612345678",
"email_address": "email@address.com",
"customer_since": "2014-01-28",
"total_spent": "$154.95",
"order_count": 12
}
This JSON output will showcase the following user profile:
You’ve now setup the minimum response for endpoint 1. The ROBIN Agent can now see if the visitor is a customer! In the next chapter, extending endpoint 1, you will be shown how you can add even more information to the customer.
Schema of Endpoint 1
Key | Type | Required | Description | Example |
---|---|---|---|---|
name | String | Yes | Returns the full name from the customer | "John Doe" |
email_address | String | Yes | Returns the email address from the customer | "email@address.com" |
phone_number | String | Yes | Returns the phone number from the customer | "+31612345678" |
customer_since | String | Yes | Shows the date when the customer purchased his first order Date format is: "YYYY-MM-DD" | "2014-01-28" |
total_spent | String | Yes | Returns the total amount the customer has spend at the store(s) | "$154.95" |
order_count | Float | Yes | Returns the total amount of orders the customer has at the store(s) | 12 |
panel_view | Object | No | A JSON object to put custom fields in to show more information about the customer | { } |
customkey | String | No | This variable is placed inside panel_view. You can rename the key and the value to anything you'd like -- as long as the value is returned in a string form | "Custom value" |
F.A.Q
- My Endpoint doesn’t show any information.
Most of the time this is because of a missing required field or closing the JSON incorrectly.