Skip to main content

Triggers

Basic Concept

A Trigger is a way to notify the chatbot to send respective messages from a tree node or to trigger a global node. In general, a node can be matched by computing its trigger in the following ways:

  • Developer-defined payload
  • Keyword entered by users
  • User comment on a post
  • URL parameters in m.me short link
  • Specific type of user input

Click the button below to start creating a trigger in your tree node:


Create Trigger

  1. First, head to Bot Builder.

  2. Click to edit a node. Click โ€œ+ New Triggerโ€ button at the node inspector to create a new trigger.

  1. Name your trigger so that you can search and reuse it when needed.
  1. Select the available Resource Templates from the dropdown list.
  1. Create the trigger by filling in the required information. "Save" the trigger.
  1. The trigger has been created. Remember to "Save" the node as well.

Variables

Certain fields in the trigger, such as text and payload, can also support variables.


Resource Templates

In the Basic mode of trigger, WOZTELL provides a sets of pre-built trigger templates. User can select and apply these triggers with ease:


Keywords

Select Keywords/Payload to add keywords trigger. Keywords trigger means that your users must enter the text that exactly matches with the text you specified.

For example, if you would like your bot to respond when users send their greetings to you, you can set up a trigger for such scenario "Greeting". You should include all keywords that are common for user greetings, such as "hi", "hello" and "hey".

If you want users to enter more accurate keywords, you also can make use of "Case Sensitive"", "Word Boundary" or "Equal".

  • Case Sensitive: Differentiate the upper and lower case letters while identifying a keyword.
  • Word Boundary: Only consider a keyword when it is a standalone word with clear boundary with other words. The node can be triggered when the keyword is within a sentence.
  • Equal: The node can only be triggered when the user input is exactly the same as the keyword.
tip

Please note that when "Equal" is switched on, the "Case Sensitive" and "Word Boundary" logic will be ignored.


Payload

Under Keywords/Payload, you can also set up payload triggers. Logically, you may only select either keywords trigger or payload triggers to determine user action because they cannot coexist at the same time.

Payload is usually used for button clicks by users. You can name your payload in anyway you want, you just need to note that payload name is Case Sensitive and it has to match with the payload you set in the responses to trigger that particular response.


Facebook Comment

If you are developing a chatbot for comment reply on Facebook, the template trigger of Facebook Comment will be useful to you.

There are two things you must set: Facebook Page ID and Facebook Post ID. You could find both details on your Facebook page. If you want to limit chatbot activation to a specific text, please specify the keyword down below. If nothing specified, any comment will activate the chatbot.


Referral Parameters

If you are creating bots on Facebook Messenger platform, pay attention to this - every Facebook Messenger chatbot is assigned to a unique URL look like this: https://m.me/YourFacebookPage. This short link will redirect your users to your Messenger chatbot immediately.

However, you may place this short link in various platforms or advertising channels. How to differentiate the source where different button clicks are from?

You can add a parameter "ref" at the end to specify the referral reference of this URL, e.g. https://m.me/YourFacebookPage?ref=fromAd1. A referral reference "fromAd1" is assigned to this URL and you could look at all the tracking back in our Dashboard.

tip

You should set up different referral references for different incoming sources so you can evaluate the performance across sources by the refs.


Pre-defined Triggers

If you want to chatbot to be triggered by different type of user input, you can make use of the pre-defined triggers. These types of triggers doesn't match with a specific word or payload, instead, they cover a wider range of user actions.

  • Any User Input: Any type of input from the user to chatbot, including every individual trigger type.
  • Any Text: Any text input from user.
  • Any Payload: Any payload from user
  • Any Comment: Any comment in a page.
  • Any Number: Any user input containing numbers.
  • Any Email: Any user input containing "@".
  • Any Media/File: Any media or file sent by user.

Advanced Trigger

Apart from creating triggers from system templates, you may also customize your own triggers in Advanced mode. Selecting a basic trigger and then switching to Advanced mode will give you the code behind any pre-defined triggers.

For more details on the advanced chatbot concept & usage, you may visit here.

Example of the Any Text trigger in Advanced mode:


Besides, to make the advanced trigger more accessible to general users, we gradually support resource templates for advanced use cases such as the "Scheduled Trigger", which allow you to control when a trigger will be active or inactive.