The following use case illustrates the use of a condition list with postcodes. We want to offer Evening Delivery in our Checkout but this service is only available to a selection of postcodes in Stockholm so we will use a condition list to determine whether the delivery option should be available or not.
Learn how to:
Note: This tutorial assumes that a Checkout configuration has already been created.
Create and upload the condition list
- Start by creating a condition list. (See the Condition lists article for more information on formatting).
Example:10026;10074
11122;11181
11427
11484 - Log into Checkout and go to Condition lists in the top menu.
- Click Upload.
- Select the postcode file created in step 1.
- Choose a member account.
- Set the content type to Text and name the list.
- Click Import.
Example:
- The condition list is created and inactive. Click the Inactive icon to activate it.
Create a rule in the rule engine
- Open the Checkout configuration where the condition list should be applied.
- Go to the Rule engine section and click Add new rule.
- Enter a name.
- Click Advanced above the Conditions field and write:
!(to_postal_code in "StockholmPostcodes")
"StockholmPostcodes" is the name of the condition list.
- Under Action choose Set enabled.
- Select Evening Delivery and set it to False. The rule now says that if the receiver postcode is not in the condition list then Evening Delivery should be set to False.
- Click Continue and click Save.
- Use the test tool to verify that it works as intended.
Rule configuration:
Testing using a postcode from the condition list:
Testing using a postcode that is not in the condition list:
Tip: Use the same type of logic to apply e.g. a condition list with countries.