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
- Common SuiteScript Errors and Solutions for NetSuite
Common NetSuite script errors include INVALID_SCRIPT_DEPLOYMENT_ID and SSS_AUTHORIZATION_HEADER_NOT_ALLOWED. Learn effective solutions.
- SuiteScript 2.1 Enhancements and API Updates in NetSuite
SuiteScript 2.1 enables execution of 2.0 scripts and supports PATCH method for enhanced API capabilities.
- Enhancements to SuiteScript User Role Context Clarification
SuiteScript updates clarify the user and role contexts for script executions, improving deployment understanding and management.
- Setting Field Values in SuiteScript for Effective Record
Learn to set field values in SuiteScript effectively, troubleshooting common errors and understanding data types.
Advertising
Reach SuiteScript Professionals
Put your product in front of NetSuite experts who work with SuiteScript every day.
Sponsor This Category