Trying to limit SMS send function

Good evening,

I have created an Automation Command called ‘ToGo Ready’.
This kicks off a rule called ‘ToGoReady Ticket Rule’ which in turn does the following:

  1. Changes the selected paid order’s state to ‘ToGoReady’
  2. Executes an action (Send SMS)
  3. Closes the ticket.

What I would like to do is limit the second action so that it only executes if the ticket tag is a number (i.e. a phone number). This is to prevent using SMS credits when there was no phone number on the order. Or to prevent any error that may occur trying send an SMS via the 3rd party service using a ‘Phone’ field that is empty or carries invalid data.

I tried adding a constraint to the second action as below (screenshot of rule). I am sure I may have made a mistake of sorts as I am quite new to this:

The ticket tag is set to ‘Ask before creating ticket’ and I made a Sub tag of ‘NO NUMBER’ so the cashier can press that if the customer does not want to give their number. If they do then the ‘free tagging’ option is available to enter it:

What is happening is that the ‘Send SMS action’ is going ahead whether I tag the ticket as ‘NO NUMBER’ or whether I put a (all numerical) phone number in.

Any ideas where I am going wrong?

I am not totally sure what happens if you call an SMS provider’s API with an invalid phone number so perhaps I am wasting my time? In any case it seems to be unnecessary overhead to knowingly send data that is not going to yield the desired outcome (i.e. send a text).

It should be capitals TICKET TAG
As it is it will always not equal as it will be null not equals every time.

1 Like

Works just as desired now.
Amazing thanks JTR!