Extending your assistant with webhooks

A webhook is a mechanism that you can use to call out to an external program based on events in your program. You can use webhooks to make calls from your assistant to an external service or application during a conversation.

You can use the following types of webhooks in your assistant. They are called with every exchange in a conversation between the customer and the assistant:

Webhook comparison
Type Frequency Conditions
Pre-message and Post-message The message processing webhooks are called with every exchange in a conversation between the customer and the assistant. For the message processing webhooks, the conditions to check for must be defined in the external application code. For example, even if your webhook performs a simple language translation, you'd want to use a condition to check the language of the incoming message before you send the text to the translation service.
Log The log webhook is called with each message and its corresponding response. You don't need to define a condition for the log webhook unless you want to filter the messages somehow. In most cases, the goal is to write out every message that is submitted, so the messages can be stored for as long as you want, and analyzed by an external application or service.