Working with Ranges
Ranges
Ranges allow a user to take a field in the rule and create a split based on predefined ranges and the value of the record passing through.
An example could be Order value. You may want an email follow-up for an order of less than $100 but a phone confirmation for orders above.
Ranges allow you to choose the field and then set the ranges. Each range will create an output that can have distinct follow-up behaviour.
As the value flows through the field, we compare the value to the range values and the Output Connector the data will flow to if it contains that value. As the Rule runs and data flows through, where the specified value is found in the data it will flow through to the output selected, thereby switching this data through a chosen flow.
You can create a new Range in Rule Designer from any field or the required type. Simply click on the Plus icon against the Tile in Rule Designer. As well as the ability to “Select Template” and “Create Switch Case From Field” you can “Create Range from field”.
Next select the field that holds the value you want to split on, Order value, Priority, Engagement score etc.
New Ranges can be added. Click on the Add (Plus) icon and enter the top and bottom bounds then select an output Connector name. This will create new outputs for this specific Range.
How should you define your Range? For a value to fall into a given range it must be greater than or equal to the lower bound and less than the upper bound. Missed Lower or Upper bounds means the range boundary contains all values above or below. Ranges should never overlap; we will provide validation on this for you.
In essence this means that for a continuous flow of ranges between one and five and then five and above you would add.
Where you miss a lower or upper bound it will include all values above or below.
Note as previously defined and as shown in the image above that the upper bound is NOT included in that range. So, 2 - 3 does not include 3. 3 is included in 3-4.
This is so we can cope with decimals. 2.999 for example is in 2 - 3 but would be covered by a range up to three as it is higher than 2.
Ranges require the Field types, integer, string number and can include negative numbers or decimals.
Output connectors for more than one range can map to to the same output. In this case the flows from one or more ranges will flow through the same Output.
We create a default output for any value that falls outside of the ranges set. You can optionally select one of the Ranges you created to be the default.
Ranges can be removed. Simply click delete next to the Range.