A great feature about Kindly is the ability to connect to third-party applications. This is achieved using webhooks. Webhooks can be added to any dialogue or fallback, and are simply sent by HTTP POST by the Kindly backend to a specific URL.
chat - If your webhook service requires more information about the chat or the previous messages, this can be fetched from the Chat Log API with a GET request to the url in _links.chat. Read more about the Chat Log API.
source - Source is the name of the chat client that triggered the webhook. It can be one of the following web (chat bubble in the browser), facebook (Facebook Messenger), slack (Slack), app (Application API) or test (app.kindly.ai test chat bubble).
web_path - The current URL path for Kindly Chat web clients, which is useful if you are implementing search and want to bias it towards documents related to the current page.
web_host - The current URL host for Kindly Chat web clients.
web_url - The current URL for Kindly Chat web clients.
An incoming webhook should be answered with a 200 OK JSON response.
Here is an example response showing some of the most common fields.
"reply":"Hello from server!",
"image_alt_text":"Optional alternative text for image",