Include Prices When Adding Materials Using Scripts in NetSuite

Automatically create pricing records when adding materials using scripts in NetSuite CPQ Configurator.

·2 min read·12 views·View Oracle Docs

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:

javascript
1addRuleset({
2 type: 'material',
3 item: '859',
4 rule: '*/*',
5 itemPrice: true
6});

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 itemPrice parameter to link pricing to materials in scripts.
  • If the name is 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?
No, the 'itemPrice' parameter is available starting from NetSuite CPQ Configurator version 1.9.1.
What happens if I don’t provide a 'name' parameter when using the 'addRuleset()' function?
If the 'name' parameter is not provided, the system defaults to using the Display Name/Code from the corresponding item record as the label. If this field is also empty, the material price will appear without a label.
Where can I find the material pricing information on the NetSuite CPQ product interface?
Material pricing information is visible in the Audit menu under Pricing, the Summary section, and the Total for the configured item in the product interface.
Do developers need to modify existing scripts to incorporate the new pricing functionality?
Yes, developers need to adjust their scripts to include the 'itemPrice' parameter in order to use the new pricing functionality when adding materials.
Source: Include Prices when Adding Materials Using Scripts Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in SuiteScript

View all SuiteScript articles →