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
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
- 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
- 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