About Matrix Rules
  • 10 Sep 2021
  • 3 Minutes to read
  • Dark
    Light

About Matrix Rules

  • Dark
    Light

Article Summary

Overview

A Matrix Rule is a Rule that can be made up of many different rows and columns connected with two axis. It is used to evaluate data with settings that can be customized to each specific row or column. Each row and column can have specific parameters set for Rule evaluations, and other Rule evaluations can be nested within. When a Matrix Rule runs it has an outcome result, each outcome from a horizontal column creates a column for the Matrix, and each outcome from the vertical row creates a row for the Matrix.

One example of a Matrix Rule can be demonstrated through the use of automated emails. The automated emails can be different depending on the day of the week and can have a different outcome depending on the individual email and specific day of the week.

Example

The screenshot below shows a sample Matrix Rule. This Rule is used to output a value based on the Platform, Software, and Licenses. The Rule will evaluate the input and render the specific output value based on the criteria. For example, if Platform = OS Ultra 3, Software = Quick Email, and Number Of Licenses = 26-50 the value of 800 would be output. This example is created in the steps below.


  1. In a Designer Folder, select the CREATE RULE button on the top Action Bar.
  2. Select the large Matrix Rule tile in the top right or navigate to the Matrix Rule section and select it there.
  3. Provide a name for the Rule, then select CREATE.
  4. In the Rule Designer, select the SETUP INPUT DATA button at the top. 
  5. Configure the input data with Platform [String], Software [String], and Licenses [Int32] - none of which are lists. Save and close the Data Definitions window.
  6. Under the SETTINGS section of the base Rule properties on the right, the Behavior Type is set to Matrix Rule and the Rule Type is set to Matrix [Two Axis].
  7. Change the Output Type to String [Text] under the OUTPUT DATA section.
  8. On the left side of the Designer, hover over Add Rule and select the plus icon.
  9. Navigate to All Rules > Data > String Match Step and select it so that the text edit box appears.
  10. Change the name to something specific to the Matrix, then select ADD.
  11. Under the INPUTS section, select the Pick button for String to Match, then choose the Platform [String] input data from the list.
  12. Under the SETTINGS section, click into the Possible Matches box and enter some platform names as sample data. This example logic is configured to evaluate against two Platform values.
  13. Once the Possible Matches have been added, they will appear as a new row under the Platform Is Rule.
  14. Hover the cursor over a Software value and select the plus icon next to it.
    A great feature of the Matrix Rule is that every value added as a possible option for each column or row can have nested Rule evaluations attached to them, which further increases the depth of how refined the Rule logic can be.
  15. Navigate to or search for the String Match Step, provide a relevant name to the step, then configure some sample data as Software values in Possible Matches. 
  16. Select the Pick button under the INPUTS section for String to Match and choose the Software [String] input data.
  17. Repeat this process of adding a Software Is Rule and sample data to the other Platform value.
  18. Hover over the Add Rule header at the top and select the plus icon that appears.
  19. Navigate to All Rules > Data > Numbers > Number Ranges, then provide a name relevant to the Matrix. This example uses "Number of Licenses" to indicate that this is a range of License [Int32] quantities.
  20. Under the INPUTS section, select the Pick button for Number to Evaluate, then choose the Licenses [Int32] input data.
  21. Under the OUTCOME SETUP, select ADD NEW under the Number Ranges box to add an applicable range of numbers for the expected value. This example uses License ranges of 20-25, 26-50,51-75, and 76-100.
  22. Now that all of the possible input values for Platform, Software, and Licenses have been configured into the Rule, corresponding output values will need to be configured in the boxes where the pencil icon appears on hover. The values in this example are random Int32 values.


Debug

  1. Select Debug from the top Action Bar.
  2. Enter some values for the expected input data that will match somewhere in the Matrix Rule.
  3. Select the START DEBUGGING to observe how the data is evaluated to reach an outcome in the Rule.

Was this article helpful?

What's Next