Actions
Actions enable conversations applications to interact with the outside world. The inputs they accept are attributes and they provide their response in terms of attributes as well.
Developing a Webhook action
The webhook action allows you to send and receive attributes to/from a webhook URL.
Webhook request structure
Webhook response structure
Successful
Unsuccessful
Examples
Populating attributes
This example models an action which takes first & last name attributes and uses them to populate a full name attribute. As the action response specified that it was successful, this will also automatically populate the action_success
attribute with true
.
Request
Response
Unsetting attributes
This example models a successful action which takes feedback attributes and then returns null
values for some of them, causing OpenDialog to unset those attributes. It is possible for an action response to both unset and populate attributes, they are not mutually exclusive. As the action response specified that it was successful, this will also automatically populate the action_success
attribute with true
.
Request
Response
Errors
This example models an unsuccessful action which has returned an error. As the action response specified that it was unsuccessful, this will also automatically populate the action_success
attribute with false
. The error message(s) will be automatically added to the logs.
Request
Response
Last updated