In this article, we will show you how to connect modules. We will cover:
- How to create a connection and condition
- How to add webhooks
- How to skip global connections
- How to use the "Don't wait for user's input, just evaluate connections"-functionality
To be able to connect modules, you have to hover over a module and click “Edit connection”. It’s important that the modules, which you want to connect your module with already exists.
How to create a connection and condition
To create connections between modules you will have to think about what the user input is for that specific module. A connection consists of two things: a condition and an action. A connection does not have to have a condition, and this can be deleted from the connection.
To create a condition, you will first have to decide what type of condition, you want to create. The condition is the "If" part of the connection. You can choose from:
• Response to: if you choose this then you will be able to create a connection based on keywords or suggested replies.
• NLU understands: choosing this means you will create a connection based on intents from your NLU Training Dashboard.
• Custom variable: if you choose this then you will be able to create a connection based on custom variables. To use this, you will also need to use a webhook in a previous module.
• A/B testing: choosing this means you will be able to test different messages on your end users. It is based on a random ID, which we give end users. To A/B test, you will have to create two different connections that will decide what action the end users should be sent to based on their batch number.
• User’s filter: this will allow you to send your end user to a specific module based on a filter, which they are segmented into.
• Channel: this will allow you to segment your end users to go to a specific module based on what channel they are on.
Once you have chosen a condition, you will need to find an action for the end user. An action can either go to a different module or a webhook.
To add a connection, you can either press the "Add connection" button in the connections area or drag the "Add connection" button from the left bottom corner. The draggable option is great when you have a lot of connections and want to add an extra connection in a hierarchy of connections.
How to add webhooks
To add a webhook, you need to press "Go to" in the action part of the condition and select Webhook. A webhook can both be inserted with or without a condition. If you require a more in-depth description of webhooks, please refer to our documentation on webhooks. To see how to remove a condition, please refer to our documentation on connecting modules.
How to skip global connections
Underneath the Fallback option, there’s a “Skip Global Connection”-box. Sometimes you want to skip the Global Connection evaluation if it’s important that you receive a certain type of input from the end user and are able to send them to a specific message based on that reply.
How to use the "Don't wait for user's input, just evaluate connections"-functionality
If you check off this box, then the chatbot will send the end user to a module without evaluating the end user input, but only consider the edits that have been made in the connections of the module. This option is only available in Statement modules.