Activating or Hiding Building Blocks with Rules

Your business relies on well-defined logic to run successfully. NetSuite CPQ Guided Selling helps you capture and enforce this logic with rules assigned to its building blocks, such as filter categories, subcategories, and filters. These rules set restrictions that limit possible combinations of features and options for your business items. For example, water-based finish options won't be offered for metal desk frames because they could cause rust. By limiting certain combinations of filters and filter options, rules also affect the results returned by the search. For example, if a filter becomes hidden, the filter expressions associated with its filter options won't be applied.

Rules are conditional statements based on combinations of filters and filter options. The system verifies the conditions expressed in the rules every time a user makes a selection or enters information in the catalog interface. When verifying rules, the system compares the filter options specified in the rules with those selected by users on the catalog interface. If there's a match, the system activates the relevant building blocks and performs the assigned task, such as suggesting an additional item (called an add-on) or hiding a filter option.

You can set up rules in the rule field of most building blocks. To write rules, use the codes for filters and filter options and insert a forward slash to separate them. Each code is a unique, shortened version of a building block name. When writing rules, always enter the filter code first. For example, if you use A/1 as the rule for an additional item, A is the filter code, and 1 is the filter option code. This code combination is the condition that the system verifies. For example, if users select option 1 for filter A, then the system will suggest the additional item to users.

Filter categories and filter subcategories can be included in rules using a specific format. The first code is fixed and the second code corresponds to the code for the filter category or subcategory:

For example, if your filter category code is DESKS, the rule would be MENU_CATEGORY/DESKS. If your filter subcategory code is HOME_DESKS, you'd use MENU_ITEM/HOME_DESKS.

In a rule, you can also use operators to combine multiple conditions. For example, you can assign the rule A/1&B/2 to the additional item. The ampersand represents the AND operator, and the system will only suggest the additional item if both conditions are true. If users select option 1 for filter A and option 2 for filter B, then the additional item is suggested to users.

When writing rules, you can choose codes and operators from fields with predefined lists that include 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.

Example

Your business offers a range of desks and chairs. Desks are available in various types, such as basic, executive, and deluxe. You might use a filter like "Choose the desk type" with the code DESK_TYPE. One of the filter options could be "Executive" with EXECUTIVE as the code. When users choose a desk type, the system suggests matching types of chairs as additional items. If users choose the executive desk type on the catalog interface, the system might suggest leather chairs that include the code combination DESK_TYPE/EXECUTIVE in the rule field of the corresponding additional item.

Let's say desks can also have assorted colors, such as gray, brown, and black. If a user chooses a brown executive desk, the system might suggest a leather brown chair with the rule DESK_TYPE/EXECUTIVE&DESK_COLOR/BROWN. DESK_COLOR and BROWN are the filter and filter option codes, respectively. The AND operator (ampersand character) indicates that users must choose both an executive desk and the brown color to receive the suggestion for a brown leather chair.

Working with Rules

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

Note:

To perform the task, the filter options selected by users on the catalog interface must match the filter options in the building block rule.

  • Hide a filter category, subcategory, filter, or filter option from the filter panel.

  • Suggest an additional item (called an add-on) to be included in the transaction.

  • Require users to include an item in the transaction.

  • Run an action.

Rules for hiding building blocks are stored in Hide Rule fields. These rules prevent users from viewing resources that aren’t available for their current selection. Rules for performing a specific task are stored in Rule fields.

Using Rule Operators

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

Operator

Description

Example

Explanation

/

Forward slash – Separates the filter code from the filter option code.

A/1

The option selected for filter A is 1.

&

Hard AND – Both conditions must be true for the entire rule to be true.

A/1&B/2

The option selected for filter A is 1 and the option selected for filter B is 2.

+

Soft AND – Works like the hard AND, but you use it with two or more options for the same filter.

A/1+2

The options selected for filter A are 1 and 2.

#

Hard OR – At least one condition must be true for the entire rule to be true.

A/1#B/2

The option selected for filter A is 1 or the option selected for filter B is 2.

,

Soft OR – Works like the hard OR, but you use it with two or more options for the same filter.

A/1,2

The option selected for filter A is 1 or 2.

()

Parentheses – Group one or more conditions that the system evaluates together.

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

Either the option selected for filter A is 1 and the option selected for filter B is 2, or the option selected for filter C is 3.

[]

Square brackets – Verify the value of a filter option using the following operators:

  • equals to

  • greater than

  • less than

  • begins with

  • contains

  • ends with

The tilde symbol (~) identifies a range of numbers.

To evaluate the filter option against a sequence of characters (letters and numbers), enclose the value in quotation marks. You can verify the value for any type of input box answers.

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 value entered for filter A, option 1 is oak.

The value entered for filter A, option 1 begins with o.

The value entered for filter A, option 1 contains a.

The value entered for filter A, option 1 ends with k.

The value entered for filter A, option 1 is 10.

The value entered for filter A, option 1 is greater than 10.

The value entered for filter A, option 1 is less than 10.

The value entered for filter A, option 1 is greater than or equal to 10.

The value entered for filter A, option 1 is less than or equal to 10.

The value entered for filter A, option 1 is between 10 and 20.

X()

NOT – Used to negate a condition. If the condition is false, the rule is true.

X(A/1)

Option 1 isn't selected for filter A.

*

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

A/1*

A/*1

A/*1*

The selected option code for filter A begins with 1.

The selected option code for filter A ends with 1.

The selected option code for filter A contains 1.

%%

Unselected filter – Identifies a filter where no options where selected by users.

A/%%

No option is selected for filter A.

*/*

Any filter and option combination – The system always evaluates the rule as true. For example, an additional item is always suggested to users.

If the asterisk replaces only the filter code, the rule is true if the user selects any filter option.

*/*

A/*

The rule is always true, regardless of the filter and option combination.

Filter A has selected options.

[x;x=“”]

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

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

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

Related Topics

General Notices