Skip to main content

Adding a Webhook to a Custom Question

This guide describes how to add a webhook to a custom question.

This guide assumes that your account has the necessary permissions.

Navigating#

These steps begin at the home page the product administrator. The home page should look similar to this picture:

Product Admin

Press the menu button located in the upper-left corner of the home page.

Product Admin - Menu Button

This will bring up the Product Admin menu. Click on the "Knowledgebase" heading to expand it. Then click the "Custom Questions" item.

Product Admin Side Menu

Clicking on the menu item will bring you to the Custom Questions page.

You can use a combination of the search and the pagination buttons to find the custom question to which the webhook will be added. Expand the custom question and press the Edit button

Custom Questions

The button press will bring up the Edit Question dialog.

Populating#

Populate the "Webhook Capability ID" field with the capability that will process the webhook event generated when the chatbot responds using this question's answer.

The Webhook Capability ID should be carefully named. When the webhook handler processes question payloads, the capability ID should be prefixed with "question". Currently only question webhook event types are supported. When search webhook event types come supported and the webhook handler processes search payloads, the capability ID should be prefixed with "search".

Select one of options in the "Webhook Behavior" field. The options are "Supplement Answer" and "Replace Answer". When "Supplement Answer" is selected, the chatbot response will display both the webhook's answer and the custom question's answer. When "Replace Answer" is selection, the chatbot response will display only the webhook's answer.

Edit Questions

Saving#

Press the Save button. This will save the question's webhook configuration. After the save succeeds, the Ocelot chatbot to start utilizing the webhook configuration.

tip

If you don't see the webhook configuration immedately after overriding, please check the Moderation Queue.

When only the webhook configuration is changed, the change will take effect immediately. When additional question fields are changed, the changes might be routed to the Moderation Queue.

Next Steps#

The next step is to implement the webhook capability on one of the registered service providers.