Include Prices When Adding Materials Using Scripts in NetSuite
Automatically create pricing records when adding materials using scripts in NetSuite CPQ Configurator.
TL;DR Opening
When adding materials in NetSuite CPQ Configurator, you can automatically create associated pricing records by using the itemPrice parameter in scripts. This enhancement streamlines the configuration process for pricing materials effectively.
How Does this Feature Work?
Starting in NetSuite CPQ Configurator version 1.9.1, users can specify prices for materials during the configuration process. By setting the itemPrice parameter to true in the addRuleset() function, a pricing record is created for the current configuration session.
Code Sample for Adding Material with Price
Here’s an example of how to incorporate the itemPrice parameter:
1addRuleset({2 type: 'material',3 item: '859',4 rule: '*/*',5 itemPrice: true6});Price Label Sources
The price label for the material is derived from the name parameter within the addRuleset() function. If you do not provide a name, the system defaults to using the Display Name/Code from the corresponding item record. If that field is also empty, the material price will display without a label, though the amount will still be shown in the product interface.
Visibility on the Product Interface
On the product interface, material pricing information can be found in:
- Audit menu > Pricing
- Summary section
- Total for the configured item
This visibility ensures users have access to important pricing information directly as they configure items.
Who This Affects
- Developers: Need to adjust scripts to accommodate new pricing functionality.
- Administrators: Oversee configurations and ensure consistency in pricing display.
- Product Managers: Benefit from clearer pricing structures during product configuration.
Key Takeaways
- Use the
itemPriceparameter to link pricing to materials in scripts. - If the
nameis omitted, the Display Name/Code field will be used as the label. - The total configured item price will be visible in multiple sections of the product interface.
Source: This article is based on Oracle's official NetSuite documentation.
Frequently Asked Questions (4)
Is the 'itemPrice' parameter available in all versions of the NetSuite CPQ Configurator?
What happens if I don’t provide a 'name' parameter when using the 'addRuleset()' function?
Where can I find the material pricing information on the NetSuite CPQ product interface?
Do developers need to modify existing scripts to incorporate the new pricing functionality?
Was this article helpful?
More in SuiteScript
- N/https Module: Binary File Support in NetSuite 2025.2
NetSuite 2026.1 adds binary file support to N/https for streamlined file handling.
- Attach and Detach Operations in NetSuite 2026.1
Attach and detach operations for record relationships in NetSuite enhance data management and connectivity.
- Create-Form Operation in NetSuite 2026.1 REST Web Services
Create-form operation in NetSuite 2026.1 APIs streamlines record creation and enhances efficiency.
- Improved Execution Log Support in NetSuite 2026.1
Improved execution log support in NetSuite 2026.1 aids debugging and performance tracking for developers.