Activating Building Blocks with Rules

Your business relies on a well-defined logic to run successfully. For example, a specific item configuration may be compatible only with certain materials. NetSuite CPQ SuiteApps let you gather and enforce your business logic through rules assigned to their building blocks, such as questions, answers, images, and so on.

NetSuite CPQ verifies the conditions expressed in the rules assigned to building blocks at every user selection or input on the product user interface. When verifying the rules, NetSuite CPQ evaluates questions or answers included in rules against questions or answers selected by users on the product interface. If there is a match, NetSuite CPQ activates the building blocks by performing the assigned task, such as displaying an image.

You can set up rules in the rule field of each building block. Some building blocks can have more than one rule type. To write rules, use question and answer codes and insert a forward slash character to separate them. A code is a unique shortened version of a NetSuite CPQ building block name. When you write the rule, the question code always appears first. For example, you can assign the code combination A/1 to the rule of an image. In this rule, A is the question code, and 1 is the answer code. The question and answer code combination represents the condition that NetSuite CPQ verifies. If question A is answered with answer 1, then the image is displayed on the user interface. If a question type has no answers, write the rule by entering the question code only.

You can also use operators to combine multiple conditions. For example, you can assign the rule A/1&B/2 to the image. The ampersand represents the AND operator, and NetSuite CPQ must evaluate both conditions as true to display the image. If question A is answered with answer 1 and question B is answered with answer 2, then the image is displayed on the user interface.

For example, your business works with a desk as a configurable item. This desk is available in various shapes, such as rectangular, U-shape, and L-shape. You may add a question like "Choose the desk shape" on the product user interface with DESK_SHAPE as a code. One of the answers may be "L-shape" with L as a code. If the user chooses an L-shaped desk on the interface, NetSuite CPQ displays the image containing DESK_SHAPE/L in the rule field. Let's say that the desk surface can also have assorted finishes, such as oak, cherry, or walnut. If the user chooses an L-shaped desk with an oak finish, NetSuite CPQ displays the image with the rule DESK_SHAPE/L&TOP_FINISH/OAK. TOP_FINISH and OAK are the question and answer codes, respectively. The AND operator (ampersand character) indicates that users must choose both the L-shape and the oak finish to view that image.

To help you write rules, NetSuite CPQ lets you choose codes and operators from fields with predefined lists containing all available combinations and options. These fields are named Reference Codes for Rules and Operator Codes for Rules. For more information about operators, see Using Rule Operators.

Some building blocks have start and end dates. These dates affect how NetSuite CPQ evaluates rules. If you define a start and end date or a start date only, the building block must meet the date range and the conditions expressed in its rule to perform the assigned task.

NetSuite CPQ Configurator also has additional rules named categories. When you assign a category to a building block, both the building block rule and the category rule must be evaluated as true to perform the building block task. For more information, see Working with Categories in NetSuite CPQ Configurator.

Working with Rules in NetSuite CPQ Configurator

Depending on the building block to which the rule is assigned, NetSuite CPQ Configurator can perform one of the following tasks:

Note:

To perform the task, the questions or answers selected by users on the interface must match the questions or answers in the building block rule.

  • Display an image on the user interface.

  • Display a validation message on the user interface.

  • Include an additional item in the configuration and later in the transaction.

  • Add a price to the total price of the configurable item.

  • Add a material to the configuration and later to the work order.

    Note:

    Install NetSuite CPQ Manufacturing to create work orders.

  • Add a routing step to the configuration and later to the work order.

    Note:

    Install NetSuite CPQ Manufacturing to create work orders.

  • Execute an action.

  • Enable a category.

  • Create an item required by the configuration.

Special rule types are available for questions, answers, tabs, and groups:

  • Hide rule – If the condition expressed in the rule is met, NetSuite CPQ Configurator hides the question, answer, tab, or group from the user interface. This rule prevents users from viewing unavailable features and options for the current selection.

  • Read-only rule – If the condition expressed in the rule is met, the question or answer is visible but dimmed on the user interface. This rule informs users that other options may become available if they make a different selection.

  • Incompatible rule – If the condition expressed in the rule is met, the answer is dimmed and marked with a little red cross. If the condition expressed in the rule is met and the answer was previously selected, the answer label becomes red. This rule notifies users that the combination of selected options or features does not meet the configuration requirements.

Working with Categories in NetSuite CPQ Configurator

NetSuite CPQ Configurator has additional rules named categories. Categories help you better organize and maintain your business logic. When you frequently use a rule, you can create a category with that rule and apply it to specific building block instances. Categories can also be used to group building block instances that will be activated or deactivated based on the category rule. You can apply categories to the following building blocks: images, pricing, additional items (called breakout items), materials, and actions. You can also share categories across all available building blocks.

When you create a category and assign it to a building block instance, NetSuite CPQ Configurator automatically adds the category rule to the building block rule. It would be the same as adding the category rule to the Rule field of the building block and combining them by using the AND operator (ampersand character). For example, if a rule is common to many images, you can create a category and assign it to each image record. Those image records will inherit the category rule.

A building block with a category assigned performs its task if its rule and the category rule match answers selected by users on the interface.

To create a category:

  1. Go to CPQ > Configurator > Product Maintenance.

  2. Open for editing the product you want to modify.

  3. On the Categories subtab, click New CPQC Category.

  4. Enter a descriptive name for the category.

  5. Select the category type.

    To apply the category to all eligible building blocks, select Common. Otherwise, select a building block from the list.

    Note:

    If you leave this field blank, the category can be applied to all eligible building blocks as if you would have selected Common.

  6. Provide a sequence number.

  7. In the Rule field, provide the question and answer combination that determines whether this category is active.

    Enter question and answer codes separated by the forward slash character. For example, A/1. Use operators to combine multiple question and answer sets. For example, A/1&B/2. For more information, see Activating Building Blocks with Rules.

  8. Click Save.

Using Rule Operators

The following table contains the operators that you can include in rules to combine multiple conditions. In the examples, A represents the question code, and 1 is the answer code.

Operator

Description

Example

Meaning

/

Forward slash – Separates the question code from the answer code.

A/1

The answer to question A is 1.

&

Hard AND – Conditions on both sides of this operator must be true to evaluate the entire rule as true.

A/1&B/2

The answer to question A is 1 AND the answer to question B is 2.

+

Soft AND – Same as the hard AND but used only with two or more answers to the same question.

A/1+2

The answers to question A are 1 AND 2.

#

Hard OR – Only one of the conditions on either side of the operator must be true to evaluate the entire rule as true.

A/1#B/2

The answer to question A is 1 OR the answer to question B is 2.

,

Soft OR – Same as the hard OR but used only between two or more answers to the same question.

A/1,2

The answer to question A is 1 OR 2.

()

Parentheses – Groups together one or more conditions that NetSuite CPQ evaluates together.

(A/1&B/2)#C/3

The answer to question A is 1 AND the answer to question B is 2 OR the answer to question C is 3.

[]

Square brackets – Verify the value of an answer when combined with the symbols corresponding to equals to, greater than, less than, begins with, contains, and ends with. The tilde symbol (~) identifies a range of numbers.

To evaluate the answer against a sequence of characters with letters and numbers, enclose it between quotation marks.

You can verify the value for:

  • All types of input box answers.

  • QTable date and time fields and popup lists (called picklist dropboxes).

You can combine square brackets with resolve expressions, except when using the tilde symbol (~). For example, A/1[="{Q/A}"]. Always enclose the resolve expressions in double quotation marks. For more information about resolve expressions, see Obtaining Answer Data with Resolve Expressions.

A/1[="oak″]

A/1[^="o"].

A/1[*="a"].

A/1[$="k"]

A/1[=10]

A/1[>10]

A/1[<10]

A/1[>=10]

A/1[<=10]

A/1[10~20]

The entered value for question A, answer 1 is oak.

The entered value for question A, answer 1 begins with o.

The entered value for question A, answer 1 contains a.

The entered value for question A, answer 1 ends with k.

The entered value for question A, answer 1 is 10.

The entered value for question A, answer 1 is greater than 10.

The entered value for question A, answer 1 is less than 10.

The entered value for question A, answer 1 is greater than or equal to 10.

The entered value for question A, answer 1 is less than or equal to 10.

The entered value for question A, answer 1 is between 10 and 20.

X()

NOT – Used to negate a condition. If the condition is false, NetSuite CPQ evaluates the rule as true.

X(A/1)

The answer to question A is not answer 1.

*

Wildcard – Represents one or more unknown characters at the beginning, the end, or in the middle of the answer code.

A/1*

A/*1

A/*1*

The answer code to question A begins with 1.

The answer code to question A ends with 1.

The answer code to question A contains 1.

%%

Unanswered question – Identifies a question for which users did not provide any answers.

A/%%

Question A is not answered.

*/*

Any question and answer combination – NetSuite CPQ always evaluates the rule as true. For example, the image is always displayed on the user interface.

When the asterisk replaces the answer code only, the rule is evaluated as true if the user selects any answer to the question.

*/*

A/*

The question is always evaluated as true.

Question A is answered.

_

Underscore – Used after the answer code to specify the qTable row. The row number follows the underscore.

If the @ symbol follows the underscore, the operator identifies the qTable cells in the same row.

A/B_1

A/B_@

The answer to the QTable A is the column B cell in row number 1.

The answer to the QTable A is the column B cell that is in the same row as the qTable cell that hosts the rule.

[x;x=“”]

Identifies a sequence of characters, the number of characters in the sequence, and their position.

A/1[3;4=”BCDE”]

The answer code of answer 1 for question A is the four-character value of BCDE, beginning in position 3.

Related Topics

NetSuite CPQ
NetSuite CPQ Overview
Installing NetSuite CPQ SuiteApps
Migrating to NetSuite CPQ SuiteApps
NetSuite CPQ Configurator
Storing Answer Options in Tables
Obtaining Answer Data with Resolve Expressions
Customizing Products with Scripts Using Action Records and Functions

General Notices