Automation

Updated May 29, 20263 min read

Carriyo's automation lets you control which carrier picks up each shipment and what timing SLAs are attached to it. Two kinds of rules run side by side:

  • Shipping rules. At booking time, pick the carrier account that will fulfill the shipment.
  • Service levels. At several shipment lifecycle moments, compute the timing SLAs (the customer promise plus three internal ones) attached to the shipment.

Both are rule-driven and share the same machinery: rulesets, priority-ordered evaluation, AND-combined conditions. They differ in when they fire, what they output, and what happens when no rule matches.

Rulesets

A Ruleset is a container that groups related rules. Rulesets are an optional organizational layer:

  • Rulesets disabled (default for many tenants). The Dashboard shows a single flat list of rules. Behind the scenes Carriyo uses one hidden default ruleset, but users never see it. They create and manage rules directly without thinking about rulesets at all.
  • Rulesets enabled. The tenant turns on rulesets and can create multiple, scoped by (merchant, pickup country). This shape suits tenants with many merchants and many origin countries who want a separate set of rules per (merchant, country) combination. Acme Brand → forward shipments out of UAE and Acme Brand → forward shipments out of KSA then live as independent rulesets.

The same enable/disable pattern applies to both carrier-selection rules and service-level rules. Each rule type has its own ruleset, and the two don't mix.

Rules and priority evaluation

A Rule belongs to a ruleset and carries:

  • Conditions: AND-combined predicates that must all match.
  • Target: what the rule produces when its conditions match (a carrier account for carrier-selection rules, an SLA value for service-level rules).
  • Sequence: the priority position. Lower number means higher priority. Drag-and-drop in the Dashboard.
  • Active flag: toggles per-rule without deleting.

Each automation type fires at a specific moment: a shipment booking, or a lifecycle transition that triggers an SLA computation. When it fires, the engine walks the applicable ruleset's rules in priority order. The first rule whose conditions match wins, provided its target also passes any viability checks that apply. If no rule matches, the result depends on the rule type (covered below).

Carrier selection

At booking time, when a shipment is created or confirmed without an explicit carrier_account_id, the carrier-selection rules walk the merchant's applicable ruleset. They pick a carrier account based on shipment data: weight, route, items, custom attributes. If no rule matches (or every matching rule's targets fail eligibility), the shipment is not assigned to any carrier account. It waits for ops to assign one manually from the Dashboard.

For the engine mechanics (multi-target selection modes, eligibility filtering, rule limits), see Shipping rules. Multi-target selection modes include priority-ordered, cheapest, round-robin, and (coming soon) fastest.

Service level determination

Service levels are timing SLAs attached to a shipment. There are four, each evaluated at a different lifecycle moment based on a different reference timestamp:

Service levelComputed whenBased onTracks
Customer promiseShipment is createdOrder timeEnd-to-end customer-facing delivery time
Estimated processing timeShipment is createdOrder timeInternal SLA, warehouse pick / pack
Estimated collection timeShipment is processed (booked)Processing timeInternal SLA, carrier collection (shipping)
Estimated delivery timeShipment is shippedShipping timeInternal SLA, carrier delivery

Each service level is the output of a service-level rule matching against the shipment data at that lifecycle moment. Together, the four service levels let reporting and analytics track timeliness end-to-end. They cover the overall customer promise plus the three internal SLAs that underpin it.

For the rule mechanics, see Service levels.

How it fits with other modules

  • Shipping. Carrier-selection rules run at booking time and decide which carrier account ends up on the Shipment. Service-level rules attach SLAs to the Shipment at later lifecycle moments.
  • Carrier configuration. Carrier accounts and their capacity, network, and costing profiles are the inputs carrier-selection rules reason over. The profiles describe what's possible; the rules pick which one wins.
  • Account model. Rulesets scope per merchant. Rule definitions don't cross merchants.