Step 4: Branching

Now that the AI action is detecting different intents, it's time to setup different paths for handling different intents. This is done using branching conditions. We will add 2 paths below the AI action: one for Order Status intent and another one for How to Return or Return Label queries.

Branch for Order Status

To add the first path that would be handling Order Status intent, add a Decision action after the AI action. Once you have added a decision, then you can specify how many different branches you need, and what criteria must be satisfied to continue down each branch.

Best Practice: When creating decisions, always maintain a path for scenarios in which none of your specified conditions are met. In Flow, you can designate this path by using the "Otherwise" condition.

600

Branch for Return Questions

Now we are going to add another path but this time it is going to capture multiple intents. We want the path to be run if 'How to Return' intent is detected. This is easy to do by simply adding a new branch.

Click '+' to create a new branch, and then define what criteria must be satisfied to activate the branch.

600

Run the flow again with different messages and see how different template actions are run.

πŸ“˜

Template Actions

Feel free to add actual template text to the template actions we added or you can leave them blank and simply use as path markers.