Having trouble using an Entity as a Constraint in Ask Question action

I’m trying to streamline a Gift Card process through a set of pop-ups. If a card has been created/activated, a Ask Question pop-up will show the balance and 3 options (Select Card, Close window or Add Funds). If a card has not been activated, a different Ask Question will pop-up come up with the options of Close or Activate Card. Both in the same Rule.

The process is started by swiping a card on POS screen and the NumberPad value (starts with GC20…) starts the process. I’m trying to use ('{ENTITY NAME:Gift Card}' =='') for one, and the other constrain as ('{ENTITY NAME:Gift Card}' !=''). But they seem to have no effect, the first Ask Question will pop up regardless if the card is created/activated or not. I’m using Show Message and {ENTITY NAME:Gift Card} brings up the card number (when created/activated) before the fist Ask Question.


Do I have the syntax correct? Or should I split Ask Questions up?

Which rule is the swipe of card in? Is it in the same rule?

Also you dont need the ()

Numberpad Value Entered. Same Rule

RcRJpsxR6I

The first Ask Question does come up, however it always comes up. Does the Constraint need an Entity tide a ticket for the constraint to work?

Action constraints are checked all at once… so they happen before that action is even fired. Hence why it wont work. The actions themself can fire concurrently but the Action Constraints are all checked at the same time. You need to split it into two rules…

Aaahhh, thanks. I was thinking it went down the list of actions.

It does for order of execution of actions but constraints for actions are checked at same time. Kind of a little known fact.

To do that you would need to split the flow with an execute automation command after the search so the entity is already selected.
Or change those actions to a separate rule for say ticket entity changed and pick it up there.
Or change the constraint to check the entity data using the number pad value itself in the expression to evaluate rather than entity name which will not be selected untill after constroints have been evaluated.

I ended up turning the numberpad entry into a command value. Then passing that to a new Automation Command Executed rule. Then putting it to the constraint test. Works just as I was hoping. Just for funsies, I was also able to get it work using Program Settings… But opted to go with the command value.

Trying to create something from scratch is the most frustrating thing. It is also equally rewarding when you figure it out!

1 Like