I am trying to create a shopify flow to tag orders which have a PO Box field in the shipping address.
The flow should tag any orders with possible variations such as -
po box;p.o.b.;pob;p.o. box;po-box;p.o.-box;PO-Box;p.o box;pobox;p-o-box;p-o box;post office box;P.O. Box;PO Box;g.p.o box;gpo box;g.p.o. box;g-p-o box;g-p-o-box;
I was told by shopify support to use a regular expression such as PO\s?Box\s?\d+
I can’t get it to work and also not sure if using regular expressions whether we should be testing for the order.shippingAddress.address1 field to equal, include orstarts with
If you only wanted to use Flow, I’d probably do a basic check in a condition for “P” and “O” or maybe “box” and they write a check in liquid directly in the tag field. Just output nothing if it shouldn’t add a tag.
This is a good opportunity for a partner to make a custom Flow action that takes an address and checks if it has a a PO Box, returning true/false or something like that.