Loading
Salesforce now sends email only from verified domains. Read More
Business Rules Engine
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          How to Design a Grouped Decision Matrix (Example)

          How to Design a Grouped Decision Matrix (Example)

          When your business requires you to have multiple similar matrices with the same input and output headers, consider creating a grouped matrix. Learn how to create a grouped decision matrix and call it from an expression set version.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise, Unlimited, and Developer Editions for clouds that have Business Rules Engine enabled
          1. Create a Grouped Matrix for Car Rental Plans
            Store the details of car rental plans for different cities using grouped matrix versions. City names are used as the values for each version’s group key.
          2. Call the Rental Plans Matrix from an Expression Set Version
            Add a lookup table step to an expression set version to call the grouped matrix. Next, simulate the version to test if the grouped matrix works as expected.

          Create a Grouped Matrix for Car Rental Plans

          Store the details of car rental plans for different cities using grouped matrix versions. City names are used as the values for each version’s group key.

          Required Editions

          User Permissions Needed
          To create a grouped decision matrix and configure and activate its versions: Rule Engine Designer
          1. From the navigation menu in Business Rules Engine, select Lookup Tables.
          2. Click New.
          3. Select Decision Matrix | Next.
          4. For name, enter Car Rental Fees.
          5. For type, select Grouped.
          6. For group key, enter City.
            The matrix and its first version are created.
          7. On the Related tab of the matrix, select Car Rental Fees V1.
          8. Edit the version.
            1. Click Edit.
            2. Change the version name to Car Rental Fees NYC.
            3. In Group Key Value, enter New York City.
              Use this version to store the data specific to New York City.
            4. Save the version.
          9. Configure the version data.
            1. To configure the column headers, click Add Column.
            2. Create these columns, and click Done.
              Column headers, header types, and data types for the first version of the grouped matrix
            3. To add row data, click Add Row for each new row that you want to add, and configure these rows.
              Row data for the grouped version of the matrix for New York City

              The values 0 and 7 in the Rental_Days column represent the ranges: 0–6 and 7 and above respectively.

            4. Save and activate the version.
          10. Create a version to store the car rental details for San Francisco.
            1. In the header of the Car Rental Fees NYC version, click New Version.
            2. Select Include column headers and rows.
            3. For name, enter Car Rental Fees SF.
            4. Enter 2 for the version rank and number.
            5. Save the version.
            6. To modify the row data, click Pencil icon. in a cell and change the cell’s value.

              Here’s the modified row data for the San Francisco version.

              Row data for the grouped version of the matrix for San Francisco
            7. Save and activate the version.
          11. Create a version to store the car rental details for Chicago.
            1. In the header of the Car Rental Fees SF version, click New Version.
            2. Select Include column headers and rows.
            3. For name, enter Car Rental Fees Chicago.
            4. Enter 3 for the version rank and number.
            5. To modify the row data, click Pencil icon. in a cell and change the cell’s value.
            6. In this example, Chicago doesn’t have rental plans for SUVs. To delete rows with Car_Type as SUV, select the row checkboxes, and click Delete Rows.

              Here’s the modified row data for the Chicago version.

              Row data for the grouped version of the matrix for Chicago
            7. Save and activate the version.

          Call the Rental Plans Matrix from an Expression Set Version

          Add a lookup table step to an expression set version to call the grouped matrix. Next, simulate the version to test if the grouped matrix works as expected.

          Required Editions

          User Permissions Needed
          To create and activate an expression set: Rule Engine Designer
          To run an expression set

          Rule Engine Designer

          OR

          Rule Engine Runtime

          1. From the App Launcher (App explorer icon.), find and select Business Rules Engine.
          2. Click the app navigation menu, and then select Expression Sets.
          3. Click New.
          4. Name the expression set Get Car Rental Fees.
          5. Select the Default usage type and save the expression set.
          6. In the Expression Set Versions area, select Get Car Rental Fees V1.
          7. Click Gear icon, which opens the properties panel., and enter 1 as the version rank.
          8. To call the grouped decision matrix from the expression set version, add a lookup table step.
            1. Click Add icon in expression set builder canvas. in the expression set canvas, and select Lookup Table.
            2. In the Lookup Table Details field, start typing Car Rental, and select Car Rental Fees.

              The group key of the matrix, City, appears as one of the input variables of the selected grouped matrix.

              Grouped decision matrix selected in the lookup table step, which shows the matrix's group key as an input variable
          9. Save the version.
          10. To verify that the grouped matrix works as expected, simulate the version with a few sample input values.
            1. Click Simulate.
            2. In Car_Type, enter Hatchback, in City, enter San Francisco, and in Rental_Days, enter 10.
            3. Simulate the version.
              Simulation results for the sample inputs passed

              Here, San Francisco (3) is one of the values of the matrix key City. Based on this input value, the matrix version (1) whose key value is San Francisco is considered, and the output value (2) that corresponds to the values of the input variables is returned.

            Simulate the expression set version with a few different values for the matrix’s input variables.

          To activate the expression set version, click Back, and then click Activate.

          Note
          Note You can invoke only the expression sets that have at least one active version from calling processes such as Flow.
           
          Loading
          Salesforce Help | Article