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. One use-case were 'Data Actions' works particularly well was mentioned earlier on Extract Entities page where 'Data Actions' was used on 'Entity' to get the type of coffee ordered by the user.

The 'Data Actions' are not limited to 'Entity'. There are four different ways to use 'Data Actions':

  • Entity
  • Language Object
  • Listener
  • Script

The 'Data Actions' can be found inside a flow, located on the lower right corner when selecting a trigger or a transition. The options given to the user will change, depending on which type of 'Data Actions' is chosen. This page will explain these types in depth.

Data Actions Location

Note that a 'Data Actions' is only optional, where the input is not forced to trigger it. Once triggered then the '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 on 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' stores '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 to write an 'Execution Script' which will be executed once the 'Data Actions' option is met.

What's next?

Next page is about Handling Interruptions.

Was this page helpful?