Overview
The Fulfillment Module manages shipping and delivery operations including shipping profiles, service zones, geographic zones, shipping options with rule-based pricing, and fulfillment tracking. It provides a flexible system for configuring complex shipping scenarios. Key Features:- Shipping profile management
- Service zones with geographic coverage
- Rule-based shipping options
- Multi-provider fulfillment support
- Fulfillment tracking and labeling
- Dynamic shipping calculations
- Fulfillment set organization
When to Use
Use the Fulfillment Module when you need to:- Configure shipping options for products
- Define geographic shipping zones
- Calculate shipping costs based on rules (weight, price, etc.)
- Manage multiple fulfillment providers
- Create and track fulfillments
- Generate shipping labels
- Handle multi-location shipping
- Support pickup and delivery options
Data Models
ShippingProfile
Groups products with similar shipping requirements.Unique shipping profile identifier
Profile name (e.g., “Standard Products”, “Fragile Items”)
Profile type:
default, gift_card, customServiceZone
Defines a shipping service area with associated shipping options.Unique service zone identifier
Service zone name
ID of the parent fulfillment set
Geographic areas covered by this zone
Available shipping options in this zone
GeoZone
Defines a geographic area within a service zone.Unique geo zone identifier
Zone type:
country, province, city, zipTwo-letter ISO country code
Province or state code
City name
Regex pattern for postal codes
ID of the parent service zone
ShippingOption
Represents a shipping method available to customers.Unique shipping option identifier
Shipping option name (e.g., “Express Shipping”)
ID of the service zone
ID of the shipping profile
Fulfillment provider ID (e.g., “manual”, “shippo”)
ID of the shipping option type
Provider-specific configuration data
Rules for pricing and availability
ShippingOptionRule
Defines conditions and pricing for shipping options.Unique rule identifier
ID of the shipping option
Rule attribute (e.g., “total”, “weight”, “quantity”)
Comparison operator:
eq, ne, gt, gte, lt, lte, inRule value to compare against
Fulfillment
Tracks order fulfillment.Unique fulfillment identifier
Stock location fulfilling the items
Fulfillment provider ID
ID of the shipping option used
Provider-specific fulfillment data
When fulfillment was shipped
When fulfillment was delivered
When fulfillment was canceled
Items in this fulfillment
Shipping labels
FulfillmentSet
Organizes fulfillment configuration.Unique fulfillment set identifier
Fulfillment set name
Set type:
pickup, shippingService zones in this set
Service Interface
The Fulfillment Module service is available at@medusajs/medusa/fulfillment.
Create Shipping Profile
Create a shipping profile for products.Create Fulfillment Set
Create a fulfillment set with service zones.Create Service Zone
Create a service zone with geographic coverage.Create Geo Zone
Define a geographic area.Create Shipping Option
Create a shipping method with rules.List Shipping Options for Context
Find available shipping options for an address.Create Fulfillment
Create a fulfillment for order items.Create Shipping Labels
Generate shipping labels for fulfillment.Update Fulfillment
Update fulfillment status.Cancel Fulfillment
Cancel an active fulfillment.Integration Examples
With Cart Module
Add shipping method to cart.With Stock Location Module
Multi-location fulfillment.With Order Module
Create fulfillments for orders.Fulfillment Providers
Medusa supports multiple fulfillment providers:Manual Provider
Built-in provider for manual fulfillment processes.Shippo
Best Practices
- Shipping Profiles: Group products with similar shipping requirements (fragile, oversized, standard) into profiles.
- Service Zones: Structure zones hierarchically - start with broad zones (country), then narrow (province, city, ZIP).
-
Rule-Based Pricing: Use rules to implement complex pricing:
- Free shipping over certain total
- Weight-based pricing
- Quantity discounts
-
Geo Zone Expressions: Use
postal_expressionwith regex for flexible postal code matching (e.g.,^94for San Francisco area). - Multi-Location: Configure fulfillment sets per location for complex inventory scenarios.
-
Provider Data: Store provider-specific configuration in the
datafield for flexibility.
Related Modules
- Cart Module - Add shipping methods to carts
- Order Module - Create order fulfillments
- Stock Location Module - Multi-location fulfillment
- Inventory Module - Reserve inventory for fulfillments
- Region Module - Configure region fulfillment providers