Manage shipping rules
Configure business logic to allocate shipments to carrier services in Shipments. Define rules by geography, value, weight, region, tenant, channel, and more.
What is a shipping rule?
Shipments’s shipping rules feature enables you to specify business logic to be used when the system allocates a shipment to a carrier service. This page explains how to configure and maintain shipping rules for carrier services and locations.
When you make an allocation request, the Shipments platform uses its shipping rules to ascertain which carrier services are “eligible” to take the shipments in question and which are not.
Shipment rules exist as a pre-defined set of specifications, based on shipment parameters and attributes. These specifications are then linked to carrier services and shipping locations to create a rule. A rule can either include shipments (e.g. “The linked carrier services are available when a shipment’s weight is between 10 and 15 kg”) or exclude shipments (e.g. “The linked carrier services are available unless a shipment’s weight is between 10 and 15 kg”).
When Shipments allocates a shipment, it examines the rules linked to each of its carrier services and excludes any services whose linked rulesets would prevent that service from taking the shipment.
Some use cases for shipment rules include:
- Always shipping high-value items with a particular carrier service.
- Only using specific carrier services to ship to a particular country or group of countries.
- Never using a particular carrier service from a particular shipping location (for example, due to high shipping costs or previous customer service issues).
See the Worked Examples section for detailed examples on how Shipments takes rules into account when allocating shipments.
Viewing existing shipping rules
To view your existing shipping rules, select the Settings > Shipping > Shipping Rules page.

The Shipping Rules page displays the following information about each rule:
- Name
- Description
- Valid From / To - Shipping rules have set start and end dates, defined during the configuration process
- Enabled - Use the toggle to enable or disable existing shipping rules. The Shipments platform does not take disabled shipping rules into account.
To edit an existing rule, click Edit. The process of editing an existing rule is the same as that used to set up a new rule, as explained in the Add New Shipping Rules section.
To export details of the rule as a JSON object, click Export.
Add new shipping rules
To add a new shipping rule, select the Settings > Shipping > Shipping Rules page and click Add New Shipping Rule. Shipments displays the Add New Shipping Rule page.
Step 1: adding shipping rule details
The Add Shipping Rule Details card enables you to enter identifying information about your new rule:

To add shipping rule details:
- Optionally, enter Valid From and Valid To dates. The rule only applies during the specified time period.
- Enter a unique Name of between five and 100 characters for the rule.
- Optionally, enter a Description of up to 150 characters for the rule.
- Click Next to display the Set Countries, Regions and Postcodes card.
Step 2: setting countries, regions and postcodes
The Set Countries, Regions and Postcodes card enables you to set geographic restrictions that may apply to the rule. For example, you might specify that the rule applies only to those shipments destined for the UK, or that the rule applies to all shipments except those bound for the USA.

To explicitly include or exclude countries from the shipping rule:
- Select the Country that the rule applies to. The country is added to the My Selected Countries list.
- Use the Include countries and Exclude countries radio buttons to select whether the countries in the list should be included or excluded from the rule.
Regional rules
For certain countries, the system enables you to create rules at a regional or postcode level. For example, you might specify that the rule applies only to those shipments destined for an M2 postcode, or that the rule applies to all shipments except those destined for the state of Florida, USA.
Currently, Sorted supports regional rules for the following countries:
- United States (states)
- United Kingdom (counties)
- Australia (states)
- Canada (provinces)
- Ireland (counties)
To configure regional rules:
- Select the relevant country from the Country list and ensure that the Include regions and postcodes radio button is selected.
- Select the Set regions and/or postcodes check box. Shipments displays additional fields relating to region selection.
- Use the radio buttons to select whether you want to Include regions and postcodes or Exclude regions and postcodes.
- Select an entire region to include or exclude from the rule (e.g. a US state or British county) by selecting that region from the Regions drop-down menu.
- Enter a postcode into the Postcodes field to add that postcode to the rule.
To remove a region or postcode, click its trash icon. Alternatively, select Remove all regions or Remove all postcodes.
Once you have finished setting up geographic restrictions, click Next to display the Set Values, Weight, and Dimensions card.
Step 3: setting values, weight and dimensions
The Set Values, Weight, and Dimensions card enables you to specify minimum and maximum values, weights and dimensions for the rule.

All values on this card are optional and “open-ended”. That is, you can specify a minimum value or weight without specifying a maximum, or vice versa.
To configure values, weights and dimensions:
- Enter a minimum and / or maximum Shipment Value as a numerical value, and select the relevant Currency.
When you have configured values, weights, and dimensions, click Next to display the Link Tenants and Channels card card.
Step 4: linking tenants and channels
The Link Tenants and Channels card enables you to select the tenants and channels that your rule applies to, where applicable.

You can link tenants and channels to your rule in the following ways:
- To link your new rule to a tenant and all of its associated channels, select that tenant from the list.
- To link your new rule to selected channels within a tenant, click the + icon by the tenant’s name to display all of that tenant’s channels, and then select the channel or channels you require.
- To search for a specific tenant or channel, type a name into the search bar.
- To select all tenants and channels that you have available, click Select all tenants and channels.
For more information on configuring tenants and channels within the Sorted platform, see the Managing Tenants and Channels page.
Once you have selected the tenants and channels you require, click Next to display the Link Carrier Services card.
Step 5: linking carrier services
The Link Carrier Services card enables you to select the carrier services that your shipping rule applies to.

Select the carrier services that you want the new rule to apply to. To search for a specific carrier service, type a name into the search bar.
Once you have selected the required carrier services, click Next to display the Link Shipping Locations card.
Step 6: linking shipping locations
The Link Shipping Locations card enables you to select the shipping locations that your shipping rule applies to. You can either include shipping locations (i.e. “the rule applies to all shipments originating from these shipping locations”) or exclude shipping locations (i.e. “the rule applies to all shipments except those originating from these shipping locations”).

You can link shipping locations to your rule in the following ways:
- To link a specific location or locations to your rule, use the radio buttons to select whether you want to Include shipping locations or Exclude shipping locations and then select the shipping locations you want to link from the list.
- To search for a specific carrier service, type a name into the search bar.
- To select all available shipping locations, click Select All.
Once you have finished linking shipping locations, click Add Shipping Rule to save your changes and close the Add Shipping Rule page.
Worked examples
This section gives worked examples for how combinations of rules can affect the carrier services that are eligible to take a shipment.
In these examples we have four carrier services: A, B, C, and D. Each of these carrier services has its own linked ruleset that defines whether or not it is eligible to take the shipments in that example.
Scenario 1 - geographic rulesets
In this scenario, we have the following rules defined:
Carrier Service | Geographic Rules | Value Rules | Weight/Dimension Rules |
---|---|---|---|
A | Include: Country US, postal code =~ 322xx | - | - |
B | Include: Country US | - | - |
C | - | - | - |
D | Exclude: Country US, Postal Code =~ 809xx | - | - |
We have the following shipment:
Destination | Value | Weight |
---|---|---|
US, 32202 | 20GBP | 1.2kg |
The results of processing the shipping rules are as follows:
Carrier Service | Included | Reason |
---|---|---|
A | ✔️ | Geographic rule matches country and postcode |
B | ✔️ | Geographic rule matches country |
C | ✔️ | Not excluded by any rules |
D | ✔️ | Not excluded by geographic rules |
However, given the following shipment the results differ:
Destination | Value | Weight |
---|---|---|
US, 80922 | 20GBP | 1.2kg |
Results:
Carrier Service | Included | Reason |
---|---|---|
A | ❌ | Geographic rule postcode mismatch - service is not included |
B | ✔️ | Geographic rule matches country |
C | ✔️ | Not excluded by any rules |
D | ❌ | Excluded by geographic rules |
Scenario 2 - value rulesets
In this scenario, we have the following rules defined:
Carrier Service | Geographic Rules | Value Rules | Weight/Dimension Rules |
---|---|---|---|
A | - | Include: > 10GBP | - |
B | - | Include: >= 10GBP, < 50GBP | - |
C | - | - | - |
D | - | Exclude: > 15GBP | - |
We have the following shipment:
Destination | Value | Weight |
---|---|---|
US, 32202 | 20GBP | 1.2kg |
The results of processing the shipping rules are as follows:
Carrier Service | Included | Reason |
---|---|---|
A | ✔️ | Value rule includes this service |
B | ✔️ | Value rule includes this service |
C | ✔️ | Not excluded by any rules |
D | ❌ | Excluded by value rule |
However, given the following shipment the results differ:
Destination | Value | Weight |
---|---|---|
US, 32202 | 8.55GBP | 1.2kg |
Results:
Carrier Service | Included | Reason |
---|---|---|
A | ❌ | Value rule not matched - service is not included |
B | ❌ | Value rule not matched - service is not included |
C | ✔️ | Not excluded by any rules |
D | ✔️ | Not excluded by value rule |
Scenario 3 - weights and dimensions rulesets
In this scenario, we have the following rules defined:
Carrier Service | Geographic Rules | Value Rules | Weight/Dimension Rules |
---|---|---|---|
A | - | - | Include: < 10kg |
B | - | - | Include: > 1kg, <= 15kg |
C | - | - | - |
D | - | - | Exclude: > 8.5kg |
We have the following shipment:
Destination | Value | Weight |
---|---|---|
US, 32202 | 20GBP | 9.0kg |
The results of processing the shipping rules are as follows:
Carrier Service | Included | Reason |
---|---|---|
A | ✔️ | Weight rule includes this service |
B | ✔️ | Weight rule includes this service |
C | ✔️ | Not excluded by any rules |
D | ❌ | Excluded by weight rule |
However, given the following shipment the results differ:
Destination | Value | Weight |
---|---|---|
US, 32202 | 8.55GBP | 5.25kg |
Results:
Carrier Service | Included | Reason |
---|---|---|
A | ✔️ | Weight rule includes this service |
B | ✔️ | Weight rule includes this service |
C | ✔️ | Not excluded by any rules |
D | ✔️ | Not excluded by weight rule |
Scenario 4 - mixed rulesets
This scenario is more complex and involves multiple types of rules:
Carrier Service | Geographic Rules | Value Rules | Weight/Dimension Rules |
---|---|---|---|
A | Include: Country DE | - | Include: < 10kg |
B | - | Include: > 10GBP, <= 20GBP | Include: > 1kg, <= 15kg |
C | - | - | - |
D | Exclude: Country DE, Postal Code =~ 554xx | - | Exclude: > 8.5kg |
We have the following shipment:
Destination | Value | Weight |
---|---|---|
DE, 55482 | 9.65GBP | 5.45kg |
The results of processing the shipping rules are as follows:
Carrier Service | Included | Reason |
---|---|---|
A | ✔️ | Matches both geographic include rule and weight include rule |
B | ❌ | Does not match value rule; matches weight rule |
C | ✔️ | Not excluded by any rules |
D | ❌ | Excluded by geographic rule. Not excluded by weight rule. |
However, given the following shipment the results differ:
Destination | Value | Weight |
---|---|---|
DE, 20054 | 19.25GBP | 9.5kg |
Results:
Carrier Service | Included | Reason |
---|---|---|
A | ✔️ | Matches both geographic and weight/dimension rule includes |
B | ✔️ | Matches both value and weight/dimension rule includes |
C | ✔️ | Not excluded by any rules |
D | ❌ | Not excluded by geographic rule. Excluded by weight/dimension rule |