Branching in Flows V2

Modified on Mon, 12 Feb 2024 at 09:47 AM

The branching component in flows V2 enables you to create one or more paths that split from a “main path” (default path) in your flow.


You can use this component as many times as you want in a flow. There are two main ways that you can branch:



  1. You can branch based off of a member's age or gender attribute, and

  2. you can branch based off of a response to a question that occurs within the flow.


Let’s create an example flow to show how branching can be used related to a member’s recent quality of sleep.


In this flow, we want to know the member's age because age can often have an impact on someone's ability to sleep well and the recommendations for getting healthy sleep. So we'll start by making a branch based on whether the member is under the age of 60. 


First, we drag and drop the branch component into the flow-builder field and we place beneath the "Start of Flow" tile, then we click "Add Branch" in the editor on the right:


 


branch_1.jpg


 


Now we click on "Add Condition":


 


branch_2.jpg


 


Now we can set the rules for this branch based on a member's age:


 


branch_3.jpg


 



  1. Here we can choose the information that is triggering the branch. For our example here, we are basing the branch off of the member's age, so we choose "Member's Age."

  2. Here we can choose the rule that applies to the age we enter in step 3.

  3. Here we choose the age.


Now we can put in a name for the branch so we can easily tell the branch's purpose when viewing the flow. 


We have created one branch for people who are 60 and older while people who are younger than 60 will follow the default path in the flow at this point:


 


branch_4.jpg


 


As you can see in our example, both branches receive some text to read. The branched path for people over 60 gets some sleep information specifically for people who are older. Now we can continue building the flow...


 


There's one question that we want to branch from: it is a multiple choice question where we ask the member how they felt when they work up this morning. The distractors are, "Sleepy," "Somewhat rested," and "Fully rested." In this scenario, we are branching if the member answers anything other than "Fully rested," so we drop the branch component into the flow-maker field and we configure the settings in the editor:


 


branch_5.jpg


 


In this image, we've numbered each of the steps in configuring the branch rules:



  1. We chose to branch based off of a question in the flow.

  2. Here we selected the question in the flow that is triggering the branch.

  3. We can choose to branch based on whether the member's response IS or IS NOT equal to the condition we define in the next two steps. In this case, we are branching for "is not equal to." Note that you can also branch off of an unknown answer, which would apply to someone who did not answer the question. (To avoid having unknown answers, be sure to toggle the question to be required when you edit the question component.)

  4. Here we selected the response to the question that step 3 relates to.  


Now that we have the branch configured, this is what it means: Any member who does not answer the question "How did you feel when you got up this morning" with the response of Fully rested will be branched. 


In this example, we want to try to understand why the member did not wake up feeling fully rested this morning, so we're branching them into a multiple selection question where they can tell us if they did anything the night before that may have harmed their ability to sleep.


 


branch_6.jpg


 


The branched path is asked if they did any of the following within two hours of trying to sleep last night:



  • Drank caffeine

  • Drank alcohol

  • Ate a snack

  • Exercised

  • Used electronics

  • Listened to loud music


Now we want to set up a branch for anyone who answered that they indulged in food or drink within two hours of their bedtime so we can let them know that there's a link between eating and drinking late and poor sleep.


 


branch_7.jpg


Here we've set this branch to occur when the member selects any one or more of the three conditions in the response to the question:



  1. I drank caffeine

  2. I drank alcohol

  3. I ate a snack


This flow wraps up by bringing all the separate paths into one final page component where they are informed that sleep can be improved by practicing good sleep habits:


 


branch_8.jpg


 


 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article