Kindly Docs

Go to App
⌘K
▶️Introduction
🔹Getting started with webhooks
🔹Webhooks reference
🔹Message processing
🔹Pattern dialogues
🔹Context memory
🔹Languages
📄Guides and Examples
◽Checking webhook signatures (HMACs)
◽Example: Chat transcript webhook
◽Kindly Chat authentication
◽Inbox backup to S3 bucket
◽Add the Spinnaker script tag to your site
◽Set up event tracking with Google Tag Manager (GTM)
⚙️APIs
▪️Application API
▪️Chat API
▪️Chat Transcript API
▪️Handover API
▪️Nudge API
▪️Statistics API
▪️iOS SDK
▪️Android SDK
▪️Ticket webhooks (BETA)
📦Legacy
📝APIs Changelog
🛡️Security
©️License and Disclaimer
Docs powered by
Archbee
APIs

Ticket webhooks (BETA)

You can set up webhooks that are triggered on Kindly ticket events. This is useful for e.g. logging customer stories into a third-party tool, building custom analytics, and sending notifications.

Add webhook

Go to your bot's webhook settings (/bot/BOT_ID/settings/developer/webhooks) and follow the form setup instructions.

Note that the setup handshake is done with GET calls. After the webhook is set up successfully all requests to your webhook will be POST.

Ticket event payload

A ticket payload will look something like this:

JSON
|
{
    "_meta": {
        "event": "ticket.updated"
    },
    "ticket": {
        "id": "xxx",
        "status": "SOLVED",
        "assigned_agent": {
            "full_name": "Carl",
            "email": "carl@example.com"
        }
    },
    "bot": {
        "name": "BOT NAME",
        "id": 1
    },
    "chat": {
        "id": "xxx",
        "language_code": "nb",
        "taken_over": false,
        "completed_takeover": false,
        "created": "2019-12-13T15:04:29.134000Z",
        "updated": "2019-12-13T15:04:33.978000Z",
        "messages": [
            {
                "message": "Hi there, I'm a bot, what can I help you with?",
                "sender": "BOT",
                "created": "2020-04-16T11:44:03.438000Z",
                "exchange_id": "0df7f4f3-ac51-431e-ac0e-2887da7d3ef1",
                "name": null
            },
            {
                "message": "Hi, can I talk with a human?",
                "sender": "USER",
                "created": "2020-04-16T11:44:12.398000Z",
                "exchange_id": null,
                "name": "You"
            },
            {
                "message": "An agent has joined the conversation.",
                "sender": "SYSTEM",
                "created": "2020-04-16T11:44:51.193000Z",
                "exchange_id": "008df60e-89af-4cc5-a18a-05377e5cb652",
                "name": null
            },
            {
                "message": "Hi there, I'm Carl, what can I help you with?",
                "sender": "AGENT",
                "created": "2020-04-16T11:44:57.221000Z",
                "exchange_id": null,
                "name": "Carl"
            }
        ],
        "feedback": [],
        "context": {},
        "web_host": "example.com",
        "web_path": "/product/12345/green-sweater",
        "labels": [
            {
                "id": "",
                "name": ""
            }
        ],
        "jwt": {}
    }
}


You can read more about the JWT token format in the Chat API section.

Updated 25 Jul 2023
Did this page help you?
PREVIOUS
Android SDK
NEXT
Statistics API (deprecated)
Docs powered by
Archbee
TABLE OF CONTENTS
Add webhook
Ticket event payload
Docs powered by
Archbee