Chatlio Webhooks

Integrating Chatlio with other systems via webhooks

Webhooks provide a nice way to get data out of Chatlio and into your existing systems. Chatlio provides the following webhooks.

  1. Exporting chat transcripts
  2. Exporting offline messages
  3. New conversation has started
  4. Visitor did not get an answer in time
  5. Visitor left feedback after a chat

Chatlio also has a Zapier app, that allows you to integrate Chatlio with over 500+ apps like Zendesk, Salesforce, etc.

Some example use cases of Chatlio webhooks:

  • Send transcripts to Zendesk
  • Receive text message when a new visitor would like to chat
  • Send offline messages to Zendesk
  • Make a siren go off when a new visitor has started chat
  • Build a custom escalation flow to ensure no chat goes unheeded
  • Text management with user feedback as soon as it comes in

You can point Chatlio webhooks at your own endpoints or use our Zapier app.

To get started with Zapier, start by going here. Follow Zapier instructions to setup new Zap. When you receive a webhook url from Zapier put that in the appropriate spot in the Chatlio dashboard. The next step is to configure the Zapier action step to set where you want to forward the data. Contact us below via the Chatlio widget for any questions or problems with Zapier setup.

If you are setting up your own endpoint for integration, here is a sample of the webhook data posted.

Webhook payload

Example JSON payload for these webhooks: “new conversation started”, “visitor left feedback” and “unanswered visitor message”:

{
    "visitor": {
        "email": "",
        "UUID": "2d3f4260-2235-903b-0a82-a23d326cc257",
        "name": "",
        "identUserId": "",
        "identTraits": "",
        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.28 Safari/537.36",
        "handle": "united-states-27",
        "currentPage": "http://yoursite.com/signup",
        "referrerURL": "",
        "createdAt": "2016-02-07T11:02:17.839766-08:00",
        "IPAddress": "175.24.144.21",
        "location": "Los Angeles, California, United States"
    },
    "message": "Hi, I am having trouble signing up",
    "conversationUUID": "e3d1800d-2d9e-4966-4500-9ff986cfa197",
    "channelId": "C1NABCDEF",
    "slackChannelName": "live-chat",
    "slackChannelId": "C1XPVTNKR"
}

Webhook payload: New offline message

Example JSON payload sent to the “new offline message” webhook:

{
    "name": "Bob Smith",
    "email": "bob@smith.com",
    "emailPretty": "\"Bob Smith\" <bob@smith.com>",
    "message": "I just want to say I love your service!",
    "visitor": {
        "email": "bob@smith.com",
        "UUID": "2d3f4260-2235-903b-0a82-a23d326cc257",
        "name": "Bob Smith",
        "identUserId": "user1234",
        "identTraits": "{\"custom stuff\":\"things\"}",
        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.28 Safari/537.36",
        "handle": "united-states-27",
        "currentPage": "http://yoursite.com/signup",
        "referrerURL": "",
        "createdAt": "2016-02-07T11:02:17.839766-08:00",
        "IPAddress": "175.24.144.21"
    }
}

Webhook payload: Chat transcripts

Example JSON payload:

{
  "agentEmail": "someone@yourcompany.com",
  "agentName": "Some One",
  "archiveUrl": "https://yourcompany.slack.com/archives/cl-tiger128",
  "extraData": [
    "extra",
    "stuff",
    "here"
  ],
  "channelId": "C03FVS2UR",
  "channelName": "costa-mesa-california-us-133",
  "conversationUUID": "e3d1800d-2d9e-4966-4500-9ff986cfa197",
  "endedAt": "2018-05-19T18:14:32.000026941+02:00",
  "chatRating": "up",
  "chatFeedback": "Great support, will use again!",
  "htmlBody": "<HTML output of transcript will be in here, useful for simply display chat conversation in external system that accepts HTML>",
  "textBody": "<Text output of transcript will be in here, useful for simply display chat conversation in external system that accepts plain text messages>",
  "messages": [
    {
      "text": "Hi! I love your webhooks!",
      "ts": "1469725409.000005",
      "sentAt": "2016-07-28T19:03:29.000005006+02:00",
      "userId": "",
      "username": "costa-mesa-california-us",
      "isVisitorMsg": true
    },
    {
      "text": "Great, thanks for letting us know!",
      "ts": "1469725427.000007",
      "sentAt": "2016-07-28T19:03:47.000006914+02:00",
      "userId": "U0N2GKA2G",
      "username": "Some O.",
      "isVisitorMsg": false
    }
  ],
  "startedAt": "2015-07-19T14:38:15.560106+02:00",
  "visitorEmail": "",
  "replyToEmail": "no-reply@chatlio.com", // We use the visitor email here if we have it.
  "visitorName": "costa-mesa-california-us-133",
  "visitorTraits": {
    "current_page": "http://yourcompany.com/the-shop",
    "time_on_page": "30min",
    "logged_in": "false"
  },
  "visitor": {
    "email": "",
    "UUID": "2b959179-d06f-4fec-9c6e-1c98468d1d63",
    "name": "",
    "identUserId": "",
    "identTraits": "",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2809.0 Safari/537.36",
    "handle": "costa-mesa-california-us-133",
    "currentPage": "http://chatlio.com/docs",
    "referrerURL": "",
    "createdAt": "2016-07-28T19:03:11.080407+02:00",
    "IPAddress": "64.145.94.51",
    "location": "Costa Mesa, California, United States"
  },  
  "slackTeamID": "T0N1FQTOD"
}

The extraData key contains anything entered after the chatlio-command issued to send the webhook, eg /chatlio send-to-webhook extra stuff here. Useful for custom tagging.

The ts key included with each message is the original Slack-style timestamp that also works as a sort of “message ID”. Use this if you need to match up the Chatlio webhook with the message in Slack using the Slack API directly.

For more details about sending chat transcripts via webhooks, see chat transcripts doc.

How to setup webhook on Zapier

Here is an example of forwarding Chatlio offline messages to Zendesk.

Approve the Chatlio Zapier app. Then create a new “Zap” by searching for Chatlio by searching under “Choose a Zapier App”

Step 1

Step 2, choose the event you want to forward, eg. New offline message

Save the webhook url Zapier provides in Chatlio dashboard under location that matches.

Trigger a sample offline message in Chatlio and wait for Zapier to see it.

After Zapier sees your test offline message

Now the fun begins, choose the 3rd party app you want to forward offline messages to. Example, here is Zendesk.

Depending on the action app you choose follow the specific instructions for that app. But using Zendesk example map the fields from Chatlio to ZD

Turn on your Zap and give it another test. You should be good to go.

Don’t hesitate to contact us using the Chatlio widget below for more help.

:(
Your browser is out-of-date!

This website is built using latest technogies. Unfortunately your browser doesn't support those. Please update your browser to view this website correctly. Thank you.Update my browser now