Routing - Branch Decision Node Guide Follow
Contents:
- Overview
- Customization
- General Branch Decision Node
- Fallback Edge
- Working with Rules
- Logic Rules
- Working with Edges
- Things to Know & Best Practices
- Summary
Overview
The Branch Decision Node allows you to make branching logic based on the criteria on a record or on a record you previously matched using a Match Node. Use a Branch node to determine if a certain condition is met and then determine which path the Lead record should take. This node allows for unlimited outcomes. If you have multiple rules that require more than two outcomes (such as geo, industry, company revenue size etc), you must use the Branch decision node.
Example: Bridgette is the LeanData admin for Lighthouse Development and has been tasked to edit their Lead Router. Revenue Operations wants to separate the Leads by company size. Bridgette uses a Branch Decision Node to check each Lead to determine the company size. She creates 3 rules to break up the Leads into Small to Medium Business for companies with less than 200 employees, Mid Market for companies with more than 200 and less than 500 employees, and Enterprise for companies with more than 500 employees. Each rule on the Branch Node creates a new edge to route Leads.
Customization
When you select a Branch Decision node, you need to determine what object you’re evaluating to see if a condition is met.
For Lead Router, you have the following options:
- Lead: The condition is being evaluated against the incoming Lead that is being processed through the router graph.
- Lead to Lead (L2L): The condition is being evaluated against a matched Lead from a prior Lead Match Node.
- Lead to Account (L2A): The condition is being evaluated against a matched Account from a prior Account Match Node.
- Lead to Opportunity (L2O): The condition is being evaluated against an Opportunity from a prior Opportunity Match Node.
- Duplicate (DupL): The condition is being evaluated against a potential duplicate Lead from a prior Dupe Lead Match Node.
- Duplicate Contact (DupC): The condition is being evaluated against a potential duplicate Contact from a prior Dupe Contact Match Node.
- Related Activity (RA): The condition is being evaluated against a matched Related Activity from a prior Related Activity Match Node, an Activity that triggered Routing, or an Activity that triggered an exit from a Hold Until Node.
- Related Campaign Member (RCM): The condition is being evaluated against a matched Related Campaign Member from a prior Related Campaign Member Match Node, or from the Campaign Member that triggered routing.
- General: You will be able to choose which Objects or Variables to evaluate, provided they have been previously identified in the graph.
For Contact Router you have the following options:
- Contact: The condition is being evaluated against the incoming Contact that is being processed through the router graph.
- Contact to Contact (C2C): The condition is being evaluated against a Contact from a prior Contact Match Node.
- Contact to Opportunity (C2O): The condition is being evaluated against an Opportunity from a prior Opportunity Match Node.
- Contact to Account (C2A): the condition is being evaluated against an Account identified from a prior Account match node. This does not refer to the Account the Contact is already associated with.
- Duplicate Contact (DupC): The condition is being evaluated against a Duplicate Contact from a prior Duplicate Contact Match Node.
- Related Activity (RA): The condition is being evaluated against a matched Related Activity from a prior Related Activity Match Node.
- Related Campaign Member (RCM): The condition is being evaluated against a matched Related Campaign Member from a prior Related Campaign Member Match Node, or from the Campaign Member that triggered routing.
- General: You will be able to choose which Objects or Variables to evaluate, provided they have been previously identified in the graph.
For Account Router, you have the following options:
- Account: The condition is being evaluated against the incoming Account that is being processed through the router graph.
- Account to Opportunity (A2O): The condition is being evaluated against a matched Opportunity.
- Related Activity (RA): The condition is being evaluated against a matched Related Activity from a prior Related Activity Match Node.
- General: You will be able to choose which Objects or Variables to evaluate, provided they have been previously identified in the graph.
For Opportunity Router, you have the following options:
- Opportunity: The condition is being evaluated against the incoming Account that is being processed through the router graph.
- Opportunity to Contact (O2C): The condition is being evaluated against a Contact from a prior Contact Match Node.
- Opportunity to Opportunity (O2O): The condition is being evaluated against an Opportunity from a prior Opportunity Match Node.
- Related Activity (RA): The condition is being evaluated against a matched Related Activity from a prior Related Activity Match Node.
- General: You will be able to choose which Objects or Variables to evaluate, provided they have been previously identified in the graph.
For Case Router, you have the following options:
- Case: The condition is being evaluated against the incoming Case that is being processed through the router graph.
- Case to Account (Ca2A): The condition is being evaluated against a matched Account from a prior Account Match Node.
- Related Activity (RA): The condition is being evaluated against a matched Related Activity from a prior Related Activity Match Node.
- General: You will be able to choose which Objects or Variables to evaluate, provided they have been previously identified in the graph.
After you have selected the type of Branch Decision node, you have a number of options to configure the node.
Depending on the type of Branch node you select you may see a Variable section. If you use any of the options that reference an object other than the incoming routed object, the Branch node will have a Variable for the type of Match in the Branch node.
For example: if you are using a Branch: Lead to Account (L2A) Node you will see a section called: Select Items to Compare. This section is used to select which Variable holds the Account you would like to reference. Typically this is stored in the Matched Account (Default) variable, which is selected by default.
The Branch node for the incoming routed object will not include the section to Select Items to Compare.
- Node Name: By default, the Node Name is set to Branch. You can change this label to anything you need. We strongly recommend giving this node a meaningful name such as the subject of the decision. This will help others understand the purpose of the node. For our example, we would call this node, Company Size.
- Description: This field is not required but we recommend adding a description to document any customizations made to the node. If someone else needs to take over the management of the graph, the description will help them to understand the goal of the customizations.
- Related Campaign Member Object: For the Related Campaign Member Branch Node, you will have the option to select which Related Campaign Member will be used in the decision node, either the Matched Campaign Member from a prior match node, or from the Campaign Member that initiated routing. This option will only be available in the Related Campaign Member Decision Nodes in Lead and Contact Router
- Rules: The Branch node includes 1 rule by default. You can edit this rule with 1 or more conditions to help route your records. Click on Edit Condition to create logic for this edge.
- Default Edge: The Default Edge on the Branch node is designed to give your records a path if they do not meet any of the rules/edges of the node. This edge is set to End of Flow by default but you can connect it to another node if needed.
- New Rule: The New Rule option lets you create as many additional rules and conditions as needed for the Branch Logic.
General Branch Decision Node
When using a General Branch Decision Node, you will have to specify which objects or variables you would like to reference in the decision node. You can select the routed object or any objects found in prior match nodes, including the Get Records Match Node. Additionally, you can also reference any Variables that have been set earlier in the graph.
Referencing an Object in the General Branch Decision Node
From within the General Branch Decision Node, under the Compare Items section, under Item 1 (left side), select the Object you wish to reference in the dropdown under Variable > Object. You can selected the routed record itself or pick from one of your Matched Object Variables or another Related Object.
Once you have selected your Object, you can then select whether you will be looking for a specific value in fields on that object or if you will be comparing that to a different field on a different object.
If you will be looking for specific values on fields on the selected object, from the Item 2 (right side) dropdown, select Value.
If you are comparing to a field on a different object or variable, select Variable, then select the object with the field you want to compare.
After selecting your options in the Compare Items section, the rules that you can create in the Conditions section of the node properties will reflect your choices.
Referencing Variables in the General Branch Decision Node
You might want to reference a set Variable other than a Matched Object. If so, within the General Branch Decision Node, under the Compare Items section, under Item 1 (left side), select the Primitive.
You can then select whether you will be looking for a specific value in that variable or if you will be comparing the value in that variable to a field on an object or other variable.
If you will be looking for specific values in the variable, from the Item 2 (right side) dropdown, select Value.
If you are comparing to a field on an object or different variable, select Variable, then select the object with the field you want to compare.
After selecting your options in the Compare Items section, the rules that you can create in the Conditions section of the node properties will reflect your choices.
Working with Rules
Under the Conditions section, you will get to define the rules that lead to different outcomes from the node. To create a new rule, click on New Rule at the bottom of your rules. From there you will have the option to create a rule using Logic or SOQL.
- SOQL: The SOQL (Salesforce Object Query Language) option gives you a box that you can enter custom SOQL queries to search your database. There is also a Description that you can add notes about the SOQL code. Your Implementation Consultant can help you create the appropriate SOQL queries or you can see Salesforce’s help system for more information on SOQL. Using this option is uncommon.
- Logic: The Logic option gives you tools native to LeanData to set up the criteria for the decision of the node.
Logic Rules
When you select Logic Rule for the basis of the Decision Node, you will see tools to help you build the logic behind the decision being applied to the record.
Under the option, Logic Rule, you will find the following:
- Field: The Field selector will give you a list of all the fields on the record (Lead, Contact, Account, etc.) that you are routing.
- Operator: The Operator gives you a condition to apply to the field for the decision. (Example: Contains, does not contain, starts with, is null, etc). The values in the Operator selection change depending on the field selected.
- Value: The Value is the value you are evaluating against in your selected field.
Example: The screenshot below shows how Bridgette can set up the Branch Decision Node to check the number of employees on the Lead Record and route the records to the right group.
To Add a Logic Rule to the Decision Node:
- Click on the Branch Decision Node.
- Click the pencil icon to the right of the node. The edit window opens on the right side of the page.
- Click Edit Condition on the default rule or New Rule to create an additional rule as needed. The screen displays the Field, Operator, and Value boxes.
- Select the desired field to apply the decision to.
- Select the desired operator.
- Enter/select the value you are evaluating against in your selected field.
- Set other fields as needed.
- Repeat steps 3-7 as needed for additional rules
Save.
Logic Rules with Matched Records
When working with Matched records, the options you will see depends on the type of node you are configuring. For example, if you are configuring a Lead to Lead Branch Node you will see Matched Lead fields in your Logic. If you are configuring a Lead to Account you will see Matched Account fields as you can see in the screenshot below.
In the next screenshot, you will see a Lead toAccount Branch node. By selecting a Lead to Account Branch node type, you will see Matched Account fields in the logic rules.
The matched record fields you can access depends on the type of Branch node that you selected and if you have previously matched to a record of the same type. For example, in order to access Matched Account Fields, you need to have previously matched to an account in the Router graph and the Branch node type you selected needs to be Lead to Account. These two factors will configure the node to pick up matched account fields as you can see in the screenshot above.
Please Note: If you select a specific Branch node (Lead toAccount for example) and have not previously matched to the same object type, (Account), you will still be able to configure the node with the matched fields but you will get an error when saving the node configuration.
Insert
The Insert feature allows you to insert a value from a previously defined variable or from another field onto the Lead field you are updating. Fields on any matched objects are available, as well as any fields directly on the routed record.
When working with a Date field, you can also insert a Relative Date.
Working with Multiple Conditions
When you edit or add rules, you can have multiple conditions. When you have a rule with multiple conditions you are given the option to specify the relationship between the conditions. By default, you will see an AND relationship. You can change this to OR as needed. You can also use parentheses to group conditions together. Example: ((1 AND 2) OR 3).
Working with Edges
You can Connect nodes in one of several ways:
- Open a node and select the Target through the dropdown next to the condition or outcome you wish to assign. Use the search functionality to narrow the scope of the results. If you want Lead processing to stop at your selected node, simply select End of Flow.
Alternatively you can click the Stop Sign icon to set a particular edge to End of Flow, or click the crosshairs icon to assign that edge visually on the main graph view by clicking the node to which you would like that edge to proceed.
If you are already in the main graph view, you can click on the yellow triangle and drag the edge you wish to direct to the next node to which you would like that edge to proceed.
Things to Know & Best Practices
- Use Logic rules rather than SOQL conditions as much as possible.
- If you need only two outcomes, you may use a True/False Node instead of a Branch node.
- Label your edges to help identify outcomes from your nodes.
- Name your Nodes so you can easily decipher the condition or criteria going through that node.
- You can only use a Decision node that references fields on a matched record if you had previously found a matched record in a corresponding match node.
Summary
The Branch Decision Node is a powerful tool to apply a test condition against a record and to determine the record's route through your router graph. The Branch node gives as many edges as you need to route your records. The Branch node creates an edge for every rule you add. Using the customization settings, you can create a powerful test for your records. For more information on working with router graph please see our Lead Router Guide.