Hooks

Hooks are used to export chat statistics to a 3rd party system - e.g. a helpdesk, CRM or your own internal system.

domain-stats-report

Sends number of visits and chat conversations for a given Smartsupp account every hour to a predefined URL. You can use this data to generate your own statistics about Smartsupp chat usage. Data are divided per domain, so if you are using Smartsupp on more domains under one account, you will get the data separately for every domain. Data are send at the start of every hour (8:00, 9:00 etc.) This data are not kept on our servers, so if you don't process them right away on your side, they are gone forever.

How to activate domain-stats-report

Send an email to lukas@smartsupp.com where you specify your custom URL. We will set sending the specified data to that URL.

NameDescription
url Url started with http:// or https://
Request POST: http://api.smartsupp.com/accounts/:aid/hooks/create { "name": "domain-stats-report", "config": { "url": "http://www.your-domain.com/statsreport.php" } }
Response HTTP/1.1 200 OK { "id": "1234", "name": "domain-stats-report", "config": { "url": "http://www.your-domain.com/statsreport.php" } }

Example of the POST request sent every hour. Data are in JSON format.

{ "domains": { "www.your-domain-one.com": { "visits": 87, "conversations": 3, "autoMessages": 2, "autoMessagesReply": 1 }, "www.your-domain-two.com": { "visits": 26, "conversations": 14, "autoMessages": 2, "autoMessagesReply": 1 } } }