Teneo Developers

Prompt Trigger

Prompt Triggers does not - as Intent Triggers - make use of match requirements, but allows to write Groovy script expressions which are tested when the Flow stack becomes empty, i.e. when the last active Flow is dropped and the Conversational AI application has nothing else to process.
This allows to execute the Flow only in specific circumstances, for example, when a Global Variable has a certain value or when another Flow has completed. Or when the dialogue length is greater than a certain value or the current date within a specific date range.
This pages provides step-by-step guides to how to add, edit or delete a Prompt Trigger.

TIP: If the Flow should always be considered, write the word true in the expression field

Create Prompt Flow

To create a Prompt Flow in Studio Desktop, follow the below steps:

  • In the top ribbon of the Home tab, click the lower part of the Flow button
  • Select Prompt Flow
  • The new Prompt Flow window opens on the Properties tab in the backstage, add the Name of the Prompt Flow
  • Optionally, add a Description and/or a Resume Prompt
  • Click the green Play icon or the back arrow in the top, left corner to go to the main Flow window
  • Select the Prompt Trigger, add the Expression in the right-side panel, optionally give the Prompt Trigger a Name and Description
  • Select the Output node, add the wanted Answer, optionally, add a Name, Description and Output Hyperlink
  • Remember to Save the Prompt Flow to conserve the modifications.

Add new Prompt Trigger

Add a Prompt Trigger to existing Flow

With the Flow open, follow the below steps:

  • Click the Plus icon available before the raise label and select Add Prompt

Plus icon

  • Alternatively, in the Flow's top ribbon, click Add Prompt
  • Next, select the Prompt Trigger in the Flow editor and, optionally, give it a Name and write a Description in the right-side panel
  • Under Expression, add the script expression (Groovy)
  • Under Triggering. select an Order Group
  • In the Advanced Options section, specify if the Prompt Trigger should be Matched only once per session or potentially always

Whenalways is selected, the Flow may be triggered every time that the Flow stack is empty in all sessions; when wanting a Prompt Trigger to execute more than once per session (but not all the time) untick the Matched only once per session option and use programmatic or Flow logic to control how often the Prompt Trigger is fired per session.

  • Under Metadata, click Add to add Metadata definitions
  • Select the Output node and enter relevant details
  • Remember to Save the Flow to preserve the modifications.

Add a Prompt Trigger to existing Flow

With the Flow open, follow the below steps:

  • Click the Plus icon available before the raise label

Plus icon

  • In the Trigger group, select Trigger after the input is processed to Prompt the user
  • In the Prompt Trigger:
    • Next to PROMPT, optionally, click to add a name to the Prompt Trigger
    • In the Expression field, add the script expression (Groovy)
  • Remember to Save the Flow to preserve the modifications.

Expand the Script editor for a better overview and bigger workspace by clicking the Expand icon in the lower, right side of the node

Edit Prompt Trigger

Edit Prompt Trigger

With the Flow open, follow the below steps:

  • Select the Prompt Trigger in the Flow editor, this will open the right-side Prompt Trigger panel; if the panel doesn't open automatically, click Prompt Trigger in the right side of the Flow window
  • Now, edit the wanted properties
  • Remember to Save the Flow to preserve the changes.

Delete Prompt Trigger

Delete Prompt Trigger

With the Flow open, follow the below steps:

  • Select the Prompt Trigger in the Flow editor
  • In the top ribbon, click Delete
  • Remember to Save the Flow to preserve the changes.