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.
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
- SuiteScript 2.1 Enhancements in NetSuite February Updates
SuiteScript 2.1 now supports async features and PATCH method. Discover the latest API and SuiteProcurement improvements.
- Scheduling Map/Reduce Script Deployments in NetSuite
Learn to schedule map/reduce script submissions, including one-time and recurring options in NetSuite.
- API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
- Binary File Support in N/https Module for SuiteScript
SuiteScript enhances capabilities with binary file support in the N/https module, allowing improved data handling in external communications.
