How to create Approvals based on dollar Amount in Text field of Catalog Item?

VIKASM535239375
Kilo Sage

How to create Approvals based on dollar Amount in Text field of Catalog Item?

 

If Dollar Amount > 50 it should go to Approver A

If Dollar Amount > 50 and < 100 than it should go to Approver A and Approver B

If Dollar Amount > 100 than it should go to Approver A ,Approver B and then Approver C

 

and then Catalog Task should be created

6 REPLIES 6

priyatam_pvp
Tera Guru

If you are using the workflow, you can use the approval user action and use the script as mentioned below.

priyatam_pvp_0-1740775598057.png


Script :

// Initialize the answer variable as an array
answer = [];

// Get the dollar amount from the current record
var dollarAmount = parseFloat(current.variables.dollar_amount);

// Define approver sys_ids (Replace with actual user sys_ids)
var approver_A = '62826bf03710200044e0bfc8bcbe5df0'; // Approver A
var approver_B = 'ba8a6bf03710200044e0bfc8bcbe5df1'; // Approver B
var approver_C = '7f8a6bf03710200044e0bfc8bcbe5df2'; // Approver C

// Determine approvers based on dollar amount
if (dollarAmount > 50) {
answer.push(approver_A);
}
if (dollarAmount > 50 && dollarAmount < 100) {
answer.push(approver_B);
}
if (dollarAmount > 100) {
answer.push(approver_C);
}


If you want to do the same in flow designer, let me know.

Please Mark it helpul
Regards
Priyatam

 

Medi C
Giga Sage

@VIKASM535239375 
If you are using Flow Designer, you can do that using  3 "If" Flow logic.
If Dollar > 50  --> Ask for Approval A
if Dollar < 100 and > 50 -->Ask for Approval B
if Dollar > 100 -->Ask for Approval C.

If the approval has to be triggered in parallel You can modify the conditions and use "Do the following in Parallel" Flow Logic.


If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.

@VIKASM535239375 

Could you accept my solution if it works for you?


If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.

@VIKASM535239375 

 

I hope you are doing well!

Did it work ? Was my reply helpful?


If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.