I’ve got an odd issue which appears to trigger the the wrong rule or incorrectly repeats the last rule. I think it’s related to “Execute Automation Command” event. It’s a bit difficult to explain so I’ll explain what I’m doing then what is going wrong - please bear with me!
I have created a item discount button which uses ask question to enable fixed %, variable % and variable amount discounts all from one button. It works, however in one particular scenario (the “enter amount” discount), I get this odd behaviour.
Here is how it works normally:
From rule debugger, we can see the Execute Automation Command rules are triggered correctly:
However, on my “enter amount” discount, the final rule is being triggered 3 times incorrectly, it is most obvious in the error state (where a discount amount is entered that is greater than the product price):
It also triggers 3 times if I enter a valid amount.
I can see from rule debugger, it appears rule “DI Check Amount Discount” is triggered 3 times, which is incorrect - but actually the timing of these events appear in rule debugger even before that event is used.
I have checked my rules and actions thoroughly, deleted and re-created multiple times, changed names, checked the database and I just can’t work out why this is happening?! I have spent the last few hours just trying to make this work correctly!
Below is the process for “enter amount” with a valid value, again you can see it triggers the wrong rule 3 times. You can see the rule debugger window, if you look closely you see the first
AutomationCommandExecuted event occurs on the first ask question, and this is before the “DI Check Amount Discount” is ever referenced. I think also this is not being shown correctly in rule debugger as clearly the events before this issue, like the first ask question, appear just be replaced with the incorrect rule.
Here is the rule debugger, you can see the tag order action has been triggered 3 times. In this case it works since it applies, removes then applies the discount, but should not be doing this 3 times.
For clarity, here is the setup I have done:
Any idea what is causing this? It’s really frustrating as the functionality works but I can’t use it until I fix this issue.