Hello. Sorry for late reply. Let me show few screen shots to demonstrate my idea.
This is Execute Automation Command
action. It basically executes an action.
When I select an order and click Discount
Button this rule executes.
It asks for [:?Discount Amount] and executes two automation commands. It sets Discount Amount
to Command Value.
Hint multiple [?:X] queries executes once.
First automation command Executes Update Discount if Zero
command and the other one executes Update Discount if Not Zero
command. As you can see we set no constraints here. Since it executes automation commands we can use rule constraints.
Hint: We don’t need to add automation command records for Update Discount… Commands. We can just handle it by writing command name in rule constraint.
This is how Update Discount If Zero
Rule configured.
Since I didn’t configured Update Discount if Zero
command it will not appear in drop down list but I can type command name there. It simply checks if Command Value (Discount Amount) zero or empty and if so it executes Remove Discount
action.
This is how I’ve configured Update Discount if Not Zero
rule.
This one adds discount value if something entered other than 0 or nothing. As you can see I’m using [:CommandValue] to calculate discount amount.
I think this is more powerful than using action constraints.