Best Practices: Postcode Filter
In this Best Practice, we describe the postcode filter a little closer and give you an example of how you might set up an event procedure.
1. How does the postcode filter work?
The postcode filter was added to the filters of the event procedures to check the postcode in the delivery address of an order. A comparison of the entered values and the postcode will be done, starting with the first character and proceeding to the next.
This means putting
W1U in this field will result in the event procedure working for e.g.
W1S 2XG and
You might enter multiple values separated by a comma as
W1U, SE if multiple regions are to be considered.
2. What do you need to set up?
Depending on your workflow in processing orders, some settings are useful such as activating 'special' delivery countries you are delivering to (Isle of Man, Canary Islands).
To us it makes sense to create a new order status because you will be able to set filters in other menus regarding it.
In the following example we created a new status in the System » System settings » Orders » Status menu named check delivery address in advance.
3. Example of use
We frequently get orders with shipment to 'special' countries which need to be processed in another way as for customs reasons or because the shipping costs are much higher for us.
Las Palmas is such an example. The postcodes of the Canary Islands start with
38; politically, it belongs to Spain but is an autonomous community with most likely higher shipping costs compared to the costs for shipping to mainland Spain.
To create our new event procedure we open the menu System » System settings » Orders » Events. After clicking on Add event procedure, plus sign in the bottom, we choose the name postcode filter and click on the save button.
The event Status Change is most suitable to us because all our orders have to go through the status In preparation for shipping.
Next, we add a new filter by clicking on the plus sign next to filter and select Postcodes in the Order folder.
35, 38 will do a check for postcodes beginning with
In addition to this, we add the filter Shipping → Country of delivery and activate Spain because other countries don’t need this check.
After that, we add the procedure Change Status in the Order folder and select the order status check delivery address that we created in advance.
Now the event procedure looks out in all my new orders in status in preparation for shipping, if they were to be sent to Spain and if the postcode fit in the filter. There are two possible scenarios:
The filters in the event procedure do not fit with the order
→ the event procedure does not have any impact on the order
The filters in the event procedure do fit with the order
→ the event procedure is processed and the order status will be changed to check delivery address
Further options for the use of this filter
Of course, more filters can be used with the postcode filter, e.g. you can add a referrer or order types to have finer distinction in the event procedures. You know best, what you need.