Including Additional Conditions in Rules and Actions with Predefined Answers
Predefined answers (formerly called system Q/As or system QAs) are fixed questions and answer combinations included in NetSuite CPQ Configurator. You can use predefined answers as variables to include additional conditions in rules and actions when activating or hiding building blocks and performing tasks. These conditions are based on information from your NetSuite account.
In rules, use this syntax to reference a predefined answer:
Q/A[="value"]
For example, you can include a predefined answer in a tab rule to display this tab only for administrators:
SOLE/ROLEID[="administrator"]
Predefined answers with SOLE as the question code contain information about the configuration. The NS question code is used for predefined answers with information about the transaction and your account. Most predefined answers are read-only, but a few can be set or edited using actions and functions.
You can view most predefined answers and their values under the Data option in the Audit menu on the product interface.
For more information, see the lists of predefined answers grouped by the type of information they store:
Predefined Answers for User Information
The following table introduces predefined answers that store user session information.
Predefined Answer |
Description |
Value Example |
Read-Only |
---|---|---|---|
SOLE/USER_NAME |
User name |
Name Surname |
Yes |
SOLE/USER_LOCATION |
User location ID |
— |
Yes |
SOLE/USER_EMAIL |
User email |
name.surname@oracle.com |
Yes |
SOLE/USER_DEPARTMENT |
User department ID |
— |
Yes |
SOLE/USER |
Logged in employee internal ID |
— |
Yes |
SOLE/ROLEID |
User role name |
administrator |
Yes |
SOLE/ROLECENTER |
User role center name |
BASIC |
Yes |
Predefined Answers for Transaction Information
The following table introduces predefined answers that store transaction information.
Predefined Answer |
Description |
Value Example |
Read-Only |
---|---|---|---|
NS/CURRENCY |
Currency name |
USD |
Yes |
NS/CURRENCYCODE |
Currency internal ID |
— |
Yes |
NS/ENTITYID |
Customer Internal ID (Customer selected on the transaction) |
— |
Yes |
NS/RECTYPE |
Transaction type name |
salesorder |
Yes |
NS/SODATE |
Transaction Date |
2/5/2024 |
Yes |
Predefined Answers for Configuration Information
The following table introduces predefined answers that store configuration information.
Predefined Answer |
Description |
Value Example |
Read-Only |
---|---|---|---|
SOLE/IMAGES |
The array of JSON objects with the active images. Its content is sourced from the image preview on the product interface. |
[{"url": |
No |
SOLE/MAT_PRICE |
The price of a single configured item. The value is sourced from the Subtotal field on the product interface. |
— |
Yes |
SOLE/QUANTITY |
The quantity of the configured item. The value is sourced from the Quantity field on the product interface. |
— |
No |
SOLE/QUANTITY_CHANGE |
Detects when users manually change the value of the Quantity field on the product interface. If users change the value, this predefined answer becomes true and resets to false on the next mouse click. |
true |
Yes |
SOLE/TOTAL_PRICE |
The total price from the Total field on the product interface. |
— |
Yes |
SOLE/ITEMID |
The internal ID of the base item. |
— |
Yes |
SOLE/TAB |
The active tab code. The value is sourced from the Code field on the tab record. |
TAB1 |
Yes |
Predefined Answers for Configuration Information Storing JSON Objects
These predefined answers store configuration information as arrays of JSON objects:
-
SOLE/ITEMS – Stores the list of active additional items. For more information, see SOLE/ITEMS.
-
SOLE/MATERIALS – Stores the list of active materials. For more information, see SOLE/MATERIALS.
-
SOLE/ROUTING – Stores the list of active routing steps. For more information, see SOLE/ROUTING.
A building block is active when its rule matches the answers users select on the product interface.
These predefined answers aren't displayed under the Data option in the Audit menu on the product interface. Additional items, material items, and routing steps have dedicated entries in the Audit menu. You can also use these predefined answers to create table sections in NetSuite CPQ Proposal Generator templates. For more information, see Adding Content to Sections.
SOLE/ITEMS
The SOLE/ITEMS predefined answer stores an array of JSON objects that represent the list of active additional items in the configuration. See an example with one additional item:
[
{
"id":"124",
"item":"2180",
"ext":0,
"itemid":"LAMP-A1000-01",
"itemQA":"",
"qty":1,
"price":"300",
"desc":"Desk lamp",
"pricemul":"1",
"name":"Desk Lamp",
"itemname":"Desk Lamp",
"itemQA_res":"LAMP-A1000-01",
"displayItemId":"LAMP-A1000-01",
"colmap":{
}
}
]
The following table summarizes the JSON properties for the SOLE/ITEMS predefined answer. Most properties reference fields on the additional item record. If a property reference a field on another record or the source record may be unclear, the record name is explicitly stated. Field names are marked in bold. For more information about additional items, see Including Additional Items Related to the Configurable Item.
JSON Property |
Description |
---|---|
|
The internal ID of the additional item record. |
|
The internal ID of the item record associated with the additional item. |
|
The additional item Quantity multiplied by the Average Cost from the related item record. |
|
The Item Name/Number of the item record associated with the additional item. |
|
The resolve expression entered in the Resolve Item Name/Number field. |
|
Quantity |
|
Price |
|
Description |
|
Price Multiplier |
|
The Item Display Name field of the corresponding item record. |
|
Name |
|
The resolved value from the Resolve Item Name/Number field. |
|
The Item Name/Number of the item record associated with the additional item. |
SOLE/MATERIALS
The SOLE/MATERIALS predefined answer stores an array of JSON objects that represent the list of active material items in the configuration. See an example with one material item:
[
{
"id":"212",
"item":"2185",
"qty":1,
"route":"105",
"phantom":false,
"itemQA":"",
"units":"",
"comp_yield":"97",
"colmap":{},
"desc":"Side panel with clear gloss finish",
"itemQA_res":"SIDE-PANEL-24X12",
"displayItemId":"SIDE-PANEL-24X12"
}
]
The following table summarizes the JSON properties for the SOLE/MATERIALS predefined answer. Most properties reference fields on the material item record. If a property reference a field on another record or the source record may be unclear, the record name is explicitly stated. Field names are marked in bold. For more information about materials, see Defining Materials for the Configurable Item.
JSON Property |
Description |
---|---|
|
The internal ID of the CPQ material item record. |
|
The internal ID of the item record associated with the material item. |
|
Quantity |
|
The internal ID of the CPQC routing step record associated with the material. |
|
Phantom Material The property value can be true or false. |
|
The resolve expression entered in the Resolve Item Name/Number field |
|
Primary Units Type |
|
Component Yield |
|
Description |
|
The resolved value from the Resolve Item Name/Number field. |
|
The Item Name/Number of the item record associated with the material item. |
SOLE/ROUTING
The SOLE/ROUTING predefined answer stores an array of JSON objects that represent the list of active routing steps. See an example with one routing step:
[
{
"id":"125",
"name":"Desk Assembly",
"comments":"Assemble desk",
"opseq":"1",
"r_opseq":"1",
"stime":"15",
"rrate":"10",
"mwc":"1728",
"mct":"1",
"colmap":{}
}
]
The following table summarizes the JSON properties for the SOLE/ROUTING predefined answer. These properties refer to fields on the routing step record. Field names are marked in bold. For more information about routing steps, see Defining Routing Steps to Build the Configurable Item.
JSON Property |
Description |
---|---|
|
The internal ID of the CPQC routing step record. |
|
Name |
|
Comments |
|
Operation Sequence Doesn't display the returned value of resolve expressions. |
|
Operation Sequence Displays the returned value from resolve expressions. |
|
Setup Time (min) |
|
Run Rate (min/unit) |
|
Manufacturing Work Center |
|
Manufacturing Cost Template |
Related Topics
- NetSuite CPQ Configurator Products
- Working with the Product User Interface
- Calculating the Final Pricing for the Configurable Item
- Including Additional Items Related to the Configurable Item
- Creating Work Orders for Configured Items
- Creating Items Required by the Configuration
- Creating Records Required by the Configuration
- Setting Transaction Body and Line Fields Based on Configuration Data