Christmas Automation with SuiteCloud Platform (Part I)

Wilson Cheng
4 min readDec 28, 2021

--

Demonstration for the Automation

In the spare time of Winter Christmas Holiday, I was thinking any business Scenario that I can practice my NetSuite Coding. I just come out with this idea when finding a lot of Christmas Gift Card and Seasonal Donuts in the Supermarket. I spent 4 evening to complete this mock project and find some interesting to share.

As the coding and Set Up is quite long, we will focus the Demonstration in this Part first. The Highlight for SuiteScript will be explain in part 2 and 3.

Here is the the Flow for the Business Scenario with 5 Steps:

Design Flow for Gift Card Redemption Mock Project

Step 1A) Set up the E-Gift Card (D-001-G2) as Non-Inventory Item for Sales

  • Set as a Gift Card items. (Trigger for Automation)
  • Conversion Items code and Conversion QTY are set as D-001 and 2 respectively. (i.e. 1 Gift Card can redeem 2 Chocolate Sprinkles Donuts).
  • Non-Inventory is chose because there is no Limitation for physical inventory and Storage.
Non-Inventory Item (Chocolate Sprinkles Donut)

Step 1B) Mass Creation for Redemption Code for Gift Card

Redemption Code is a series of non-meaning and random character, which is attached to each Gift Card.

In the custom interface for Mass Generation, we can design the code with

  • Length of the Coupon Code
  • Expired Date of Gift Card
  • Is the Code including Upper Case / Number / Symbol.
  • How many Set of Code to be Generated
Custom Interface for Code Generation

Beside generating the code, we also generate Link for Redemption and its QR Code. When the customer visit the physical shop, they can show the QR for ShopKeeper to Scan for Redemption instead of providing the chunk of code.

Mass Creation of Code and QR Code.
Interface for Individual Gift Card

Step 2) Create the Sales Order in the standard NetSuite Interface

Retailer only entry Customer Name, Email and Gift Card items Code in the Sales Order UI. The Automation will be Triggered as below:

  • Link the sales order (i.e. SO #48) to corresponding E-Card Record
  • Updated the Memo Fields with E-Card internal Id
  • Update the Line Items if its E-Card is generated (i.e. Card Generated = T)
  • Update the Sales Order Field (i.e. SO #48) in each Gift Card record.

* Remark

Automation in Sales Order is highlighted as Red Box
Auto Link the Sales Order to corresponding available E-Card

Step 3) Auto Email to Customer with series of E-Card QR Code

NetSuite will Auto create a HTML files in File Cabinet, which contain all QR Codes in this Sales Order. In this Example, there are 4 pieces of Card and QR Code.

Auto E-mail Example

Step 4) Retail Store Redemption Flow

  • Customer show the QR Code in the Mobile or Print out. (left hand side)
  • The Shopkeeper scan and open the Redemption page accordingly (Right hand Side)
  • Shopkeeper will verbally confirm the Sales Order Number with Customer for double verification (i.e it Can be Phone number or anything else) in order to prevent someone steal the code.

Remark:

  • Each Code is for each Gift Card.
  • Whole process is within 10 Seconds, which is good for the fast moving situation in retail store.
Redemption Process in the Retail Store

Step 5) Auto Update SO and Gift Card record in the backend.

To complete the whole cycle, the related Gift Card Record is updated automatically with following:

  • Set Redeem Status to “True” (For avoid Deplication)
  • Update the Shopkeeper Employee ID
  • Update the Location for redemption

And the Sales Order is updated Automatically as following:

  • Deduce the QTY of E-Card by 1 piece (i.e. D-002-G2, 3>2)
  • Add the 1 physical Donuts (i.e. D-001) into the Sales Order for Inventory Reduction in Bulk.
Gift Card Record — Auto Update in the Backend
Sales Order Record — Auto Update in the Backend

Conclusion and What’s next?

Thank you for your reading. Hope you understand and feel interesting for this demo of automation. We will deep dive the Set Up Coding Session how I using SuiteLet and User Event Script in part II. If you are interested in any specially step or any suggestion, please feel feel to comment.

My Favourite Donuts in UK Life (25P)

Merry Christmas!

  • Design and Code by Wilson Cheng.

--

--

Wilson Cheng

Sales/ Engineer/Hobbyist for Enterprise Management Solution.