Configure flow trigger
In order for a flow to operate, it must be initiated by specific triggers.
To initiate a specific flow, you need triggers. One popular trigger option is using predefined intents, such as "I want to order food" or "Food order". By training your bot to recognise these intents and the corresponding phrases, whenever a user enters a matching intent or similar phrases, it automatically triggers the corresponding flow.
1. Configure start trigger
To configure a start trigger, follow the steps below:
Go to Studio and click a flow.
Click the Start node.
In the Start trigger pop-up, select a type of trigger from the drop-down - Intents, Entities, Event, or Page URL. In the next field, select the value of the type of trigger.
The Start trigger configures how a bot communication flow begins, initiating a conversation based on customer queries and trigger logic.
1.1 Trigger a flow using Intent
Initiate a flow with an action statement such as booking a test drive, connecting to a service center, checking the status of an order, or finding the best product on a website. For instance, if a customer types 'How to book a test ride', the bot triggers the flow that has been configured for the '#test ride' intent.
To learn more about intents, click here.
1.2 Trigger flow using Entities
Start the flow with the primary object(s) of a query, such as the cheapest flight, customer service number, sedan cars, rooms in a hotel, and best beauty products. For example, if a customer types studio, the bot triggers the configured flow.
To learn more about entities, click here.
1.3 Trigger flow using event
You can trigger bot flows when a specific event occurs allowing you to automate responses and actions. With event based triggers, you can create personalized and timely interactions with your customers based on their actions.
Example:
If you run an online store, and a customer adds items to their shopping cart but abandons it without completing the purchase. You can set up an event trigger to activate a bot flow that sends a reminder message to the customer, encouraging them to complete their purchase. This automated response can help recover potentially lost sales.
To configure event based trigger: Create a flow that you want to trigger for a specific event and set the start node to event
You can trigger flows using any event that is enabled for the bot. This can include system events, user events, custom events, and integration related events. To know about various events that are available in the system, see Events.
1.4 Trigger flow using page URL
Initiate a flow with a page Url. For example, triggering the help centre URL on the contact us page.
1.5 Trigger flows from others flows via Execute flow node
You can set up when to trigger a flow manually from or inside another flow using Execute Flow action node.
Add the Execute Flow node and select the flow you want to execute next.
For example, track your application, know your ID and view FAQs are three user responses linked to different flows (which are configured as separate flows). When one of the responses is sent, respective flows are executed.
2. Add multiple triggers
Click Add new trigger to add multiple triggers to the flow. You can train the bot with more than one start trigger to accommodate maximum use cases. Every trigger type has a logic for triggering the start of the communication. At least one logic must meet, when a customer is interacting with the website or application, to trigger a particular flow.
A start trigger can have two events, three intents, and five entities. If you meet any conditions configured for the types of a trigger, the bot triggers the flow.
Let's say you have a chatbot for a customer support service. The start trigger for initiating a flow could include the following:
- Events: Customer visits the website's Contact Us page, Customer opens the mobile app.
- Intents: "I need assistance with my order, "Help me with a technical issue."
- Entities: Customer's order number, Product name or ID, Billing account number.
In this scenario, if any of the events occur or if a customer types one of the specified intents or provides relevant entities, the bot will trigger the flow and assist the customer accordingly.
3. Test a specific flow
When configuring a bot with multiple flows, it's important to ensure desired outcomes before moving to the next flow. However, running the entire bot for every change can be time-consuming. To simplify the process, you can test each flow separately using URL, code or the option available on the Studio overview page. This allows you to focus on specific flows without executing the entire bot, saving time and effort during configuration.
To preview a specific bot flow there are two methods, discussed in the further sections:
3.1 Test bot flow via Studio overview page
To preview a bot on the Studio overview page,
- Go to Studio.
- Click the Preview button next to the desired flow.
- The flow will get triggered in the chat box on the right end.
You can also go to the respective flow and click Preview current flow.
3.2 Test bot flow via. URL
To preview a bot via URL, follow the given steps:
- Go to Studio > Flows.
- Click the Flows drop-down and select the flow that you want to preview.
- Copy the path of the flow that you see in the URL (after
flow/
)
- Click Preview bot, you will see the entire bot flow in a new tab.
- In the address bar, append
?ym.triggerJourney={flow path}
.
Example:
https://cloud.yellow.ai/liveBot/x1635319612954?ym.triggerJourney=docs-feedback
Ensure that you clear the browser cache before you preview the bot. It is recommended to use Incognito mode or Private window to preview flows.
- Use
?
to append right after the base URL of the bot. Example: https://cloud.yellow.ai/liveBot/x1635319612954?ym.triggerJourney=feedback - Use & if you want to append it after a variable. Example: https://cloud.yellow.ai/liveBot/x1635319612954?region=&ym.triggerJourney=feedback
Flow slug (Journey slug)
A flow slug is the combination of flow name with auto-generated characters for a flow in the format - /flow-name_{auto-generated characters}
.
It appends to the URL and you can see it when you select a specific flow.
3.3 Test bot flow via. code
To preview a bot via code (embedded on your website), follow the steps below:
- Get the path of the flow as explained in the previous section.
- In
window.ymConfig
, pass the parametertriggerJourney
and specify the path of the flow you copied.
<script type = "text/javascript" >
window.ymConfig = {
"bot": "x1625119673009",
"host": "https://cloud.yellow.ai",
triggerJourney: "malaga_vftkqv"
};
(function() {
var w = window,
ic = w.YellowMessenger;
if ("function" === typeof ic) ic("reattach_activator"), ic("update", ymConfig);
else {
var d = document,
i = function() {
i.c(arguments)
};
function l() {
var e = d.createElement("script");
e.type = "text/javascript", e.async = !0, e.src = "https://cdn.yellowmessenger.com/plugin/widget-v2/latest/dist/main.min.js";
var t = d.getElementsByTagName("script")[0];
t.parentNode.insertBefore(e, t)
}
i.q = [], i.c = function(e) {
i.q.push(e)
}, w.YellowMessenger = i, w.attachEvent ? w.attachEvent("onload", l) : w.addEventListener("load", l, !1)
}
})();
</script>
- Paste the code in the Header or body of your website as per your need to preview the flow.
4. Flow settings
To access a flow's settings,
Click the gear icon at the bottom.
In the following screen, you can configure the following,
Field | Description |
---|---|
Init function | Function that will be executed before going through a flow. |
Change category | Category of the flow |
Mandate words | Mandatory words that have to be in the user utterance to trigger this flow. |
Precluded words | Flow will not be triggered if these words are present in the user utterance. |
Disable steps for Go Back functionality | If the user response is 'go back' (or related words - configured in tools), this takes them to the previous question. At the flow level, you can disable some steps from which going back should not be allowed. |
Channels | Flow will only be available in the selected channels. |
What Next?
Series of nodes are used to create a flow. There are multiple nodes available on our platform.