Quantity Pricing in NetSuite Using Saved Searches

Overview: Quantity pricing in NetSuite allows businesses to apply different prices based on the quantity of an item purchased. This guide explains how to use a saved search to retrieve key data related to quantity-based pricing, focusing on the Minimum Quantity field in the pricing records.

Saved Search Explanation

The following code snippet is for a saved search that pulls Inventory Items and their associated Minimum Quantity from the Pricing record, which determines the quantity thresholds for specific prices.

javascript

Copy

Edit
var inventoryitemSearchObj = search.create({
   type: "inventoryitem",
   filters: [
      ["type", "anyof", "InvtPart"],
      "AND", 
      ["isinactive", "is", "F"]
   ],
   columns: [
      search.createColumn({
         name: "internalid",
         summary: "GROUP",
         label: "Internal ID"
      }),
      search.createColumn({
         name: "itemid",
         summary: "GROUP",
         label: "Name"
      }),
      search.createColumn({
         name: "salesdescription",
         summary: "GROUP",
         label: "Description"
      }),
      search.createColumn({
         name: "custitem20",
         summary: "GROUP",
         label: "Included in Promotion"
      }),
      search.createColumn({
         name: "minimumquantity",
         join: "pricing",
         summary: "GROUP",
         label: "Minimum Quantity"
      })
   ]
});

Key Columns and Filters:

  • Minimum Quantity: This field, joined from the Pricing record, indicates the threshold quantity for pricing discounts.
  • Filters: The search only returns active inventory items.

How to Use It:

  1. Volume Pricing Insights: The Minimum Quantity column helps track which items are subject to volume pricing, which is critical for businesses offering bulk discounts.
  2. Promotions: The Included in Promotion field indicates whether an item is part of a promotional offer, based on quantity.

Additional Code Examples for Enhancement:

  • To Include Price Level Information:
javascript

Copy

Edit
search.createColumn({
   name: "pricelevel",
   join: "pricing",
   summary: "GROUP",
   label: "Price Level"
})
  • To Retrieve Discount Information:
javascript

Copy

Edit
search.createColumn({
   name: "discount",
   join: "pricing",
   summary: "GROUP",
   label: "Discount"
})

Conclusion:

This saved search can help businesses track items with quantity-based pricing, manage promotional offers, and ensure accurate pricing setup. Developers can extend this search by adding additional pricing or discount columns to refine the analysis.

Leave a comment

Your email address will not be published. Required fields are marked *