AME with 2 conditions with amount
In this case we will just have 2 conditions and approvers groups with a condition of Amount.
If Amount >= 1 million then send to SH(Share holder approver) approver group
If Amount < 1 million then send notification 3 level approver group.
So for this we define a attribute and then we get the amount from our Query
select price_in_usd from xxdpc_penality_details_v where item_key = :transactionId
In the below picture the price_in_usd is the determining amount for our condition.
On condition creation we have to select the Attribute amount and then we will have the condition whether it is equal or less or greater and then we can have our amount.
Take the Approval type with the below option
|approval-group chain of authority||Chain of authority includes an approval group|
Define 2 seperate approver group and I have defined here a dynamic approver group
We can have a stacked users in one query in the below Query
select ‘person_id:’||agent_id from xxdpc_penality_pro where item_key = :transactionId
select ‘person_id:’||(agent_id+1) from xxdpc_penality_pro where item_key = :transactionId
select ‘person_id:’||(agent_id+2) from xxdpc_penality_pro where item_key = :transactionId
Define 2 rules for amount less than and amount greater than equal to
So in one rule
So we have attached Action type which consists of 3 level approver group and condition which is linked with attribute.
Create a another rule with the amount greater condition.
So to Test this we have to Test Workbench → Run real transaction test
So we have linked the transaction Id and from that we have taken the data from the table so I give a test data.
Now we will go with running test case so select Run Test Case
So we will now be able to see the approvers.