Shipping & Fulfillment¶
Vectis handles shipping through a carrier strategy pattern and supports simple single-shipment orders as well as multi-box warehouse fulfillment.
Carrier Strategies¶
Each shipping carrier is an extension that implements the ShippingCalculatorStrategy interface. The system ships with two built-in strategies:
| Strategy | Behavior |
|---|---|
| FlatRateShipping | Returns a fixed rate per shipping zone |
| FreeShipping | Returns a zero-cost rate (typically activated by promotions) |
Custom carriers (UPS, FedEx, local courier) are added as extensions that query live rate APIs and return structured rate quotes.
Rate Quoting¶
When a buyer reaches the shipping step at checkout, ShippingService.get_available_rates() queries all active carrier strategies for the given cart and address. Each strategy returns zero or more rate options (e.g., "Ground — $8.50", "Express — $22.00"). The buyer selects one.
Tip
Carriers can be scoped to specific channels or shipping zones. A channel selling only in Mexico does not need to query a US-only carrier.
Shipping Zones and Methods¶
Shipping configuration is organized into three levels:
- Shipping Providers — represent a carrier or logistics partner (e.g., "FedEx", "In-House Delivery").
- Shipping Zones — geographic regions a provider serves (e.g., "Domestic", "North America", "EU").
- Shipping Methods — specific service levels within a zone (e.g., "Ground", "2-Day", "Overnight").
Each method links to a carrier strategy that computes the rate.
Fulfillment Modes¶
Vectis supports two fulfillment modes, configured per channel:
By Order (Simple)¶
The entire order ships as one unit. One tracking number, one carrier. Best for small operations or digital-heavy catalogs.
By Box (Warehouse)¶
Orders are fulfilled box-by-box. Each box:
- Is created from a box template (dimensions, weight limit) or custom dimensions.
- Has its own tracking number and optional carrier.
- Contains specific line items and quantities.
This mode supports warehouse scanning workflows where packers scan items into boxes and the system tracks per-box fulfillment.
graph TD
O[Order] --> B1[Box 1 — FedEx Ground]
O --> B2[Box 2 — FedEx Ground]
O --> B3[Box 3 — Freight LTL]
B1 --> T1[Tracking: 1Z999...]
B2 --> T2[Tracking: 1Z888...]
B3 --> T3[Tracking: PRO-4455] Note
An order in by-box mode transitions to shipped only when all boxes have tracking numbers assigned. Partially fulfilled orders remain in processing.
Free Shipping via Promotions¶
Free shipping is commonly offered through the promotions system rather than manual rate overrides. Create a discount rule with:
- Condition: cart subtotal ≥ $200 (or whatever threshold you want).
- Action: Free shipping.
This keeps the free-shipping logic in one place and lets you combine it with other stackable promotions.
Box Templates¶
Box templates define reusable packaging configurations:
| Field | Purpose |
|---|---|
name | Display name (e.g., "Small Box", "Pallet") |
length, width, height | Dimensions for rate calculation |
max_weight | Weight limit for packing validation |
Templates speed up warehouse fulfillment — packers select a template and the system pre-fills dimensions.
Admin Panel¶
From Settings → Shipping in the admin:
- Providers — create and configure shipping providers.
- Zones — define geographic zones and assign them to providers.
- Methods — add service levels within zones, link to carrier strategies, set rate parameters.
- Box Templates — manage reusable packaging templates.
From the Order detail → Fulfillment tab:
- Create shipments (by-order) or pack boxes (by-box).
- Enter tracking numbers and select carriers.
- Mark fulfillments as shipped.
Warning
Changing a provider's strategy after orders have been fulfilled does not alter historical shipping records. Rate recalculation only affects future checkouts.