Teneo Developers

Data Actions

The matching process

Where Match Requirements are used to determine when an Intent Trigger should trigger, Data Actions are those actions which are executed whenever the Intent Trigger is triggered by a user input; so the Match Requirements need to match before the Data Actions will be evaluated.

As with Match Requirements, the Data Actions are executed in the same order as they are listed in the Data Action section.

Types

The following Data Actions are available in Flow Intent Triggers and Transitions:

  • Entity Data Action
  • Language Object Data Action
  • Script Data Action
  • Listener Data Action

Entity

The Entity Data Action will be executed just for inputs that match the selected Entity.

The Add Data Action drop-down menu offers a shortcut to created Data Actions based on existing Entity Match Requirements, but there is no mandatory connection between Entities matched in the Match Requirement list and those added to the Data Actions, i.e Entity Data Actions can be defined even if no Entity Match Requirement is, or for different Entities.

When an Entity is added in the Data Actions section of the Flow Intent Trigger, it is possible to add a number of mappings from one of the NLU Variables of the Entity, by activating the Add Mapping button and selecting the Source and Target.

Every time a new input matches the Entity, the values in the source are stored in the selected targets. The same source can be selected multiple times, but each target can just be selected once (as multiple values would override previous ones anyway).

Language Object

The Language Object Data Action is executed just for inputs that match the condition of the selected Language Object.

The Add Data Action drop-down menu offers a shortcut to create Data Actions based on existing Language Object Match Requirements, but please note that there is no mandatory connection between Language Objects matched in the Match Requirement list and those added to the Data Actions, i.e. Language Object Data Actions can be defined even if no Language Object Match Requirement is, or for different Language Objects.

Once a Language Object has been added, the user can add any number of mappings from one of the NLU Variables of the Language Object to Global or Flow Variables.

Every time a new input matches the Language Object condition, the value in the source is stored in the selected target. The same source can be selected multiple times, but each target can be just selected once (as multiple values would override the previous once anyway).

Script

The Script Data Actions let the user execute Groovy scripts whenever the Trigger is matched.

Listener

The Listener Data Actions are activated whenever the Trigger is triggered and the condition of the Listener matches the user input. In those cases, the expression of the Listener (a Groovy script) is executed.

The Listener Data Actions substitute the former Trigger Post Listeners; they are customizable with the same semantics as the previous Trigger Post Listeners.

Multiple Data Actions

Each Intent Trigger can contain as many Data Actions as needed.

New Data actions are inserted to the top of the list when added; a handle to drag/drop them into the desired order is available in the top-right corner of the Data Action.

Scripts in Teneo Studio
Listeners and variables
Language Objects
Entities