- Setting Object Variables in Match Nodes
- Setting Variables in the Set Variable Node
- Creating a New Variable
- Updating a Variable
- Referencing Set Variables in Routing
- Match Nodes
- Decision Nodes
- Action Nodes
- Notification Nodes
- Hold Until Nodes
LeanData Routing allows you to store matched objects (such as matched Accounts, Related Activities, etc) and other values (such as lists of User IDs, lists of excluded email domains, or Zip Codes) in a container called a Variable, which can then be referenced later in your routing graph for use in routing decisions and actions.
Example: Rachel is the LeanData Admin at BluePond Technology. BluePond has many competitors who will often request demos or sign up for newsletters to gain competitive intelligence. Rachel sets a Variable called "Competitor Domains" to store all of BluePond's competitors' domains, and uses the "Competitor Domains" variable in various Decision and Action Nodes throughout her routing graph to ensure that Leads with competitor email domains will all be flagged and sent to a specific internal queue.
You can set Object Variables within your Match Nodes to store matched objects, or you can set your custom variables to store values in the Set Variable Node.
Setting Object Variables in Match Nodes
Every time you use a Match Node, any resulting match will be stored in a Variable so that it can be used in later decision nodes or action nodes.
Within a Match Node, under the tiebreaker / prioritization section, you can set the Variable that the matched object will be stored in. If you do not create your own custom Variable to store the matched object, a default Variable will be used.
If you would like to create your own custom Variable, or you are using multiple match nodes for this object and need to store different matches in different Variables, you can enter the name for a new Variable in the Variable box, and select your custom Variable instead.
Once you have set these Variables in a Match Node, you can reference them downstream in your routing graph wherever you would need to reference data found on these matched objects. For example, if you need to assign a record to the owner of a Matched Account, you will be able to reference the owner of the Matched Account by selecting your Matched Account Variable in your assignment node.
Setting Variables in the Set Variable Node
To store other kinds of values within Variables, you can create your own Variables in the Set Variable Node in FlowBuilder, which can be found under the Action option in the Node Bar.
You will need to Set a Variable before referencing it later in other nodes, so it is recommended to incorporate this node early in your graph.
Creating a New Variable
In order to create a new Variable, open a Set Variable Node and in the Set Variable Values section, provide a name in the Variable field. Select the "Variable Name (custom)" option from the dropdown. For example, you might want to create a Variable to store a list of your competitor domains, so you can easily reference them in multiple places in your graph.
Once you have named your custom Variable, you will have four options for Data Type: Text, Number, True/False, or Object. Select the option that corresponds with the type of data you wish to assign to this Variable.
After selecting your Variable name and Data Type, enter the value you wish to assign to this Variable in the Value field. This will accept comma separated lists of values in the case you selected the Text Data Type.
If you would like to use the value from a different field rather than entering a static list of values, you can use the Insert button which will allow you to select which field you would like to take values from. You can use values from a field on the routed record, a related or matched record (provided these were previously identified in the graph), or even another Variable.
You can set additional Variables by clicking the Add button.
After setting all of your desired Variables, go to Advanced Settings at the bottom of the Node Properties pane to direct records to the Next Node in your desired path.
Only records that progress through this node will be able to reference the Variable(s) set within this node. Records that have not passed through this node will not be able to reference these Variable(s) in decisions or actions.
Updating a Variable
In many cases, you will only need to set a variable once, and it can be referenced repeatedly later in the graph.
If you ever need to update the value that was previously assigned to a Variable, you can use another Set Variable Node later in the graph. If you update the same Variable in a subsequent node, any nodes that occur afterwards in your graph will reference the updated value(s).
In order to update a Variable that was previously set in a graph, create a Set Variable Node, and instead of providing a name for a new Variable, select the existing Variable you would like to update from the dropdown menu.
Note: If you change a Data Type for an existing Variable, its Data Type will be changed in every Set Variable node across your entire graph.
For Users to update an existing Variable in a Set Variable node or use it as part of the value, that Variable needs to have been set upstream in all paths that lead to that node.
Referencing Set Variables in Routing
Once you have set a Variable, you can then reference that Variable in subsequent routing decisions and actions wherever you see the Insert button, including in your Match Nodes, Decision Nodes, Action Nodes, and Notifications.
Please Note: for all nodes that reference a Variable, that Variable must have been set upstream in all paths that arrive at that node. If there is any path that arrives at a node without first having that Variable set, you will not be able to reference the Variable in that node.
Within Match nodes, you may need to reference Variables within your Filters and Tiebreakers. For instance, if you want to Filter out Accounts from a list of excluded Billing Countries, you can create a filter that references a Variable containing a list of your excluded Countries.
You can do so by adding a Filter condition, then using the Insert button to insert the Variable that contains your Excluded Countries list, rather than typing in each of the excluded countries individually.
Match Nodes will also store the results of the match in a Variable to be used later in your Graph as needed.
You can use Variables in Decision nodes. For example, if you wanted to direct Leads with an email address from an excluded list to a specific team, you can use a Decision Node that checks whether the email address ends with a domain from your excluded list, and direct those Leads down a separate path in your routing graph.
You can do so by adding a condition that checks whether the Email field on your lead Ends With a domain from your Excluded Domains Variable. You would use the Insert button to insert the Variable that contains your Excluded Domains list, rather than typing in each of the excluded domains individually. You can then direct this edge towards your desired path.
Decision nodes can also make decisions based on criteria on matched object variables. For instance, if you wanted to make a Lead routing decision based on whether that Lead matched to a Customer Account or a Prospect Account, you could reference the Account Type field from the Matched Account Variable that was set in a prior Account Match Node.
Action nodes can reference Variables as well. Any action node that can update a field with an inserted value can use the value stored in a Variable. For example, in the Update Record Action Node, if you set a Variable that stores whether a Lead was triggered by an Insert or an Update at a certain point in your routing graph, and you wanted to preserve that on the Lead Description field when it completes routing, you can reference that Variable and write the value on the Lead Description field.
You can use the Insert button to use the Variable as the value you would like to write onto the Description field. The actual value used will differ depending on which Set Variable Node the Lead passed through prior to this Action Node.
Other Actions Nodes will directly reference an Object Variable that you have previously set in a Match Node. For example, if you want to assign a record to the Owner of a Matched Account, the Route to Matched Account Node will allow you to select which Account Object Variable you would like to use for the assignment. Only Match Nodes that were used earlier in the path will be eligible.
If you would like to reference a Variable when composing a notification, you can use the Insert Variable option to incorporate the value you assigned to the Variable when composing your message.
Hold Until Nodes
For Variables that are set prior to a Hold Until Node, they will retain their value even for decisions and actions that occur after exiting the Hold Until Node. This is useful for preserving information from an originally matched record, even if matches may have changed while a record is held in the Hold Until Node.
For questions or additional assistance please contact LeanData Support.