Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
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
Solved! Go to the solution
This is an accepted solution.
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.
Sigh, not sure why they said that. RegEx isn't supported yet.
Thanks!
Is there a simple way to achieve this?
This is an accepted solution.
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.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025