Fulfillment Runtime Lifecycle
End-to-end 3PL lifecycle from sales order eligibility through runtime requests, provider sync, fulfillment operations, inventory mirror, tracking, and recovery
Use this guide when a Sales Order is expected to flow to a 3PL provider or when fulfillment/tracking state is unclear.
Lifecycle Map
Eligibility
Sales Orders and lines must be eligible before runtime sync. Eligibility can depend on item setup, warehouse routing, provider config, payment/approval state, and line details.
Check:
| Check | Why it matters |
|---|---|
| Sales Order status | Prevents sending incomplete/canceled orders. |
| Line item setup | Ensures provider SKU/source refs exist. |
| Warehouse/provider config | Determines where the order is sent. |
| Address | Provider needs usable ship-to details. |
| Payment/approval state | Prevents fulfillment before business rules allow it. |
| Provider runtime window | Runtime may intentionally pause outside operating windows. |
Runtime Request
ThreePL_Runtime_Request__c is the queue/work item. Runtime services create or process requests for sales order sync, purchase order sync, inventory polling, health sweeps, and provider work.
If work appears stuck, check runtime request status before manually editing the Sales Order.
Runtime Decision Flow
Provider Sync
Provider sync uses provider-specific REST classes and services:
| Area | Classes |
|---|---|
| Sales order dispatch/update | FulfillmentOrderDispatchService, FulfillmentOrderUpdateService, REST wrappers. |
| Product catalog | ProductCatalogService, ProductCatalogRest. |
| Purchase orders | PurchaseOrderRest, CustomPurchaseOrderRest. |
| Inventory mirror | ThreePLInventoryMirrorService, LotInventoryRest, WarehouseInfoRest. |
| Tracking | ShipmentTrackingRest, SalesOrderTrackingController, TrackingEmailService. |
| Runtime | ThreePLRuntimeService, queueables, schedulers, request service, sync state service. |
Sync State and Transactions
Use ThreePL_Record_Sync_State__c and ThreePL_Transaction__c as technical evidence.
| Record | Tells you |
|---|---|
| Sync State | Which Salesforce record maps to which provider record, status, and source ref. |
| Transaction | Endpoint, request/response, success/failure, provider status, and timing. |
| Sync History | Fulfillment sync and update history visible to operations. |
Do not rely only on a visible Sales Order status when diagnosing a provider issue. Provider state and sync history can be more precise.
Fulfillment Operations
Fulfillment_Operation__c, Shipped_Line__c, packed-line services, and fulfillment timeline components show operational progress. They help answer:
- Was the order sent?
- Did the provider accept it?
- Did the provider pack or fulfill lines?
- Are line quantities complete?
- Is tracking present?
- Did any provider update fail?
Inventory Mirror
Provider-owned inventory is mirrored into Salesforce. It should not be manually adjusted like internal warehouse stock.
Mirror rows can include provider quantity, source system, provider snapshot time, mirror status, and related warehouse/item context. If inventory looks wrong, check provider sync status and last runtime activity before making internal adjustments.
Tracking
Tracking can come from provider writeback or manual action. Use Sales_Order_Tracking__c, addTrackingAction, orderShipmentTracker, and tracking email actions.
Before sending customer tracking email:
- Confirm carrier/tracking values.
- Confirm the tracking belongs to the intended order/shipment.
- Confirm line fulfillment is not misleading.
- Send from Salesforce action so email history is retained.
Recovery
| Symptom | Recovery path |
|---|---|
| Runtime request failed | Inspect transaction error, provider config, and retry policy. |
| Provider accepted order but Salesforce looks stale | Re-poll provider or use runtime refresh path. |
| Tracking omitted by provider update | Re-pull provider state and confirm Sales Order Tracking rows. |
| Inventory mirror stale | Check inventory poll schedule, provider config, and last success/error. |
| Warehouse handoff caused routing confusion | Review provider transition and successor config. |
Manual status edits should be the last resort because they can hide provider or sync evidence.
Last updated on