A webhook is the URL of a web service that you can add to any intent on your agent.
During the chat with the agent, once the intent that contains the URL will be matched and all the required parameters are filled, the service will be called and it’s response will return to the user.
Webhook integration allows you to pass information from a matched intent into a web service and get a response. Webhooks are used to log and deliver information collected by your agent to your service, database, or other information storage tool. Webhooks are URLs that that can be implemented in any intent your agent contains. Webhooks can perform many types of actions, such as log the data, build your response to the user based on data stored in a database or data returned from other APIs, etc.
The URL used for accessing your web service should be a public URL.
When an intent in which a webhook was enabled is triggered, over.ai sends data to the service in the form of POST request with a POST body in the format of response to query. The key component that the JSON contains is the NLU response node. Other parts of the JSON will contain other valuable user information (when available).
The service should be able to handle the following errors:
Timeout for service response – 5 seconds
Data received in the response from the service – up to 64K