Custom Promotion Proposal

PROJECT GOALS

Purpose

Custom solution – “NBS Promotion” design 

Types of Promotions:

  1. Promotion Type – Minimum Order only on the 1st Order 
    1.  Description
      1. Buy any items
      2. minimum total order amount AND
      3. this is the customer 1st order
      4. and get total Z % discount
      5. optional start and end date
    2. Solution
      1. Custom solution – “NBS Promotion”
        1. Result – discount item will be added under each discounted item
  2. Promotion Type – Buy X from Group of Items Get Y%
    1. Description
      1. Buy any items from a selected group of items
      2. minimum Y qty PER each item
      3. and get Z% discount for qualified items only
      4. optional start and end date
      5. optional only in the first X period of the customer lifetime
                                                                    (fe only in the  first 3 months)
    2. Solution
      1. Custom solution – “NBS Promotion”
        1. Result – discount item will be added under each discounted item
  3. Promotion Type – Buy X from Group of Items Get Y% AND Minimum Order
    1. Description
      1. Buy selected group of items
      2. minimum Y qty PER each item AND
      3. minimum of total order amount
      4. and get Z% discount for qualified items only
      5. optional start and end date
      6. optional only in the first X period of the customer lifetime
                                                                    (fe only in the  first 3 months)
    2. Solution
      1. Custom solution – “NBS Promotion”
        1. Result – discount item will be added under each discounted item
  4. Promotion Type – Buy Number of Items from Group of Items Get Y%
    1. Description
      1. Buy selected group of items
      2. minimum Y number of different items (any qty)
      3. and get Z% discount for all items
      4. optional start and end date
      5. optional only in the first X period of the customer lifetime
                                                                    (fe only in the  first 3 months)
    2. Solution
      1. Custom solution – “NBS Promotion”
        1. Result – discount item will be added under each discounted item


  5. Promotion Type – Buy Number of Items from Group of Items Get Y% AND Minimum Order
    1. Description
      1. Buy selected group of items
      2. minimum Y number of different items (any qty) AND
      3. minimum of total order amount
      4. and get Z% discount for all items
      5. optional start and end date
      6. optional only in the first X period of the customer lifetime
                                                                    (fe only in the  first 3 months)
    2. Solution
      1. Custom solution – “NBS Promotion”
        1. Result – discount item will be added under each discounted item

  6. Promotion Type – Promise Certain Payment Term and Get Y%
    1. Description
      1. Promise certain payment term (fe cash)
      2. and get Y% discount for all items
      3. optional start and end date
      4. optional only in the first X period of the customer lifetime
                                                                    (fe only in the  first 3 months)
    2. Solution
      1. Custom solution – “NBS Promotion”
        1. Result – discount item will be added under each discounted item

Components:

  1. NBS Promotion custom record Structure
Field Name TypeMandatoryFunction
Promotion Name text Yes
Buy Itemlist / saved search itemsYesdefine the items customer needs to buy from
Minimum Qty 
IntegerYesdefine the minimum qty the customer has to buy from EACH item
Minimum SKU QtyIntegerNodefine the minimum different SKU qty the customer has to buy
Discount Item list / discount items Yesdefine the discount item to use & the discount % (from the discount item record
Payment Termlist/termsNoselect the payment term to apply discount
Start DatedateNostart of the promotion
End Date date No end of the promotion
Minimum Order amount Nodefine the required minimum order amount (in the order currency)
1st Order Only checkbox Noindicates if apply only to the 1st order of the customer
1st X Period Only 
IntegerNoindicates if apply only in the first X months of the customer
Customers Apply list / saved search customers Yesdefine the eligible customers 

SOLUTION

Prerequisites of the task is as follows:

  1. Need to create a custom record with following fields
Field Name TypeMandatoryFunction
Promotion Name text Yes
Buy Itemlist / saved search itemsYesdefine the items customer needs to buy from : single select, the user select one item’s saved search and promotion need to apply to these list of items
Minimum Qty 
IntegerYesdefine the minimum qty the customer has to buy from EACH item
Minimum SKU QtyIntegerNodefine the minimum different SKU qty the customer has to buy (All the items on the ‘Buy Item’ saved search should present in the transaction with the given ‘Minimum SKU Qty’ as total SKU quantity)
Discount Item list / discount items Yesdefine the discount item to use & the discount % (from the discount item record)
Payment Termlist/termsYesAlways apply when payment term = cash
CombinablecheckboxNoThe checkbox indicates if the promotion can be combined with other promotions
Start DatedateNostart of the promotion
End Date date No end of the promotion
Minimum Order amount Nodefine the required minimum order amount (in the order currency)
1st Order Only checkbox Noindicates if apply only to the 1st order of the customer
1st X Period Only Integer Noindicates if apply only in the first X months of the customer Example : if a user enters 1 in a promotion entry, then that will be applicable only till “same day on next month of customer created date”
Customers Apply list / saved search customers Yesdefine the eligible customers 

NB will create the custom record entries in the client’s account.

  1. Need to create a custom column field on the sales order to store the Promotion Name on the Discount item line. This can be used to identify the Discount items added by custom NBS Promotion script and reset will be done only for those discount lines on the Sales Order Edit
  2. Additional custom Record, attached as child record to Transaction. This will list all the applied NBTY Promotions on the transaction

The description of the task is as follows:

The requirement can be achieved by deploying a User Event Script, Client Script and Suitelet.

The User Event Script will add a button called ‘Calculate NBTY Promotions’ on Create event and Edit Event. The button action will be defined in Client Script. The user should manually click on the button to trigger NBTY Promotion calculation. When the user clicks on this button, the Client Script will create a JSON object containing the customer, list of items, their quantities (and line number) and make a POST request to Suitelet. Suitelet will load all the promotions and will check which all promotions are applicable to current customer. Then, the Suitelet will check which all items are present in each promotion. Then by comparing with the items and quantity on Suitelet request body, it will create a JSON response with details of the promotions that apply and the relevant discounts. Upon receiving the JSON response from Suitelet, the Client Script will inserts/updates discounts into the quote and will also set which is the promotion applied on the custom transaction column field  .

The proposed script will fetch the the promotion code applicable for the items in a Quote by checking the following criterias

  1. Buy Item any of the Quote item
  2. Customers Apply is Quote Entity
  3. Start Date before Transaction Date –OR– Empty
  4. End date after Transaction Date –OR– Empty
  5. Minimum Order is less than or equal to Subtotal –OR– Empty
  6. Either Minimum Qty is empty –OR– greater than or equal to the line item quantity
  7. Either Minimum SKU Qty is empty –OR– greater than or equal to the total quantity of items listed in the ‘Buy Item’ saved search
  8. Payment Term is Cash
  9. If 1st Order Only is True, then check whether the Quote is customer’s first quote
  10. Exclude Promotions that are 1st X Period Only is over 

The promotion code from the above steps will be filtered again based on the Minimum Qty from each line. From the results, script will consider the maximum discount promotion code for each item line based on the percentage defined on the corresponding Discount Item record and it will be added as the next line after the corresponding item on item sublist. Upon adding a discount item, Netsuite populates the amount automatically based on the previous item amount and the discount percentage.

Notes

  • Applicable only to Quote/Estimate
  • Applicable only for Spain Subsidiary
  • Logic will apply only for Inventory Items and Assembly items
  • Payment Terms should be always Cash on NBTY Promotion custom Record and the Quote terms should be Cash for promotion to apply
  • Minimum Order Amount field on NBTY Promotion custom Record will consider only the numerical value irrespective of the currency
  • No Server Side NBTY Promotion will occur. Such promotion can be triggered only by user interaction by clicking on the ‘Calculate NBTY Promotion’ button on Edit/Create mode. Discount lines will be added only after clicking on the ‘Calculate NBTY Promotion’ button
  • There are cases where the applied discount will directly affect the Subtotal instead of being represented in the ‘Discount’ Field. We will always refer the Subtotal Field when ‘Minimum Order’ field is filled with an amount
  • Large Number of NBTY Promotion can affect the performance of script
  • The NBS Promotion code will be applied to each item based on the highest Discount corresponding to that item. This will be done for each item from the first line to last. That means that, if there are combinable promotions, it will check which promotion gives the highest discount/benefit to the customer and will apply that one only.
  • Also, the custom promotion script will not consider whether the Discount/Free Items added or not by NS SuitePromotion. So the items from the Gift Promotion will be excluded if the “Free Gift Promotion” field on the item line is not empty.
  • We assume that 
    • The field “1st Order Only“ is used to mark that promotion code can be applied only to the first Quote of a customer after creating that customer in Netsuite. So that second Quote onwards the script will not consider that Promotion Code even though that code is not applicable to the first Quote due to other criteria failure.
    • The amount added on the Minimum Order will directly compare with the Subtotal of the order. The script will not perform any conversion on the minimum order amount based on currency. So if the Amount added is 1000, then it will take as $1000 for US currency transaction and €1000 for EUR currency transactions. 
    • If a single item entered multiple times in a Quote, then that line will be considered separately for identifying the applicable promotion. So the Minimum Qty will be compared only with the quantity from the current line. 
  • In case any Discount item that is used in the custom Promotion entry has been made inactive, then the proposed script will ignore those Promotions.
  • The closed item lines will be ignored in the Promotion code setup script

RESULTS AND EVALUATION 

  • Login to Client’s Account
  • Create a Quote with required details
  • Click on apply NBTY Promotion button
  • Check whether the Promotion codes are applied to each line if any codes are applicable based on the criterias.

TIMEFRAME

Estimated Effort: 40 hrs

Leave a comment

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