Janmajay
Janmajay

Reputation: 49

How does webhooks get triggered in API.ai

I have an intent in which I have few responses and webhook enabled. I don't understand how the webhook gets triggered all the time and not the static responses mentioned within intent.

How does the API.ai differentiate when to trigger webhook and when to return static response.

Thanks, Janmajay

Upvotes: 1

Views: 143

Answers (1)

Anshul
Anshul

Reputation: 117

API.AI allows you to connect to third party services using webhooks. If you enable the webhook, then the API.AI will always ask the webhook for the response and will show you the response received from webhook.

If for some reason, the webhook query failed, then only the static text response will be displayed.

If however, you don't want to use webhook and instead want to show the static response then you just need to uncheck the webhook checkbox. After that, the static response will be displayed to the user always.

Upvotes: 1

Related Questions