--- title: "Set Up Shipping Rules" slug: "set-up-shipping-rules" description: "Use shipping rules to automatically assign the best carrier to fulfill each shipment. For each shipment, Delivery Hub checks if all attributes of a shipping rule are true." tags: ["Admin", "Return rules", "Automations", "Shipping rules", "Fulfillment", "Rate shopping", "Implementation"] updated: 2024-08-01T09:16:07Z published: 2024-08-01T09:16:07Z canonical: "help.bringg.com/set-up-shipping-rules" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.bringg.com/llms.txt > Use this file to discover all available pages before exploring further. # Auto-Assign Carriers Using Shipping Rules Save on packer work hours and simplify exception management by automating your fulfillment process using shipping rules. Shipping rules use your priorities and the requirements of specific orders and inventory to automatically assign the best carrier and service to each shipment. When you use Shipping Rules, Delivery Hub checks if all attributes of a shipping rule are `true` for each shipment. If they are `true`, Delivery Hub offers the shipment to each carrier attached to the rule, starting with the top of your prioritization list, until one accepts the order. For example, you can first offer each same-day order to your preferred local carrier. If they are unavailable, Delivery Hub offers the order to the next available crowdsourced carrier. You can use shipping rules for shipments created using the [Create Shipment](https://developers.bringg.com/v2/reference/orderv2servicecreateshipmentv2) API request or when manually creating shipments using the packer flow. ![](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/su-dh2_shippingrule2_dgm(1).jpg)Use shipping rules to automatically assign the best carrier to fulfill each shipment ## Before You Begin - Confirm you have the Admin user type. - Confirm that you have added the relevant carriers to your **Shipping Accounts** in Delivery Hub. [Learn more](/delivery-hub/docs/connect-your-shipping-accounts-to-delivery-hub). - Be clear on the conditions when Delivery Hub should consider a carrier as a viable provider for each order. For example, after analyzing report data that shows a carrier's strengths and weaknesses, you may tweak your shipping rules to book shipments with them only in cases where their performance is strongest. ## Configure Shipping Rules #### Step 1: Define Attributes 1. To create or update a rule, go to **Settings > Shipping & Returns** and select the **Shipping Rules** tab. ![](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/su-dh2_shippingrule_access(4).jpg)Access the **Shipping Rules** tab | To... | Do this... | | --- | --- | | Create a new rule | Select **Add Rule.![](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/su-dh2_shippingrule_add(3).jpg)** | | Update an existing rule | Select the chevron icon ![chevron-up_icon](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/chevron-up_icon.png)to expand the rule you want to update. ![](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/su-dh2_shippingrule_expand(1).jpg) | | Use a previously created rule as a template | Select the context menu**![build-reports-for-custom-analytics-en-image-nhze2fcn](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/build-reports-for-custom-analytics-en-image-nhze2fcn.png) > Duplicate**.![](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/su-dh2_shippingrule_duplicate(1).jpg) | 2. Make your automation easy to find by selecting the edit icon and entering a name. For example, the name of your shipping rule could include attributes specific to the rule, such as the destination country or service level. ![An example screenshot with a shipping rule renamed from "Shipping Rule 1" to "Orders to Denmark".](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/su-dh2_shippingrule_name(1).jpg)Enter a name for your shipping rule 3. Define the situation when you want to assign a shipment to a specific set of carriers. To add the conditions that must be true for your rule to be activated, select![add-your-delivery-strategy-to-bringg-image-2vn6e29m](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/add-your-delivery-strategy-to-bringg-image-2vn6e29m.png) **Attribute** and choose the relevant fields from the list. ![su-dh2_shippingrule_attribute_add](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/su-dh2_shippingrule_attribute_add(1).jpg)Add an attribute to set rule conditions | Field | Description | | --- | --- | | **Destination country** | The country that the shipment is sent from. | | **Origin country** | The country that the shipment is sent to. | | **Total weight** | The total weight of the shipment, including packaging and inventory. | | **Total value** | The total value of the shipment. | | **Service level** | The service level that the customer selected at checkout. For example, two-day shipping. | | **Longest package dimension** | The max dimension of all packages in the shipment. For example, if the longest dimension of all packages in the shipment is a width of 30 cm, that is the dimension that DH will use for this attribute. | | **Required service level** | The service level required by your company's workflows and regulations. For example, if certain hazardous materials require delivery within 72 hours, you can add a `72 hours` tag to the `required_service_level` parameter and create a shipping rule that assigns shipments with this tag to specific carrier services. | 4. Select an operator for each field, then enter the required value. Operators define an attribute as `true` if the value of the field: - **Is**, **Is not**, or **Is at least one** of the values that you select from the dropdown list - Is, for example, **equal to**, **less than**, or **in range** of the values you enter in the number field - **Is**, **Is not**, **Contains**, or **Does not contain** the values you enter in the text field. For example, if you want to ship all shipments heading to Denmark with a specific carrier, you can select **Destination country > Is** and then select *Denmark* from the dropdown list that appears. ![su-dh2_shippingrule_destinationcountry](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/su-dh2_shippingrule_destinationcountry(1).jpg) 5. To add more conditions to the rule, select![+](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/add-your-delivery-strategy-to-bringg-image-2vn6e29m.png)**Attribute**. 6. To remove an attribute, select the trash icon![icon_delete_grey.png](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/Vector%281%29.png). #### Step 2: Assign Carrier & Service 1. To select the carriers to whom Delivery Hub will assign shipments that fulfill all the required attributes for this rule, select the dropdown under **A. Select carrier & service** and choose at least one carrier from the list. ![](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/su-dh2_shippingrule_carrier-and-service(1).jpg)Select carriers and service levels that apply to this rule 2. Select your preferred prioritization method for carrier assignment under **B. Prioritize services**. Delivery Hub assigns the first available preferred carrier and service based on your prioritization. ![](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/su-dh2_shippingrule_prioritize(1).jpg)Drag selected services to prioritize them | To... | Do this... | | --- | --- | | Assign the shipment to the carrier that quotes the lowest price | Select **Cheapest**. | | Create a custom prioritization | Select the grip dots ![drag.png](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/drag%281%29.png) to drag each service to your preferred location in the list, with the most preferred at the top and the least preferred at the bottom. | #### Step 3: Manage Rules ![su-dh2_shippingrule_actions](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/su-dh2_shippingrule_actions(1).jpg)Duplicate, reorder, or delete a rule using the context menu    | To... | Do this... | | --- | --- | | Prioritize rules | Delivery Hub starts at the top of your list of rules when checking to see which rules match each shipment, and ignores rules that are lower in the list if there is a match above them. Once you have created a few rules, you might notice that some contradict each other. In such cases, you can select the context menu ![context menu](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/build-reports-for-custom-analytics-en-image-nhze2fcn.png) > **Move up** or **Move down** to adjust the prioritization of your rules. | | Activate and deactivate rules | Select the toggle ![add-your-delivery-strategy-to-bringg-image-9hm4v6ei](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/add-your-delivery-strategy-to-bringg-image-9hm4v6ei.png)next to the context menu to enable or deactivate a rule.When you deactivate a rule, Delivery Hub will ignore it when checking for rules that match each shipment. If no other rule matches a shipment, you can manually assign a carrier in **Fulfillments**.You can deactivate a rule temporarily, for instance if you prefer to manually select the cheapest or fastest carrier for each shipment during the holiday season. | | Delete rules | To delete a rule, select the context menu ![context menu](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/build-reports-for-custom-analytics-en-image-nhze2fcn.png) > **Delete**. | ## Automatically Book Shipments You can automatically book shipments using Shipping Rules when creating shipments using Delivery Hub's [Create Shipment](https://developers.bringg.com/v2/reference/orderv2servicecreateshipmentv2) API request. To do so, make sure that the disable_shipping_rules parameter is false and that you don't include a service or carrier when creating the shipment. You can also book a shipment using Shipping Rules using the packer flow. Once you select **Create Shipment**, Delivery Hub automatically runs through your shipping rules to find the first matching rule, sends quote requests to all matching carriers listed in the rule, and then displays the results at the top of the carrier selection modal in the prioritized order. For example, if your shipping rule prioritizes the cheapest quote from a list of carriers, the cheapest appears at the top of the modal. Confirm the selected carrier and service by selecting **Book Carrier**, or choose another option from the list before continuing. ![](https://cdn.document360.io/a18074ef-073a-4ab1-bcab-12625715280e/Images/Documentation/packship_shippingrule.jpg)View and confirm carrier assignments based on shipping rules ## Related - [Connect Your Shipping Accounts to Delivery Hub](/connect-your-shipping-accounts-to-delivery-hub.md)