Trigger
Trigger is where you can set up keyword capture, or capture by regex, e.g. patterns of a variable, or sentences and words.
How is this useful?
Triggers allows the virtual assistant to respond to users with the right messages at the right time, and direct users through a flow, thus being able to engage with users more proactively. When certain keywords or regex are used by your end-user, a particular flow will start.
Examples of keywords or regex that can be captured:
- NRIC number
- Phone number
- Email address
How do I set up a trigger?
- After a content node has been created, click on ‘+’, followed by ‘Trigger’ to add a trigger.
- Select the Trigger type.
- Enter keywords if using keywords.
- The content node that should appear after the flow is triggered will be displayed at Actions > goto.
- Click on the tick icon on the header bar to save the node.
Alternatively, you may create a trigger in the Triggers tab.
- Click ‘+’ and fill in the trigger name in the text box.
- For triggers that belong to the same category, add an underscore (‘_’) between the words, e.g. ‘feedback_name’, ‘feedback_email’. When you view the feedback category in the triggers list, you will be able to view all triggers relating to feedback.
- Click the tick icon to create the trigger.
- Select the Trigger type.
- Enter keywords if using keywords.
- At Context, enter the node id of the content node that appears before the user is required
- At Actions, select the appropriate action. The most common step is “goto”, which is to point to a content node in “Data” and key in the content node name there.
- Click on the tick on the header bar to save the trigger.
Validation Check
- If trigger has same conditions, same context, and same text patterns, it will be flagged as duplicated and invalid.
- Text patterns should not be wrongly configured to be ‘open ended’. When a trigger is left ‘open ended’, all values would be a valid value, causing the chatbot to be misconfigured.
- ‘Open ended’ example: “/hello|hi|yes|/i”