Flow to tag orders based on Shipping Zip Code

Hi Guys,

We tried setting up a simple flow to check the shipping zip code and apply a tag to the order accordingly.

We setup a flow as follows:

Start when → Order Created
Check if → Shipping address zip starts with: Then a comma-separated list.
Do this → Add order tags

The flow didn’t work and after reaching out to support they suggested that we can’t use a comma-separated list with the ‘Check if’ condition.

Instead, they have suggested we add a ‘Run code’ action at this point instead to check the order shipping zip code.

I am not technical and have viewed the templates available, but none of them seem close enough to edit and try and make work.

I’m sure this is a fairly simple script for someone with some knowledge. Could anyone help out on this?

Thanks in advance.

As support said, this isn’t how this condition operator works. You cannot use a comma-separated list

If you need to use multiple “starts with”, you can add them as separate criteria in the condition.

1 Like

Hi Paul,

Thanks for the reply. We have over 250 post codes that ‘start with’.

I think this is why support suggested a Run Code to check these instead of listing over 250 seperate conditions.

If you plan to add more over time, I think I would instead try to store them as shop metafields, which you can now create and edit in Admin/Settings.

Here’s the code if you used a shop metafield. I haven’t tested it, but should get you closer.


If you didn’t use a metafield, then you could replace the shop metafield with a list like
[“13434”, “54333”]