Actions
Last Updated: 25.10.2019
Last updated
Last Updated: 25.10.2019
Last updated
Actions allows you to make a trigger of programmatic function in the external applications based on end-user expressions and send dynamic responses back to the end-user or even start a chain of making API calls based on rules and conditions. For example, if an end-user wants to get a weather forecast, your Action can check the Weather forecast service and respond to the end-user with the information about the weather forecast.
When used in a dialog node, an action is triggered when the assistant processes a node that has activated Actions. The Action collects data that you specify or that you receive from the user during the conversation and save in context variables. It sends the data as part of the request to the URL that you specify as part of your action definition. After requesting the external application, you need to evaluate the response from that request.
For adding parameters, you have the next UI component:
Parameters types are represented in the following table:
To send the API request, you will need to provide the values for the parameters. The parameter values are storing in the context variables that can create during the conversation with the user.
You have two options to specify the values.
You can leave the value blank, like this:
Then when you activate this Action in dialog node, you would need to specify the values for the parameters.
The next image is the view of the Action from the Dialog node.
Specify the default context variable that should include the value. To define the value, you need to use the next syntax {{context.your_context_variable}}
. For example:
You can also specify default value directly in the parameters if, for example, you do not want to get such value from the user, and you want to hardcoded the value.
Then when you activate this Action in Dialog node, you do not need to specify the values for the parameters, because it will be already in place. You can modify it from the dialog node if you want.
The next image is the view of the Action from the Dialog node.
The following links include information about managing the actions for each available integration.
Type
Description
Auto
The field type is automatically determined from the value and can be a string, number, boolean, or null.
Array
An array contains an ordered collection of values.
Object
An object contains an unordered set of key/value pairs.
String
Field type is not determined from the value, but always returned as string.