Version: eXtendPS-SE 1.3.7 and above
Audience: Administrator, Developer

In the Product Data 2.0.0 service, the product pricing information is sent in the GetProductResponse() reply.

We support sending product pricing data using two methods:
1. From the NetSuite item record's quantity pricing details.
2. From Cache.

The first method takes some time to generate the response since additional saved searches are executed for fetching the data from the item's quantity pricing table. To enable this method you will need to check the "FETCH PRODUCT PRICE REALTIMEcheckbox which is present on the Other Configuration subtab of the Product Data Setup screen. The default behavior is the second method - the cached approach.

Image Placeholder

Details are below regarding some additional configurations which are required for showing the pricing information in a Product Data 2.0.0 response:

A. Product Data Setup Screen Configuration

Specify values against the fields below which are present on Product Data Setup screen under the Other Configuration subtab:

i. FETCH PRODUCT PRICE REALTIME - This field determines whether to send the pricing data response in realtime or from the item record's quantity pricing table as discussed above.

ii. INDUSTRY DISCOUNT CODE* - Field present on your item record which is used for storing the industry discount code for the item.

iii. PRICE GROUP NAME* - Field present on your item record which stores the value of the pricing group.

iv. PRICE GROUP DESCRIPTION* - Field present on your item record which stores the value of the price group's description.

The field Id can be specified in below format as well:
  1. Use text:{HARDCODED_VALUE} if you want to include a static response.
  2. {fieldIdA},{fieldIdB},{fieldIdC}…. if you want to include first non-null field in the response.
  3. fn:{FUNCTION_NAME} if you want to include the response from a JS function defined in JS file: suite_promoapi_invoice_transformers.js .
v. PRODUCT PRICE GROUP SEARCH - Saved Search ID of the search which will be used for fetching the product pricing group in real-time.

Note: If a functional mapping is provided then  for ii, iii, or iv above, please make sure to add the associated item field ids which are being used in the Additional Item Search Columns field.

Image Placeholder

B. Transformers File Configurations


Add the following snippet based on the available currency types in the file suite_promoapi_invoice_transformers.js which is present in your NetSuite account. You can find this value using the NetSuite Global Search.

//#region  Configuration for Product data 2.0
//Update this according to the client account specifications
var PRODUCT_DATA_2_CONFIG = {
    SUPPORTED_CURRENCY_SUBLIST_IDS: ['price1', 'price2', 'price3', 'price4'],
    CURRENCY_SUBLIST_ID_MAP: {
    'price1': 'USD',
    'price2': 'GBP',
    'price3': 'CAD',
    'price4': 'EUR',
    'price': 'USD' // This is for supporting Non-multicurrency price feature.
    },
    DEFAULT_CURRENCY: 'USD',
    MAX_QTY_LIMIT: 99999999,
    DEFAULT_BASE_PRICE: {
    text: 'Base Price',
    value: 1,
    },
    MAX_PRODUCT_PRICING_SEARCH_LIMIT: 1000
};
//#endregion

/**
 * @param {Object} args
 * @param {Object} args.itemSearchResults
 * @param {Object} args.itemSearchResult
 */
function getProductDataMaximumQuantityForPricingGroup(args) {
  var itemSearchResults = args.itemSearchResults;
  var itemSearchResult = args.itemSearchResult;

  return PRODUCT_DATA_2_CONFIG.MAX_QTY_LIMIT;

}

You can change the Base Currency and Default Base Price based on your requirements.

NoteWhile setting the glom data for Item pricing, we are using MAX_QTY_LIMIT(max quantity limit) as this is required for the Product data 2.0 response. It can be changed as per your requirements.

If you have any other currencies configured in your account, add those mappings in the snippet above. Use the suffix as "price" before the internal ID of your custom currency.

Image Placeholder

C. WorkFlow Configurations


A bundled workflow "eXtendPS-SE Glom Item Price[B]" is provided for updating item pricing cache.

We recommend copying this bundled workflow and adding any additional criteria based on your requirements to it.

Note: NetSuite's price levels mapped with the list price in the Product Pricing and Configuration setup will be returned in the product pricing array in the GetProductResponse response. For configuring list prices to be returned, specify the mapping between the NetSuite Price Level and the PromoStandards Price Type "list" in the Product Pricing and Configuration setup.

In the example below, NetSuite's price levels are "List Price" and "5% Discount Level", and those will be returned in the product pricing array in the Product data 2.0.0 response.

Image Placeholder