Skip to content

Commit 8d05bd5

Browse files
authored
Changes to the chat webhooks guide
1 parent cad7011 commit 8d05bd5

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
lines changed
231 KB
Loading
184 KB
Loading
223 KB
Loading

src/pages/getting-started/app-guides/chat-webhooks/index.mdx

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ desc: "Use chat webhooks to get notified about the events, for example, when the
99

1010
## Introduction
1111

12-
This document explains how to configure the **Chat Webhooks** building block in <Placeholder id="DEVELOPER_CONSOLE_URL" />. It was written for everyone aiming to configure webhooks in their integrations **via user interface** instead of calling the LiveChat [Configuration API](/management/configuration-api/#webhooks) directly. The document assumes you're already familiar with the general idea of webhooks. It applies to the **Chat webhooks** (v3.3 or later).
12+
This document explains how to configure the **Chat Webhooks** building block in <Placeholder id="DEVELOPER_CONSOLE_URL" />. It was written for everyone aiming to configure webhooks in their integrations **via user interface** instead of calling the LiveChat [Configuration API](/management/configuration-api/#webhooks) directly. The document assumes you're already familiar with the general idea of webhooks.
1313

1414
Keep in mind that the Chat Webhooks building block allows you to configure the `license` webhooks, and that is what this document focuses on. The document doesn't apply to the `bot` webhooks.
1515

@@ -57,41 +57,54 @@ As a developer, you need to handle the authorization flow in your app. For a bac
5757

5858
Configuring chat webhooks in Developer Console is equivalent to calling the [Register Webhooks](/management/configuration-api/#register-webhook) method from the Configuration API. In both cases, all your registered webhooks will be automatically enabled for each license that installs your app and grants it access.
5959

60-
The configuration of the Chat Webhooks building block is a three-step process and involves the following aspects:
60+
The configuration of the Chat Webhooks building block is a four-step process and involves the following aspects:
6161

6262
- [Webhook URL](#webhook-url)
6363
- [Secret key](#secret-key)
64+
- [Webhook type](#webhook-type)
6465
- [Webhook triggers](#webhook-triggers)
6566

6667
<div style={{maxWidth:"600px"}}>
67-
<img alt="LiveChat" src="/images/getting-started/app-guides/chat-webhooks/livechat-webhook-configuration.png" width="600px" height="707px"/>
68+
<img alt="LiveChat" src="/images/getting-started/app-guides/chat-webhooks/livechat-webhook-configuration.png" width="831px" height="1024px"/>
6869
</div>
6970

71+
Once a webhook is added, you won't be able to edit it. If you need to make any changes to its configuration, you’ll need to re-register the webhook with the new settings.
72+
7073
#### Webhook URL
7174

72-
All the webhooks will be sent to the URL you provide in the **Webhook URL** field. That's likely the address of your backend service, but you can use [https://webhook.site](https://webhook.site) for testing.
75+
All the webhooks will be sent to the URL you provide in the **Webhook URL** field. That's likely the address of your backend service, but you can use [https://webhook.site](https://webhook.site) for testing. Each of added webhooks can be sent to a different URL.
7376

7477
#### Secret key
7578

76-
We'll include your **secret key** in the payload of each webhook. This way, your application can verify the webhooks came from us. Make sure you save the generated secret key as it will disappear after you refresh the page. If needed, you can always regenerate a new key or paste your old one in the **Secret key** field.
79+
We'll include your **secret key** in the payload of each webhook. This way, your application can verify the webhooks came from us. Make sure you save the generated secret key as it will disappear after you refresh the page. If needed, you can always regenerate a new key or provide a custom one in the **Secret key** field.
80+
81+
#### Webhook type
82+
83+
You can select from two options: `license` or `bot` webhooks. Bot webhooks let you configure automated bots that react to specific events. This tutorial focuses on the `license` webhooks, but you can read more about `bot` webhooks in [this tutorial](https://platform.text.com/resource-center/updates/setting-up-livechat-bot-webhooks).
7784

7885
#### Webhook triggers
7986

80-
Then, choose **webhook triggers**, the actions that will cause sending a webhook to the Webhook URL every time a specific event occurs. For the majority of events, you can also select a filter.
87+
Then, choose the **webhook trigger**, the action that will cause sending a webhook to the Webhook URL every time a specific event occurs. For the majority of events, you can also select a filter.
88+
89+
<div style={{maxWidth:"700px"}}>
90+
<img alt="LiveChat webhooks" src="/images/getting-started/app-guides/chat-webhooks/livechat-multiple-webhooks.png" width="666px" height="578px"/>
91+
</div>
8192

8293
- [The list of available webhooks](/management/webhooks/#available-webhooks)
8394
- [The list of webhook filters](/management/configuration-api/#triggering-actions)
8495

96+
You can add only one trigger per webhook, but you can add multiple webhooks in one Chat Webhooks block. Each of the webhooks has its own ID.
97+
8598
### End result
8699

87100
Thanks to such a setup, webhook will be automatically enabled for users who install your app from the Marketplace once it is published.
88101

89102
### Testing chat webhooks
90103

91-
To test your webhooks, go to the **Private installation** tab and click **Install app**. If you used **Direct installation URL**, you'll see a popup window displaying the contents from your app (This is the stage of receiving `code` that you need to exchange it for `token`. In production-ready apps, your app should automatically close the window when authorizing a user. Then, perform the action that's your webhook trigger, for example, start a chat if you selected the `incoming_chat` webhook.
104+
To test your webhooks, go to the **Private installation** tab and click **Install app**. If you used **Direct installation URL**, you'll see a popup window displaying the contents from your app (This is the stage of receiving `code` that you need to exchange it for `token`.) In production-ready apps, your app should automatically close the window when authorizing a user. Then, perform the action that's your webhook trigger, for example, start a chat if you selected the `incoming_chat` webhook.
92105

93106
<div style={{maxWidth:"700px"}}>
94-
<img alt="LiveChat" src="/images/getting-started/app-guides/chat-webhooks/livechat-testing-webhooks.png" width="830px" height="420px"/>
107+
<img alt="LiveChat" src="/images/getting-started/app-guides/chat-webhooks/livechat-testing-webhooks.png" width="1201px" height="585px"/>
95108
</div>
96109

97110
## Resources
@@ -104,4 +117,4 @@ Here's a list of useful resources related to webhooks:
104117

105118
## Contact us
106119

107-
If you have any questions or suggestions, feel free to email us at [developers@text.com](mailto:developers@text.com) or ask on our [Discord for Developers](https://discord.gg/NcfJu3a9kM).
120+
If you have any questions or suggestions, feel free to email us at [platform@text.com](mailto:platform@text.com) or ask on our [Discord for Developers](https://discord.gg/NcfJu3a9kM).

0 commit comments

Comments
 (0)