When using free-text fields in Shiptheory, to input values to match against in the rules, your whitespace is automatically ignored by the rules algorithm. This means that if you were to set up a rule to match against the value of "test 123" then the algorithm will process that value as "test123". This is done to mitigate against rules failing to match due to users accidentally inputting spaces.
This leads us on to postcodes. In the UK, whitespace is an inherent part of the postcode and ignoring whitespace can lead to mismatches. Lets say we have a rule which is set up to match any postcode with the pattern "BS3 4*", meaning we want to look for shipments with postcodes like "BS3 4XX". If we ignore the whitespace in this instance then postcodes will be evaluated to match "BS34*". This means that both postcodes like "BS3 4XX" will match, but so will postcodes like "BS34 XXX" which is incorrect.
The asterisk (*) in the rule examples is used to denote a wildcard. If you're not familiar with using wildcards in your shipping rules click here.
Enter the 'Ignore Postcode Whitespace' setting. It can be found in the advanced settings at the bottom of your rule. By default whitespace is ignored, however using this setting you can turn this feature off. This means that postcode rule values will be evaluated literally and all whitespace will be included when the algorithm tries to match. If the data coming in from your channel has a whitespace and you have a whitespace in your rule value they must match exactly; Shiptheory cannot be held responsible for mismatches resulting from data which has been incorrectly input into the system.