You are here: Data Tables > Table-Based Rules

Table-Based Rules

OVERVIEW

CPQ Cloud provides a point-and-click editor to define recommendation and constraint rules that access Data Tables, without resorting to BMQL.

The table-based rules allow for:

Table-based rules fire on the user side when the condition is met. However, if no results are returned from the query then there is no impact on the action attributes. When multiple rows are returned for an action attribute, all returned values are recommended or constrained.

ADMINISTRATION

ClosedCreating a Table-Based Recommendation Rule

  1. ClosedNavigate to the Supported Product Families page.
    1. Click Admin to go to the Admin Home Page.
    2. Click Catalog Definition in the Products section.

      The Supported Products page appears.

    3. Confirm that Product Families is listed in the Navigation column, and click List.

      The Supported Product Families page appears.

  2. For the Product Family for which you want to create a Table-base rule, select Recommendations in the Navigation column and click List.

    The Recommendation: Rules List page appears.

  3. Click Add to create a new rule.

    The Recommendation: New Rule page appears.

  4. Complete the Name, Variable Name, Description, and Status fields.
  5. Select the Condition Type.
  6. Choose the Apply rule to: value.

  7. Select Table Lookup as your Action Type.

    A section consisting of four tabs appears.

  1. In the Select Table tab, select the Table from which you would like to retrieve data in the Select Table drop-down.
  2. Click the Specify Filter for Table Rows tab and click Add Row.

    A blank row appears.

    1. In the Evaluate Row With column, choose one of the following two options and complete the row:
      • Static Entry: Define a static value in the Value column.
      • Attribute: Select entries from the Table Column, Operator, and Value columns. The Value column becomes a drop-down showing configurable attributes.

          Array attributes used in the filter will execute for each array index. Also, array attributes with the same control attribute can be used in the same filter.

        As you make your selections, the rule logic displays in the Select Rows in Table When section at the bottom of the page.

    2. Enter the order of operations in the Row Grouping field.

        If you only have one condition, you still need have the value of 1 in this field.
  1. Click the Select Attributes to Populate tab and click Add Row.

    A blank row appears.

    1. In the Attribute to Populate column, select the attribute(s) whose value you will populate with Table data. 

      The user can specify multiple action attributes in the Select Attributes to Populate tab for any table-based rule. This behaves similar to standard configuration rules, which can have multiple action attributes where the rules fires per action attribute and not all action attributes have to be present in the flow for the rule to fire for one particular attribute. The rule fires if the condition is met and the condition attribute and the action attribute are in the flow.

    2. In the Table Column to Populate Attribute Values column, select the Table column that will populate the attribute.
    3. In the Set Type column, select None, Set, or Forced Set.
    4. In the Message Type column, select Static Entry or Table Column.
    1. For Recommendation Rules: Specify the Action attribute and the Table column from which the recommendation value will be chosen. In addition, select a Set type for the rule.
      For Constraint Rules: Specify the Action attribute(s) and the constrained value. For menu-type action attributes, choose the constraint type: Constrain or Allow.
  2. Click the Test Table Results tab.
    1. In the Input table, select the Table Column and Value you'd like to test and click Run.

      What is returned as an Output is the information from the table that will be returned when a user, in this instance, selects Meat Lovers as the Specialty Type.


ClosedCreating a Table-Based Recommended Item Rule

Creating a Recommended Item Table-based rule is similar to how you'll use tables in Recommendations and Constraints. The main difference is instead of the third tab being Select Attributes to populate, you'll have a Map Item Properties tab.

  1. ClosedNavigate to the Supported Product Families page.
    1. Click Admin to go to the Admin Home Page.
    2. Click Catalog Definition in the Products section.

      The Supported Products page appears.

    3. Confirm that Product Families is listed in the Navigation column, and click List.

      The Supported Product Families page appears.

  2. For the Product Family for which you want to create a Table-based rule, select Recommended Items in the Navigation column and click List.

    The Recommended Items: Rules List page appears.

  3. Click Add to create a new rule.

    The Recommended Items: New Rule page appears.

  4. Complete the Name, Variable Name, Description, and Status fields.

  5. Select the Condition Type.

  6. Select Table Lookup as your Action Type.

    A section consisting of four tabs appears.

  7. In the Select Table tab, select the Table from which you would like to retrieve data in the Select Table drop-down.
  8. Click the Specify Filter for Table Rows tab and click Add Row.

    A blank row appears.

    1. In the Evaluate Row With column, choose one of the following two options and complete the row:
      • Static Entry: Define a static value in the Value column.
      • Attribute: Select entries from the Table Column, Operator, and Value columns. The Value column becomes a drop-down showing configurable attributes.

        As you make your selections, the rule logic displays in the Select Rows in Table When section at the bottom of the page.

          Array attributes used in the filter will execute for each array index. Also, array attributes with the same control attribute can be used in the same filter.

        As you make your selections, the rule logic displays in the Select Rows in Table When section at the bottom of the page.

    1. Enter the order of operations in the Row Grouping field.
      1. If you only have one condition, you still need have the value of 1 in this field.
  1. Click the Map Item Properties tab.

    Map attributes, static values, or table columns to the rows Item, Quantity, Comment, and Price. Use the following table to establish these mappings.

    Property (Recommended Item Rows) Property Source Property Value
    Item Table Column You must map directly to a table column, such as Part.
    Quantity

    Table Column

    Static Entry

    Attribute

    You can map to a table column, define a value, or map it to a configurable attribute.

    If you map the quantity field to a Table Column, the table column MUST be of an integer data type.

    Comment

    Table Column

    Static Entry

    Attribute

    You can map to a table column, define a value, or map it to a configurable attribute.
    Price

    Table Column

    Attribute

    Item Master

    You can map to a table column, map to an attribute, or map directly to the items master (parts database).
    1. HTML and Date attributes cannot be used as inputs for Map Items Properties.

      Array attributes can only be mapped to a return column when at least one array attribute with the same control was specified in the filter. The same index used in the filter will also be used to populate the mapping results.
  2. Click the Test Table Results tab. In the Input section, the Column value will already be set, and read-only.
    1. In the Value column, enter the value you'd like to test and click Run.


BEHAVIOR

ClosedAction Attributes in Table-Based Rules

The supported action attributes are Text, Integer, Float, Currency, HTML and Data type configurable attributes.


ClosedUsing Array Attributes in Table-Based Rule Actions

Table-Based Recommendation and Constraint rules functionality allow arrays to be used in the actions. You can use recommendation rules to set values or use constraint rules to constraint values of individual array indexes. You can use the value(s) of an array set to pull information from a Data Table by mapping an array attribute to a Data Table column. The column will be used in the filter to evaluate the array attribute value. For a single array attribute, each index will be evaluated individually against the Data Table.

ClosedTable-Based Recommendation Rules Notes

ClosedTable-Based Constraint Rules Notes

ClosedNotes about Behavior


NOTES

Duplicate values returned by the query are removed and only unique values are recommended or constrained.

When deploying Configuration, you can deploy Data Tables that are used in Table-Based Rules, which have undeployed changes.

You can include Data Tables that are used in Table-Based rules in configuration test to production. If the Data Table does not exist in production, it will be uploaded to the Default folder. If the Data Table exists in production, then the test site data will be appended to the production site data for that table.

If multiple messages are returned, then all messages are displayed in a comma delimited list to the end user, no matter the value chosen by the user.

Array attribute type limitations are consistent with existing functionality. For example, if the table column is of numeric data type, then the array attribute(s) must be numeric.

In cases where quantity <=0, the quantity will be shown as Qty = 1.

Prices will show as the following in these situations:
o On Request<=0 : Non Number value that is not the keyword “Base”
o Not Defined: No price at all, or blank
o Default Unit Price: Keyword “Base” is found in the table

The first column of a Data Table can be populated with an empty string. A row with data must follow.

RELATED TOPICS

Related Topics Link IconSee Also