1. Home
  2. Docs
  3. Dynamic Integration
  4. Endpoint 1 – Retrieving customer info based on an email address

Endpoint 1 – Retrieving customer info based on an email address

Resource

GET https://demo.com/customers?=$EmailAddress or https://demo.com/customers?=$PhoneNumber
Parameters: $EmailAddress, $PhoneNumber

 

We call Endpoint 1 when:

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.

{
    "name": "John Doe",
    "phone_number": "0031 612345678",
    "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:
Showcase of Endpoint 1 required

 

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

KeyTypeRequiredDescriptionExample
nameStringYesReturns the full name from the customer"John Doe"
email_addressStringYesReturns the email address from the customer"email@address.com"
phone_numberStringYesReturns the phone number from the customer"0612345678"
customer_sinceStringYesShows the date when the customer purchased his first order
Date format is: "YYYY-MM-DD"
"2017-10-28"
total_spentStringYesReturns the total amount the customer has spend at the store(s)"$154.95"
order_countFloatYesReturns the total amount of orders the customer has at the store(s)12
panel_viewObjectNoA JSON object to put custom fields in to show more information about the customer{ }
customkeyStringNoThis 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.

Articles