Overview
Recently, I was a part of a Consumer products implementation, specifically focusing on the Procure to Pay side of the integration. This client had no 3rd party Procure-To-Pay integrations, and would be entering Purchase Orders, Vendor bills and Item receipts manually into NetSuite. Focusing primarily on their Purchase Order Approval workflow, the team had a few business requirements we had to keep in mind:
- The purchase Orders (PO’s) will need to always be approved by the “Department head” of the department selected at the header level first
- It would then need to be approved by the accounting team if the total was greater than $5000
- After approved by the accounting team, it would need to be approved by Executive finance members if the total was greater than $500,000.
- Lastly, the Purchase order would require CEO approval if the order was greater than $1,000,000
Initially the setup was very straight forward. One approval triggered the other until it reached the approved state. A Custom field was added to the Purchase Order record called “Next Approver” that would populate with a specific user if they were the department head, or CEO, and the approve button was locked behind user restrictions. Additionally, conditional transitions were setup to restrict the flow based on Total dollars of the Purchase Order. This is where issues started to arise. Since this client was entering POs in currencies such as JPY or INR, the total amount was very high, but the converted USD value was relatively low. For example, an accountant in their India Subsidiary would enter a purchase order for 600,000 INR. The total on the purchase order would be 630,000 (including tax) and would trigger that Executive finance approval when in actuality this was unnecessary as the converted USD amount was roughly $7,400. A buildup of PO’s began at the executive level for non-USD Purchase orders and a workaround had to be implemented.
In Depth look
Previously the transition between states was executed off of a condition such as: “Total >= 500000”. After some research it was made clear that if a saved search was pulled for all Purchase Orders, the resulting “Amount” field was a calculated value based on the record Total, and the exchange rate for that specific currency. Knowing now we had to drive the transition between approval states on that field, many saved searches were created. The Saved search criteria is highlighted below:
In this we can see the Transaction type is filtered to Purchase Orders, we are exclusively taking the Main Line of each PO, and the “Amount” field must be greater than or equal to $500,000. This search was then copied for each dollar approval threshold. Let’s take a look specifically at these two transitions for orders that are either greater than or less than $500,000.
For the first transition, if a Purchase order populated in the saved search for being >= $500,000 USD, it would flow to Finance Executive approval AFTER the accounting team has approved. This is because the transition only executes based on the “Saved Search Condition”. If it was in the saved search condition for being <$500,000, it would be approved by the accounting team, routed automatically to the approved state, and the workflow finished. The final result of all of these criteria led to a workflow that