Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
dPOC.docx
1. [UISU-3260] Approval Flow
Requirements:
1) Fields to be added to Cart:
1) Approval before Omprompt - checkbox
2) Approvers - Text
2) Fields to be added to Order:
1) Approval before Omprompt - checkbox
2) Approvers – Text
3) Add a new status picklist value called "Awaiting Approval" in Order.
4) Email Template to be created that is sent to the approver.
Rationale to create new fields:
Order and Cart Object:
1) Approval before Omprompt – This field is used to ensure whether the current order
goes through the approval process or not.
2) Approvers – This field is used to store the ids of the buyers (aka contacts under
account)
Steps Approval Assignment/Email Notification
1) Create an LWC component for the approval process to be placed in the checkout
summary subflow. The LWC component will display the contact names under the
account as a picklist for the list of approvers.
2) The LWC component will first ask the user if the approval process is required? If yes,
update the "Approval before Omprompt" checkbox field in cart to true.
3) Fetch the account Id from the cart Id and show the list of contact names (approvers)
in the picklist.
4) On click of the approver, an apex class updates the field "Approvers" to the approver
Id in cart which will be the user id of the contact. When the approver is changed, the
apex class is called again which overrides the "Approvers" field in cart.
5) When the "Place Order" button is clicked, the fields "Approval before Omprompt"
and "Approvers" is copied from cart to order fields “Approval before Omprompt”
and “Approvers” respectively.
6) Create the approval process on the Order object with entry criteria and the approval
step to be submitted manually.
7) Create an approval process on the order object with entry criteria
8) Assign the email notification template to the approval flow
9) On the initial submission action of the approval process, the status of the order is
changed to "Awaiting Approval" and an email alert is sent to the approver.
10) On the approval step, assign the approver to submit it manually.
11) In the subflow "Payment And Billing Address", the approval process action is called
after the apex action which then triggers the approval process (OOTB) on the order
object. Record Id, Approver Id and Submitter Id are passed to the approval process.
12) After the apex action copies the field values from cart to order, using the get records
element, fetch the approvers fields from order and pass it to the approval action.
2. 13) On the approval action in flow, pass the order id and the user id of the contact to the
assigned approvers.
14) When the approval action is triggered in the flow, the approval process is triggered,
and the approver is notified via email.
15) Once the approver approves the order, the “Approved” checkbox in the order object
is marked true.
Questions:
1) Is contacts under the accounts the list of approvers? or is there another list of
approvers that will be assigned to the contact?
2) Will there be multiple approvers?
3) What is the content of the email that is to be sent to the approver and how will they
approve?
4) How will approver approve the order?
5) Will there be a notification alert inside the system?
User story on how order will be approved:
1. Approver logs in to the system
2. Notification alert will be displayed in this section
3. A new tab is added “Items for Approval”
4. When “Items for Approval” tab is clicked, the approval page will then display the list
of orders for approval. This will be the table
Action PO Number Order Date
VIEW ORDER WEBSF-VH-011221-0824-105 01-12-2021
VIEW ORDER WEBSF-VH-011221-0824-106 01-12-2021
5. When View Order is clicked, the approver is redirected to the Order Details Page
6. There will be an Approve and Reject button
7. When Approved, an email will be sent to the Omprompt
8. Order status will be changed to Approved
9. When Rejected, no email will be sent.
Process Flow:
3. Note: No order is sent to
Omprompt before approval
using this class