Storing approvals in a quote
Order approval rules determine the criteria that require a quote to go through the approval process.
When a quote is created or changed, order approval details are created, which contain the information about the criteria that triggered them. When changes are complete in a quote, the quote can be sent for the approval process with the sendOrderForApproval API. The sendOrderForApproval API evaluates all applicable approval plans, and creates order approvals and order approval details based on the same order approval rules, but specific for each approval plan. For additional information about the sendOrderForApproval API, refer to the IBM Sterling® Order Management: Javadoc.
If it is determined that a quote requires an approval and if a hold is configured, the quote is placed on hold. The hold should be configured such that it prevents modification types that can trigger approvals.
For example, consider a quote in which a Field Sales Representative applies a manual discount of 15% to a line item in the quote. In this scenario, a Supervisor is authorized to approve a maximum discount of 10%, a Sales Manager is authorized to approve a maximum discount of 20%, a Vice President is authorized to approve a maximum discount of 50%, and the CEO is authorized to approve a maximum discount of 50%. When the sendOrderForApproval API is called, the following order approvals are created and stored in the quote:
Sequence | Approval name | Team code | User group/ role |
Predecessor sequence |
Mandatory |
---|---|---|---|---|---|
1 | K1 | Sales | Supervisor | ||
2 | K2 | Sales | Sales Manager | K1 | |
3 | K3 | CEO | CEO | K2 | Y |
In this scenario, a Sales Manager is authorized to approve a maximum discount of 20%. Therefore, authorization is not required by the users in the next user group/role-team code in the approval hierarchy, which is a Vice President, because no further approval rules have been violated. Consequently, Vice President is not populated in the order approval plan for this quote. The CEO, however, is populated in the order approval plan for the quote, because CEO is a mandatory approver.
As users from the user groups/roles-team code approve a quote, an order approval table is populated with the identification of the approval rule that was triggered, a key to the sequence of the approvals, and a message and a message code that indicate which rule was violated. This order approval table enables a user to see which line items have triggered which approvals.