1. Query examples
Here is how a query is structured.
Reminder: you can find a list of all the resources accessible from the REST API here.
To get the number of contacts handled via the Chat channel in March 2017 :
To get the turnover associated with each transaction following a chat conversation in March 2017:
To get the turnover generated each day after contact via the Chat channel in March 2017 :
Find a match between my agents' ID and their names :
Find a match between a conversation type's ID and its name :
Find the dates and times of call meeting slots that have been booked :
2. Useful syntax tips
Show as much detail as possible in the answers.
Adding &full=true allows you to deploy all the child objects of a parent object and access the maximum level of detail.
The results provided by our API are paginated for performance reasons. This pagination is detailed at the end of the answer provided by our API.
- "page": the number of the result page being currently displayed. If there are several pages, you will need to make as many queries as there are pages by adding at the end of the query &page=2, &page=3 etc.
- "pages": the total number of result pages for the query formulated.
- "limit": the number of results per page. This limit can be modified (set to be 100 as a maximum), for example, adding &limit=50 to your filters.
- "count": the total number of response occurrences to the query sent.
In the example, we have 79 results spread over 4 pages and each contains a maximum of 20 results (For greater accuracy: 3 pages of 20 results and one page of 19 results).
Filter transactions to only get those generated following a chat conversation.
The iAdvize transaction tag tracks all transactions generated on your website. To only get information about the transactions generated following a conversation, you must add a filter to make sure the transactions displayed have an associated conversation_id.
To do so, you must add &filters[conversation_id]=!null at the end of your query (see, in the examples above, the example which mentions transactions).