Tag orders based on the order name
The order name is generated by combining the order_number property with the order prefix and order suffix that are set in the merchant's general settings.
This is different from the order number property, which is the order's position in the shop's count of orders. Order numbers are sequential and start at 1.
This criteria will allow you to analyse the order name to search for a particular string.
How to use the criteria
To create a workflow using this criteria, click on the Create New Workflow button from the main Workflows view:
Define the trigger to determine at which point you would like the workflow to run, we recommend selecting the trigger when orders are created:
Click the Add criteria to my workflow button:
The Order Name criteria can be found within the Order category in the Select criteria pop-up window:
Click the Use in your workflow button on the right to select this criteria.
You will then be presented with the following screen:
Here is what each option within the conditions dropdown will do:
contains: If the order name contains a particular string of text.
does NOT contain: If the order name does not contain a particular string of text.
is: If the order name matches a particular string of text exactly.
is NOT: If the order name does not match a particular string of text exactly.
begins with: If the order name begins with a particular string of text.
does not begin with: If the order name does not begin with a particular string of text.
in: If the order name matches exactly, any of the values entered. The value field accepts a comma-separated list of potential values.
Let's create a workflow that looks for the prefix #PS within the order name.
Select begins with from the dropdown menu:
Enter #PS into the value field:
Choose the name of the tag you'd like to see on all orders that match this workflow and enter it into the Add tags when the workflow matches section. In this example we have used the tag PSORDER:
Click on the Add fixed tag button.
Saving and naming your workflow
It's worth giving your workflow a name to help you identify it at a later date, so add a workflow name in the New Workflow section, check the summary of your workflow and if happy, either Test your Workflow against an existing order or hit Save Workflow:
Any new order will now be checked to see if the order name begins with #PS and if it does, the fixed tag(s) that you specified will be applied to the order.
This criteria option will work when Backdating your orders.
The Order Name criteria does not currently work as a Dynamic Tag.