> ## Documentation Index
> Fetch the complete documentation index at: https://developers.perform.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Auto Carrier Selection

> Auto Carrier Selection applies routing rules to your shipments so each booking is made with the carrier reference that matches your criteria.

**Available to all Logistics customers.** Routing rules are configured for your account by Perform.AI from the rules you define.

## Summary

Auto Carrier Selection decides which carrier reference a shipment should be booked with, so you do not have to set a carrier on every shipment before booking. A set of routing rules you define is evaluated against the shipment’s data, and the matching carrier reference is assigned to the shipment, ready for booking.

## Who it’s for

Logistics and operations teams that ship with several carriers and choose between them by destination, weight, service level or similar criteria. It removes the need to decide the carrier in your own systems before a shipment reaches Perform.AI, and it keeps complex routing logic in one place.

## Key benefits

* **No carrier reference needed up front.** Create the shipment without a carrier and the rules assign one.
* **Rules use the data you already send.** Conditions are built from existing shipment fields and your configured carrier list.
* **Complex logic stays readable.** Multiple rules with AND and OR conditions are ordered by priority, so the first matching rule wins when several apply.
* **Every outcome is visible.** Each shipment is tagged with the routing result, and the tags are filters in Booking Overview.
* **Re-run on demand.** After rules change, the **Auto Assign Carrier** action re-evaluates selected shipments.

## How it works

### Rules

A routing rule combines one or more conditions on shipment data fields, joined with AND or OR, and produces one outcome: the carrier reference to book with. Carrier references come from the carriers configured in **Settings** > **Carriers**. You can define several rules; they are ordered, and the order decides which rule applies when a shipment satisfies more than one.

Rules can compare the carriers available for a shipment on cost and delivery speed, and a fallback can take over when a carrier is delayed.

### When rules run

Rules are evaluated when a shipment is created. You can also trigger them manually with **Auto Assign Carrier** in Booking Overview or on a shipment’s detail page, for example after the rules were changed. Manual re-runs do not apply to shipments that are already Booked or Shipped.

### Outcomes and tags

| Tag on the shipment | Meaning |
| - | - |
| `routing_assigned` | A rule matched and its carrier reference was assigned. |
| `routing_noresult` | No rule matched. The shipment keeps no carrier reference from routing; assign one manually or book with a carrier reference in the request. |
| `routing_<carrier_reference>_replaced` | The override function replaced the carrier reference you had set on the shipment. |

The tags are available as filters in Booking Overview.

### Override

By default, routing only fills in a missing carrier reference. If you enable the override function, the routing result replaces a carrier reference you uploaded with the shipment. Decide this when you define the rules.

## Set up in the portal

There is no self-service rule editor. Rules are set up on your account by Perform.AI:

1. Contact your Customer Success team to start the routing rule setup.
2. Fill in the routing rule template with your conditions, their order and the carrier reference each rule should produce, and state whether the override function should be enabled.
3. Confirm the rules in a review with Customer Success; they are then enabled for your account.
4. To re-run the rules on existing shipments, go to **Logistics** > **Booking Overview**, select the shipments and choose **Auto Assign Carrier**, or use the same action on a shipment’s detail page.

## Use via API and MCP

Create the shipment with [Create a Shipment](https://developers.perform.ai/guides/create-shipment.md) without a `carrier_reference`; routing assigns one. Then call [Create a Booking](https://developers.perform.ai/guides/create-booking.md) ([`POST /v5/booking/`](https://developers.perform.ai/api-reference/v5/booking/create-booking)) with the `shipment_id` or `shipment_uuid` and omit `carrier_reference`, so the booking uses the carrier the rules assigned. If the shipment carries the `routing_noresult` tag, pass a `carrier_reference` in the booking request instead.

## FAQ

### Can I edit the rules myself in the portal?

Not currently. Rules are configured on your account by Perform.AI from the template you fill in. Contact your Customer Success team to change them.

### What happens when no rule matches a shipment?

The shipment is tagged `routing_noresult` and stays without a carrier reference from routing. Filter Booking Overview by that tag and assign a carrier manually, or book it with an explicit carrier reference.

### Will routing change a carrier I already set on the shipment?

Only if the override function is enabled for your account. Without it, routing fills in missing carrier references and leaves existing ones unchanged. When it does replace one, the shipment is tagged `routing_<carrier_reference>_replaced`.

### Can I re-run routing after changing the rules?

Yes, with **Auto Assign Carrier** in Booking Overview or on the shipment detail page, for shipments that are not yet Booked or Shipped.

## Troubleshooting

| Symptom | Cause | Fix |
| - | - | - |
| Shipments stay Unassigned with the tag `routing_noresult` | No rule matched the shipment’s data | Check which field values the shipment carries against your rule conditions, assign a carrier manually, or ask Customer Success to extend the rules. |
| Routing picked a different carrier than expected | A higher-priority rule matched first, or the override function replaced your value | Review the rule order with Customer Success; check for the `routing_<carrier_reference>_replaced` tag. |
| **Auto Assign Carrier** does nothing for some shipments | Those shipments are already Booked or Shipped | Only shipments before booking can be re-routed. |

## Related

* [Multi-Carrier Shipping](https://developers.perform.ai/products/logistics/multi-carrier-shipping.md)
* [PUDO Delivery](https://developers.perform.ai/products/logistics/pudo-delivery.md)
* [Logistics overview](https://developers.perform.ai/products/logistics/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.