Proposal Summary
This proposal describes the process of sales order approval for customers having discount and sending acknowledgement regarding the approval through email.
Requirement
Graph Tech needs to do some customizations in the approval process of Sales order for customers having discount.
New sales orders to be generated in the NetSuite must be in the “Pending Approval” status while the customer level is any of the following and not be a Retailer.
- Builder
- Artist
- Dealer
- Distributor
- OEM
We will do the approval when it satisfies any of the following conditions.
- When the Item level pricing is CUSTOM and Unit pricing is less than or equal to Zero
- When the Discount is 100%, then the amount will be automatically set to Zero
Also, when an order is pending approval, we need to send a notification to a specific people to approve the corresponding sales order and when an order is approved, we need to send an acknowledgement email to the Sales Order creator.
Our Solution
Setting Orders for Approval
We will develop a User Event script which will trigger in the Before Load and after Submit of the Sales Order record.
After Submit Trigger will update the status of the current Sales Order to “Pending Approval” when it satisfies any of the following conditions at the CREATE and COPY context of the Sales Order record:
- When the Item level pricing is CUSTOM and Unit pricing is less than or equal to Zero
- When the Discount is 100%, then the amount will be automatically set to Zero
- When the any discount is applied for regular pricing
We will consider the above conditions if and only if the customer level is related to a wholesaler and not to a Retailer.
The customer level will be identified from the CHANNEL field (Field ID: custbody_eb_channel) in the Sales Order record.
If the CHANNEL contains any of the following value, we will continue the approval process
- BUILDER
- DEALER
- DEALERA
- DISDOM
- DISINT
- OEM-2
- OEMDOM
- OEMINT
- ARTIST
If the CHANNEL is “RETAIL-TELEPHONE” and “WEBSTORE” then, Sales order will be automatically approved.
Email Notification for Orders need Approval
If a new Sales Order has been created using the status of “Pending Approval” then, we will send a notification by email each time, indicating that there is a new Sales Order to get approval.
We will attach the Sales Order link to be approved in the email.
Email Notification to Creator
Once the Sales Order is getting approved, then we will send another email to the Sales Order creator by indicating that the “Sales Order has been approved”. In this case also the sender will be the administrator and will identify the receiver from the field “created by” (fieldID: createdby ) in the Sales Order record.
This acknowledgement email will send in the following situations
- When we edit the Sales Order and changed the status to “Pending Fulfilment”
- When we approve the Sales Order by clicking the APPROVE button in the Sales Order.
- When we edit the record inline and change the status.
Custom Record set up for Rejection
We will deploy a workflow on Sales Order Records. The workflow will work as follows:
- The Standard “Approve” button and “Reject” custom button will be displayed after the sales order is saved.
- Once clicked on “Reject” button the user will get navigated to the custom record, where the user can add the following details -:
- Sales Order creator
- Approver
- Reject Reasons
- Once submitted the custom record created after the rejection and the status of the Sales order will be “Pending Approval”.
- The record again will be unlocked for the Sales order creator, the creator can edit and resubmit for approval.
- Otherwise, if clicked on the “Approve” button, the sales order status will be updated to “Pending fulfilment”.
- Sales order get locked from all users except Administrator after approval from the users
Assumptions
- If the channel field is empty, then the script will not do anything in the Sales Order approval status
- All orders creating through the B2B portal will be in “Pending Approval” status
- Once email has been sent for approval of order and order has been deleted in NetSuite, the link in the email sent to client will be invalid
Risks
- We will not be adding any restriction for users to approve the order. Currently, those roles who have permission to approve an order in Netsuite will be permitted to do so.
- We will not be considering the orders approved by bulk approval page in the development.