What is allocation?

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 the Shipments platform can use when selecting carrier services, and the various methods you can use to allocate shipments to those services.

Allocation is the process of selecting the carrier service that will be used to deliver a shipment. Allocation is a key part of all Shipments data flows, as a shipment cannot be shipped if it has not previously been allocated to a suitable carrier service.

To allocate shipments, you’ll need to call one of the Shipment API’s allocation endpoints. You can specify a carrier service or service group to allocate to, allocate based on a quote you received, or have Shipments select the cheapest eligible carrier service for you. Shipments uses pre-defined allocation rules to ensure that your shipment is allocated to a suitable carrier service.

Here are the available allocation endpoints you can use:

  • 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 Shipments takes once the allocation request is received depends on the type of endpoint you used. If you used an endpoint that allocates individual then the Shipments platform 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 Shipments queues the shipments for allocation at a later time in order to maintain performance. When Shipments queues it returns an Allocate Shipments Result confirming the shipments that were queued.

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.

Select a carrier service

Most allocation endpoints require the Shipments platform to select a carrier service from a range of potential options. Shipments uses the following process to select carrier services:

  1. Who can meet the request type? - First, the Shipments platform 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 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.
  2. Who can deliver? - Next, Shipments 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).
  3. Who meets the shipping rules? - Next, the Shipments platform creates a final shortlist of carrier services by eliminating any services that do not meet your organisation’s allocation rules.
  4. Who meets the selected shipping mode? - Finally, Shipments uses shipping modes to determine which of the remaining carrier services the shipment should be allocated to. By default, Shipments API uses a “cheapest carrier” shipping mode, in which the system allocates the shipment to the cheapest carrier service that meets the allocation rules.

What is a shipping rule?

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).

What is a shipping mode?

On the Shipments platform, a shipping mode is a preconfigured shipping pattern. When allocating shipments, Shipments 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 the Shipments platform allocating to the cheapest service that has not reached its limit.

    Continuing from the example above, Shipments 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.

Allocation next steps