Trigger

The trigger is the starting point of all chatbot flows.

It determines which chatbot is to be executed when a user requests a chat.

Conditions for trigger

As you can have more than one chatbot on your account, the conditions on the trigger help the system qualify the right chatbot for the conversation.

You can also combine multiple conditions using an AND / OR operation.

The conditions on the trigger can be:

URL

The webpage URL the user is on.

For example, "URL contains pricing" or "URL equals https://hellomoe.co.uk"

Browser Language

The default language set by the user on their browser. For example, "Language is French"

Date Range

The date when the user is initiating the chat. For example, you can build a separate chatbot flow that activates during Christmas or for a new launch announcement.

Keyword

[Only for WhatsApp and SMS] The incoming keyword from the user that started the chat. For example, the user sent a keyword containing "Book appointment".

Button Payload

[Only for WhatsApp and SMS] When the user receives a template message from the business and clicks on a button.

Conditions are not mandatory. If you have not defined any conditions for your chatbots, the first active chatbot on the list will be activated.

Inject data into the chatbot

If you want to send external data to the chatbot, you can use this option. Once enabled, you can map the fields that contain the value with the Hello Moe variable.

Two ways you can inject the data:

Using Query params

With this method, when the snippet is loaded on the website for the first time, the defined query params and their values will be stored in the variable.

For example, if your URL is the followingwww.Hellomoe.co.uk?cust_id=1234&plan=9896

You can choose to store the values of cust_id and plan on the trigger action block.

Using JSON

With this method, you can inject a JSON payload inside the Hello Moe's code snippet and map the objects to be stored in the trigger action block.

To do this you need to add the following object with your desired fields in the code snippet

data-session-payload='{"field1": "value", "field2: "value"}

Now, let's take an example to understand this.

Assume you are using the chatbot in your web app and you already know who is the user initiating the chat. For your agents to be aware of the user details, you can add their name, email, customer_id, plan, etc. to the Hello Moe code snippet.

<script src="" data-session-payload='{"name": "Charles", "phone": "7164848686"}' defer></script>

We have stored the “name” and “phone" fields to Hello Moe variables on the trigger action block.

Note:

  • Hello Moe reads this object only once when the code snippet is fired. Sending data after the code snippet loads will not be read.

  • Dynamically add the data-session-payload object to the Hello Moe code snippet

Last updated