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

Endpoint 2 – Retrieving orders based on an email address

Resource

GET https://demo.com/orders?=$EmailAddress
Parameters: $EmailAddress

 

We call Endpoint 2 when:

1. Every-time a ROBIN Agent opens a conversation

2. Every-time a ROBIN Agent opens the panel “Orders”


Endpoint

The Order List endpoint shows the general points of the order like

  1. Order list in the “Customer” panel — shown below as point 1
  2. Order list in the “Orders” panel — shown below as point 2

Panl Customer and Orders

 

 

The Minimum response

The minimum response from endpoint 2 consists of 2 parts. One part is there to show the orders a customer has, and the second part includes an empty object to prevent an error showing up in ROBIN. Below are the 2 JSON’s shown

1. Minimum response when the customer has one order

{
    "orders":
    [
        {
            "order_number": "RHQO1234",
            "list_view": {
                "order_number": "RHQO1234",
                "date": "29-01-2014 12:34",
                "status": "In progress"
            }
        }
    ]
}

Showcase of Endpoint 2 required

 

 

2. Response when the customer has no order

{
    "orders":
    [ ]
}

End point 2 no orders

 

By adding these two situations, you’ve set up the bare minimum of endpoint 2; Our ROBIN Agent now knows when the customer has zero, one or more orders.
Now let’s see how we can add some more orders and details to our ROBIN Agent who is in dire need of targeted and useful information when the customer has just started the conversation.

 

Schema of Endpoint 2

KeyTypeRequiredDescriptionExample
ordersArrayYesThe parent object to store all order_Number objects in[ ]
order_numberStringYesThe order number has 2 functions
1) It's the title in "Order Details" endpoint 3
2) To fill the variable for Endpoint 3 when the ROBIN Agent wants to see the details of the order
"RHQO1234"
list_viewArrayYesInside list_View you can add custom fields to show information per order in the "customer" and "orders" panel.{ }
custom_keyStringNoAtleast 2 fields are required to ensure ROBIN showcases the order list without lose of User Experience.
We recommend to do not use more than 6 fields to maintain the philosophy behind the endpoint.
"Custom value"

F.A.Q

  • Endpoint 2 only shows the “Loading…” message.
  • I get the error message “Something went wrong when accessing the Dynamic Order list Url.”

 

 

What to consider beforehand:

  • How many orders shall I show?
  • How would I like to arrange all the orders?
  • What information am I going to show?

 

Articles