HUCO-4
Project Goals
Need approval workflow based on the selling price GP value. Role-based approval. Maximum 3 level approval will be there.
Our Solution
Prerequisites
- Need to create a custom record which will store the Approver roles based on the amount. There will be three approvals set up in that custom record. The custom record base field will be Amount. So the approval workflow will identify the Approver from the Custom record that was created for the Amount greater than the Quote Amount.
- Need to create a custom record for storing the reason code when rejecting a Quote
- Custom fields will be created and applied to Quote for storing Approval Status, Level Approvers and Level Approval status.
For example,
- There are two entries in the custom record, One entry for Amount 10 and second entry for Amount 20. If the EST. GROSS PROFIT PERCENT(field id: custbody_est_gross_profit_percent) of Quote is 15, then the Approval we will consider from the Approvers setup on the Custom record for Amount 20.
Description
The requirement can be achieved by deploying a Approval workflow on creation of a quote. The proposed workflow will compare the EST. GROSS PROFIT PERCENT and based on that amount the Quote will go for approval of corresponding Roles. If an amount requires 3 levels of approval, then the Quote will send for the approval in the hierarchical manner. So the Quote will go for second level approval only after getting the approval from Level 1 approver. Similarly, it sends for third level approval only after second level approval. In each level, the Administrator role will have the provision to Approve the Quote on behalf of corresponding Approvers. SInce the Approver is set based on the Role, all the users using the corresponding role will be able to approve the Quote.
The workflow can be designed as follows
- All the Quote created by any user except the Administrator will be set to “Pending Approval”
The Cash Sale and Sales Order create button will get Removed until the Custom Approval status changed to Approved. All the other actions and buttons will be available. - A “Submit For Approval” Button will be displayed for the Quote creator
- Once that user clicks the button, the Quote becomes locked for all employees except for users with the role Administrators.
- An “Approve” and “Reject” button will be set on the Quote record if the current user is with the First Level Approver role or Administrators.
- When any of the Approver clicks the Approve Button, Level 1 status will change to “Approved” and continue in the locked state for all users except Administrators.
- If anyone of the Approver clicks the Reject button, a new window opens for entering the reason code. The Approver user can enter the reason. On submitting the form, the Quote gets rejected, entered reason code will be stored in a custom record and the record again unlocked for the Quote Owners with a “Submit For Approval” Button.
- The Quote Owner gets notified by email whenever an Approval/Reject happens.
- On the Submit for Approval button click by Quote Creator, the Quote again sends for the Approval as same as of the Initial stage (steps from 1-7 will be repeated until the Approval).
- After Level 1 approval, the Quote will send for Second Level and then Third Level Approval as same as of Step 4 to Step 8.
- Once the Top Level approval is approved, then the Custom Approval Status of Quote will set to Approved. The Cash Sale and Sales Order button get enabled to process the Quote
Note
- Netsuite will not trigger any script/workflows on records if that are created from another userevent script. The approval workflow will not trigger for the Quotes that are created using any other userevent script if any.
- Currently Approval is considered based on the EST. GROSS PROFIT PERCENT(field id: custbody_est_gross_profit_percent) from the quote body field. We haven’t considered the value of the population to that field. We just use the value from that field for Approval setup.
- Approval Role should have the permission to access the Quote to Approve
- The users other than the Administrator will not be able to edit a Quote once it is approved.
- The custom record will not have multiple entries for a single amount.
Results And Evaluation
- Login to Account
- Create the Quote using roles other than Administrator role. The Quote will send for the Approval. That needs to be approved in each level by any user with the Approver Role/Administrator. After Final Approval, Sales Order and Cash Sale button will get enabled