Allocating Shipments
Once you've created a shipment, you'll need to allocate it to a carrier service. This section explains how to configure allocation rules that Ship can use when selecting carrier services, and the various methods you can use to allocate shipments to those services.
What Is Allocation?
In the context of Ship, allocation is the process of selecting the carrier service that will be used to deliver a shipment. Allocation is a key part of all Ship workflows, as a shipment cannot be shipped if it has not previously been allocated to a suitable carrier service.
Note
You can only allocate shipments that are in a {state}
of either unallocated or allocation_failed. If you attempt to allocate a shipment that is not in one of those states, then Ship returns an error.
To allocate shipments in Ship, you'll need to call one of Ship's allocation endpoints. You can specify a carrier service or service group to allocate to, allocate based on a quote you received, or have Ship select the cheapest eligible carrier service for you. Ship uses pre-defined allocation rules to ensure that your shipment is allocated to a suitable carrier service.
Ship offers the following allocation endpoints:
Allocate Shipment
https://api.sorted.com/pro/shipments/{reference}/allocate
- Allocates a single shipment using your default allocation rules.Allocate Shipment with Carrier Service
https://api.sorted.com/pro/shipments/{reference}/allocate/service/{service_ref}
- Allocates a single shipment with a specific carrier service.Allocate with Carrier Service
https://api.sorted.com/pro/shipments/allocation/service
- Allocates multiple shipments with a specific carrier service.Allocate Shipment with Service Group
https://api.sorted.com/pro/shipments/{reference}/allocate/service_group/{group_ref}
- Allocates a single shipment with a carrier service from a specific carrier service group.Allocate with Service Group
https://api.sorted.com/pro/shipments/allocation/service_group
- Allocates multiple shipments with a carrier service from a specific carrier service group.
The action Ship takes once the allocation request is received depends on the type of endpoint you used. If you used an endpoint that allocates individual then Ship allocates the shipment immediately and returns an Allocation Summary listing details of the allocation, such as prices, dates and tracking information. However, if you used an endpoint that can allocate multiple shipments at once, then Ship queues the shipments for allocation at a later time in order to maintain performance. When Ship queues it returns an Allocate Shipments Result confirming the shipments that were queued.
Note
Ship admins can activate and deactivate carrier services from the allocation pool. For more information on activating and deactivating carrier services, see the Viewing Carrier Services section of the Ship Admin User Guide.
When a shipment is allocated to a carrier service, its status changes to allocated, enabling you to retrieve its package labels and (where applicable) customs documentation.
Tip
When you allocate an on-demand
shipment, Ship automatically books a collection as a background process. You do not need to specify on_demand
booking details manually.
Selecting a Carrier Service
Most allocation endpoints require Ship to select a carrier service from a range of potential options. Ship uses the following process to select carrier services:
- Who can meet the request type? - First, Ship creates a pool of carrier services that could potentially meet the terms of the allocation request. The results returned by this step depend heavily on the allocation endpoint used. For example, an Allocate with Service Group request limits Ship to only those shipments in a particular service group, whereas an Allocate Shipment request does not limit the pool of available services in itself and could potentially include any carrier service.
- Who can deliver? - Next, Ship takes the details of the shipment into account, eliminating any carrier services that could not take the shipment (for example, because they do not ship to the delivery address or they could meet any specified shipping and delivery dates).
- Who meets the shipping rules? - Next, Ship creates a final shortlist of carrier services by eliminating any services that do not meet your organisation's allocation rules.
- Who meets the selected shipping mode? - Finally, Ship uses shipping modes to determine which of the remaining carrier services the shipment should be allocated to. By default, Ship uses a "cheapest carrier" shipping mode, in which the system allocates the shipment to the cheapest carrier service that meets the allocation rules.
Note
Certain carriers may specify their own rules in order to filter out which shipments can be allocated to a particular service. For example, some carriers require a package description when shipping internationally, and will not allow their services to be allocated to a international shipment that does not have the correct description. PRO automatically takes these rules into account when allocating shipments.
What Is a Shipping Rule?
When you make an allocation request, Ship 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 Ship 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).
Note
For more information on configuring and using shipping rules, see the Managing Shipping Rules page of the UI user guide.
What Is a Shipping Mode?
In Ship, a shipping mode is a preconfigured shipping pattern. When allocating shipments, PRO uses shipping modes to determine the most appropriate eligible carrier service to allocate the shipment to at that particular point in time. Configuring shipping modes can help you to deal with carrier shipping volume restrictions (i.e. during peak hours) and avoid penalties for insufficient trailer fills without the need for manual intervention.
Shipping modes are closely related to shipping rules, which are also used during the allocation process as a means of selecting a carrier service. It's important to know the difference between shipping rules and shipping modes:
Shipping rules are business rules that determine which of your enabled carrier services would be eligible to take a shipment. For example, you could use shipping rules to set a condition that "Only carrier services A, B, and, D can take shipments with a value of over £100"
Shipping modes are patterns that determine which eligible carrier services the shipment will be allocated to. For example, a shipping mode might be used to configure allocation limits on your carrier services, with Ship allocating to the cheapest service that has not reached its limit.
Continuing from the example above, Ship could combine the shipping rule and shipping mode effectively say "From the pool of eligible carrier services (A,B, and D), A has reached its daily allocation limit, B would cost £10 to ship the goods, and D would cost £5 to ship the goods. Therefore, allocate the shipment to carrier service D. "
Shipping modes enable you to specify allocation limits with custom time ranges, which can be applied to both carrier services and shipping locations.
Note
For more information on configuring and using shipping modes, see the Managing Shipping Modes page of the UI user guide.
Allocation Section Contents
- Allocating to Default Rules - Explains how to allocate shipments based on your pre-defined allocation rules.
- Allocating with a Specific Carrier Service - Explains how to allocate shipments with a specific carrier service.
- Allocating Within a Carrier Service Group - Explains how to allocate shipments with a carrier service from a specific carrier service group.