Contents:
- Overview
- Matching to Related Lists
- Use Cases
- Nodes
- Get Records Match Node
- Getting a Record
- Advanced Settings
- Using Related Objects in the General Decision Node
- Summary
Overview
Related List/Object Based Routing (Get Records) allows you to query any object relevant to the record you are routing in your graph. With Related List/Object routing you can use related lists on the routed record and records you are mapping to, for decisions, actions, and routing. Using the relationship to a related List/Object gives you the ability to query and get records associated with the related List. Related List/Object Based Routing is an advanced feature for admins with the need to access information through related Lists/Objects.
Example: Kevin is the LeanData Admin for OnPoint Communications. When a Lead is routed, Kevin wants to check the related List of Products. The lead is stamped with the products the Lead is interested in. The products can help determine the correct rep to route the lead.
Please Note: This feature is designed for advanced Salesforce users.
Matching to Related Lists
The most common type of setup and relationship that customers are enacting and executing on, is a related list. Using Related List Based routing enables you to use related lists on the routed record in your Flowbuilder Graphs. This feature is similar to Related Activity or Campaign Member based routing.
Leads in Salesforce typically have a related list such as a list of Activities inside Salesforce. John Smith might have multiple interactions with SDRs during the buying cycle. Those activities get logged under John Smith’s name.
These Activities (a Salesforce Object) have a lookup relationship to John Smith. The ID of John Smith will be stamped on these activities. We currently use the Related Activity Match node to navigate this relationship to route based on one of these Activities.
Use Cases
This section gives you several use cases to understand Related List/Object Routing.
Product Interest Based Routing
OnPoint Communications is a large software and hardware vendor. In Salesforce their products are stored on an object called Products. Leads and Opportunities can be stamped with the Product.
John Smith has indicated interest in products A,B, and C. If he expresses interest in another product, he can be routed to the rep that is trained in how to follow-up on his product interest. Related List routing would let us route based on most recent interest.
Enabling Custom Territories
GlobalWorld has a custom Territory object. They could also have a product like Enterprise Territory Management. They stamp the lead with the associated territory. Connected to the Territory is a related list of Territory members like an AE, SDR, and Product Specialist. Related List Routing will help us find the best match on the Related List of Territory Members.
Opportunities, Products, and Buying Groups
In this use case the Related List lives on the Opportunity that we match to instead of the routed Lead. Related List matching supports lists on the routed record but also lists on any other object in a Graph through matching. So we can query the list on the opportunity for products that John might be interested in. This is important to the buying group, because we can determine if John is part of the buying group for this Opportunity’s products or if he should be part of a buying group for a new Opportunity’s set of products. This feature allows us to check a list that lives on a matched object, not just the match object itself.
Nodes
Several nodes in Flowbuilder are specifically designed to help work with related Lists/Objects.
Get Records Match Node
The Get Records Match Node gives you the tools to match a Lead to a related List/Object. You will find the Get Records Match Node with the other Match Nodes on the Node Selector in your Router Graphs. You can customize the Get Records Match Node as needed. Options include:
- Node Name
- Find Records
- Select and Store Record
- Advanced Settings
Node Name
By default, the Node Name is set to Match Node. You can change this label to anything you need. We strongly recommend giving this node a meaningful name such as the goal of the Match Node or simply Related List Match. This will help others understand the purpose of the node.
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 flow, the description will help them to understand the goal of the customizations.
Getting a Record
There are 2 steps to configuring the node to get a record for routing purposes.
- Step 1: Find Records
- Step 2: Select and Store Record
In our example below we will mimic an Opportunity Match to demonstrate how the Get Records Match Node works.
Step 1: Find Records
What type of records (object) are you looking for?
You must first choose the object you want to access.The picklist will display all of the relevant Salesforce objects that can be queried. Select the desired object.
How do you want to Get Records?
There are 2 radio buttons under this option: Related List Search and SOQL Search.
Related List Search
This picklist will include the Routed Record and any Object Variables you have defined upstream in the graph. You can navigate through the Objects Related to these variables to find the Related List you desire.
If there is an Object that has a related list, such as the Matched Account, you may see it displayed twice on the Object picklist. If there is an arrow next to the Object, it means you can follow a lookup relationship to a different object. By following that relationship, you can select a related list on that next object. Selecting the option with no arrow will confirm that the related list you wish to use lives directly on that object.
SOQL Search
The SOQL Search option provides advanced querying capabilities using Salesforce Object Query Language. When selecting SOQL Search, you can:
- Use the SOQL Builder tool to construct your queries without needing to know SOQL syntax.
- Clicking the Build SOQL Conditions (or Replace Conditions) button will take you to a page where you can use dropdowns and operators to define your conditions, for which records you want to return. Once you complete your conditions, click the Create Conditions (or Replace Conditions) button to confirm your SOQL conditions.
- Write custom SOQL queries in free-form mode (note: once you start typing in free-form, you cannot convert back to SOQL Builder)
- Click Switch to Free-Form to directly enter your desired SOQL conditions into the text box
- The root object type for your SOQL query must match the object you selected in the previous dropdown. If you change the object type after entering a SOQL query, your filters will be reset.
- LeanData will return all records (from the root object) that meet your SOQL conditions. Note that these records don't need to be related to any Object Variables in your graph.
- Please Note: LeanData can return up to 1,000 records before applying tiebreakers. Make sure your SOQL conditions are specific enough to return only the records you need within this limit.
Step 2: Select and Store Record
The Select and Store Records step gives you the tools to select a single record from records found in Step 1 using tiebreaker rules and store it in a variable for use in a later node.
You will need to provide tiebreakers to enable LeanData to pick the best matched record when multiple matched records are returned. Click New Rule to add new rules. Use the drag handles on the left to re-order your tiebreaker rules.
Set Variable to Selected Record
This setting can store the record in an existing Variable or a new Variable that you name. This Variable can then be used in later.
To set a Variable:
- To save a new Variable, enter a new variable name. For new Variables you will see (custom) at the end of the name
- Selecting an existing Variable will overwrite that Variable.
- To set the variable, click on its name.
Advanced Settings
Node Edges
There are 3 exit edges from a Match Node. Under the Advanced settings you can select a target node for each of the edges for what you would like LeanData to do in each of these scenarios.
- Match: LeanData has identified a best match based on the algorithm, after applying your Tiebreakers and Filters.
- No Match: LeanData has not identified a match, after considering your Filters.
- Multiple Matches Identified: If LeanData has more than one match remaining after your Filters, and you would like to take a different action than identify one best match, you can direct this edge to your desired action. This option is disabled by default. Upon enabling, you will also have to remove any Min/Max tiebreakers.
Using Related Objects in the General Decision Node
If you need to reference fields on the related record identified in a Get Records Node, you can use the General Branch Decision Node. The General Decision Node has two main functions, it allows you to make routing decisions on any Variable in the graph and it can be used to make decisions with Get Records (Related Object/List Routing) results.
Example: Vince is the LeanData admin for Lighthouse Development. He currently needs to create a Graph that will use Get Records to get a Lead’s Product Interest stamped on the Lead. The Graph also needs to make routing decisions based on the Product Interest. Vince uses a General Decision Node to select the Product and route to reps that have the best product knowledge.
Compare Items
In the Compare Items section, you will be setting the items that you want to compare for the decision. You will be able to select the routed record, any matched Objects, or any saved Variable on the left side or right side.
To use a record identified in a previous Get Records node, find the Variable you used to store that record from the Get Records Node.
Whichever object variable you select for Item 1, the node will use that object’s fields for the routing conditions. For example, if you selected a Variable for an Opportunity identified with the Get Records node, the node will use those fields for the condition.
Configure the conditions as needed.
- Select which field from the Object you wish to reference.
- Select the Operator to use for comparing the field with the Value/Field of Item 2.
- Select the Value or field from Item 2 (right side) to compare to Item 1.
Set the target for the condition to indicate the next node this edge should proceed to, or End of Flow.
Summary
Related List/Object Based Routing (Get Records) allows you to query any object relevant to the record you are routing in your graph and make routing decisions based on the results. You can store results in Variable to be used in your Router Graph
For questions or additional assistance please contact LeanData Support.