behavior.* data queries are created on the ‘Data Query Datasource’ event. The behavior can gather data as needed (e.g. external APIs, worklist results, etc).
The alias configured there (e.g.
get_stock_price) can be specified as a data query type (e.g.
Any arguments provided in the query are provided to the behavior as input variables.
Responses are returned in JSON format. This makes it much simpler to request data from bot behaviors from dashboard widgets, other bot behaviors, or the API.
Fetch stock price data
Bots can create behaviors on the ‘Data Query Datasource’ event. This allows data from any source (e.g. external API) to be returned from a data query. Data query parameters are sent to the bot behavior as input variables, and data is returned from the ‘Return data’ action as JSON.
The data query would look like:
Which could be visualized as: