Webhooks
Last updated
Last updated
When building digital assistants it's often the case that you need to connect to external systems to either pull or push information. This might be for fetching the status of a request, or submitting the users form data to start a process. are used as a means of calling out to these external services to handle the information collected.
To setup a webhook you will need the URL for the HTTP API that will be sent the data from the conversation. This will need to be provided via an https interface.
Add the URL to the Webhook
tab of the Settings
page. The JWT
token next to the URL input can be used to validate that the request has originated from IntelAgent, so that you can handle any other requests accordingly.
Once enabled, any function blocks or forms will automatically post the information collected through the form to this webhook URL. It is your responsibility to ensure that this API returns valid information, and handles any error or edge cases as needed.
Only one Webhook URL can be provided for each bot and so the handler-name
on each block is used to distinguish between different parts of the same conversation. Using this handler name we can register different handlers to handle different events. In the image above, the handler name provided is submit-feature-request
.
More information about building an HTTP API can be found in our SDK documentation.