Including Additional Conditions in Rules and Actions with Predefined Answers
Predefined answers (formerly called system Q/As) 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 building blocks and performing tasks. These additional conditions are based on information from your account. In rules, you can use the syntax Q/A[="value"]. For example, you can include a predefined answer in a tab rule to display it only for administrators by using the syntax SOLE/ROLEID[="administrator"].
Predefined answers with SOLE as a question code contain information about the configuration. The NS question code is used for predefined answers containing information about the transaction and your account. A few predefined answers can be set or edited by using actions and functions, but most are read-only.
You can view most predefined answers and their values in the Audit > Data menu on the product user 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 user interface. |
[{"url": |
No |
SOLE/MAT_PRICE |
The price of a single configured item. The value is sourced from the Unit field on the product user interface. |
— |
Yes |
SOLE/QUANTITY |
The quantity of the configured item. The value is sourced from the Quantity field on the product user interface. |
— |
No |
SOLE/QUANTITY_CHANGE |
Detects when users manually change the value of the Quantity field on the product user interface. If users change the value, this predefined answer becomes true and returns back to false at the next mouse click. |
true |
Yes |
SOLE/TOTAL_PRICE |
The total price from the Total field on the top bar of the product user 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
The following predefined answers store configuration information as an array of JSON objects:
-
SOLE/ITEMS – Stores the list of active additional items.
-
SOLE/MATERIALS – Stores the list of active materials.
-
SOLE/ROUTING – Stores the list of active routing steps.
These predefined answers are not displayed in the Audit menu > Data. Additional items, material items, and routing steps have dedicated entries in the Audit menu. Also, these predefined answers can be used to create table sections in NetSuite CPQ Proposal Generator templates. For more information, see Adding Content to Sections.
For more information, see the following help topics:
SOLE/ITEMS
The SOLE/ITEMS predefined answer stores the array of JSON objects corresponding to the list of active additional items. See an example containing 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. When properties reference fields on other records, the record name is explicitly stated. Field names are marked in bold.
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 Item from Q/A field. |
|
QTY |
|
Price |
|
Description |
|
Price Multiplier |
|
The Item Display Name field of the corresponding item record. |
|
Name |
|
The resolved value from the Item from QA field. |
|
The Item Name/Number of the item record associated with the additional item. |
SOLE/MATERIALS
The SOLE/MATERIALS predefined answer stores the array of JSON objects corresponding to the list of active material items. See an example including 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 refer to fields on the material item record. When properties reference fields on other records, the record name is explicitly stated. Field names are marked in bold.
JSON Property |
Description |
---|---|
|
The CPQC material record internal ID. |
|
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 BOM The property value can be true or false. |
|
The resolve expression entered in the Item from Q/A field |
|
Units |
|
Component Yield |
|
Display Description |
|
The resolved value from the Item from Q/A field. |
|
The Item Name/Number of the item record associated with the material item. |
SOLE/ROUTING
The SOLE/ROUTING predefined answer stores the array of JSON objects corresponding to 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. Most properties refer to fields on the routing step record. Field names are marked in bold.
JSON Property |
Description |
---|---|
|
The CPQC routing record internal ID. |
|
Name |
|
Comments |
|
Operation Sequence Does not display the returned value of resolve expressions. |
|
Operation Sequence Displays the returned value from resolve expressions. |
|
Setup Time |
|
Run Rate |
|
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