Setting Up Pathing and Conditional Logic in Journeys
This guide walks through how to set up pathing and conditional logic so a Journey can route someone to a different path based on how they answer a question or what they click.
Check out this video for step by step instructions on how to set this up
https://www.loom.com/share/250bbdfd7c904e66bd1841cd7804a121
Use Case
A common use case is a main router Journey placed on your homepage that covers all the services you offer. Based on the option someone selects, they get routed to the matching service Journey, for example a Roof Replacement Journey or an HVAC Journey.
What You'll Need
Setting this up requires two steps in the back end:
- The question step, where you ask what service the person is interested in.
- A blank routing step, where the conditional logic actually lives.
Step 1: Set Up the Question Step
- Create the step where you ask the question (for example, "What service are you interested in?").
- Note the variable name for this question. You'll need it later when writing the condition.
- Pay attention to each answer's label and value. The label is what the person sees, but the value is what the logic checks against. These can be different. For example, the label might read "HVAC Replacement" while the value is simply "HVAC."
- Values are case sensitive and often use snake_case (underscores instead of spaces) for multi-word values. Make sure you know the exact value for each answer option, since it needs to match exactly in your condition.
Step 2: Create the Routing Step
- Add a new step directly after the question step. This step will appear blank and is never seen by anyone using the live Journey. It exists purely to hold the routing logic.
- Click the three dots on this step and select Conditions.
- Set up your first condition:
- Choose the variable from your question (for example, "service type").
- Choose the Equals operator when you want an exact match.
- Enter the value to match (for example, "HVAC").
- Set the action to Route to Journey and select the destination Journey (for example, the HVAC Journey).
- Add additional conditions as needed for each possible answer. For example:
- If service type equals a different value, route to the Contact Us form or another Journey.