Data Actions

There may be cases where you'll need to transfer information from a 'Language Object' to a flow, or you need to define a specific condition to be met before the flow executes a script. For these cases, Data Actions is the easiest choice. Simply put, Data Actions are used when you want something to happen at a particular flow node; this can range from setting the value of a variable at that point in the flow to triggering a listener.

One example of Data Actions was mentioned earlier in the Extract Entities page where a Data Action was used on an entity to get the type of coffee ordered by the user.

Data Actions are not limited to use with entities. There are four different ways to use Data Actions:

  • Entity
  • Language Object
  • Listener
  • Script

Data Actions can be found inside a flow, located on the lower right corner when selecting a trigger or a transition. Which options are available will vary depending on which type of Data Actions is chosen. This page will explain these types in depth.

Data Actions Location

Note that a Data Action is only optional, where the input is not forced to trigger it. Once triggered, Data Actions will execute your Mapping or Script depending on which you've selected. If you want it to be required, you'll need to add a Match Requirement with an identical condition.

Data Actions on an Entity

As demonstrated in Extract Entities, it is possible to use Data Actions to extract the values stored inside an entity. If the user selects Entity as Data Actions, they'll need to define which Entity they're interested in. Once that's defined, the user will have the option to 'Add Mapping' and transfer the values from 'Source' to 'Target'.

Data Actions on a Language Object

There are some cases where the Language Objects store NLU values inside them. The user has the option to access these by using Data Actions on Language Objects. While selected, the user must define which Language Object they're interested in. Once that's defined, the user will have the option to 'Add Mapping' and transfer the values from 'Source' to 'Target'.

Data Actions on a Listener

In cases where using Data Actions on Entity isn't the best option, the Listener is there to help. Together with the listener, you'll have the option to combine both entities and language objects to execute a script or order. When selected, the user has the option to define a Condition that should trigger the Listener followed by an Execution Script, which is executed as soon as the Condition is met.

Data Actions on a Script

Teneo supports coding done in Groovy. This Data Action allows the user to use Groovy-based coding on a Script to be executed once the Data Actions are triggered. The user has the option of writing an Execution Script, which will be executed once the Data Actions option is met.

What's next?

The next page is about Handling Interruptions.

Was this page helpful?