Order-to-Cash Workflow
Overview
The Order-to-Cash (O2C) workflow represents the complete end-to-end process from receiving a customer order through collecting payment. This guide demonstrates how the Sales module components work together to create a seamless revenue cycle.
Complete Order-to-Cash Flow
Process Overview
Order Creation → Order Confirmation → Order Fulfillment →
Order Shipping → Invoice Generation → Invoice Sending →
Payment Processing → Payment Collection → Order CompletionTimeline Example
| Stage | Timeline | Status |
|---|---|---|
| Order Created | Day 0, 10:00 AM | Draft |
| Order Confirmed | Day 0, 11:00 AM | Confirmed |
| Fulfillment Begins | Day 1, 9:00 AM | Processing |
| Order Shipped | Day 2, 2:00 PM | Shipped |
| Invoice Generated | Day 2, 3:00 PM | Draft |
| Invoice Sent | Day 2, 3:30 PM | Sent |
| Payment Received | Day 10, 9:00 AM | Completed |
| Order Completed | Day 10, 9:15 AM | Completed |
Total Cycle Time: 10 days from order to cash
Step-by-Step Workflow
Step 1: Create Order
API Call: POST /api/v1/sales/orders
Request:
{
"customer_id": 42,
"order_date": "2025-12-17",
"due_date": "2025-12-24",
"source": "online_store",
"currency": "USD",
"billing_address": {
"street": "123 Main St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"shipping_info": {
"method": "standard",
"street": "123 Main St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"items": [
{
"product_id": 101,
"quantity": 2,
"unit_price": 99.99
},
{
"product_id": 102,
"quantity": 1,
"unit_price": 149.99
}
]
}Result: Order created with status draft, order number ORD-A3X7K9M2
Step 2: Confirm Order
API Call: POST /api/v1/sales/orders/{order}/confirm
Request:
{
"payment_authorization": "AUTH-123456",
"notes": "Payment verified - ready for fulfillment"
}What Happens:
- Order status →
confirmed - Inventory reserved for order items
- Fulfillment team notified
- Payment authorization captured (if using auth-capture flow)
Result: Order confirmed, ready for fulfillment
Step 3: Process Order
Manual/Automatic: System transitions order to processing status
Activities:
- Warehouse receives pick list
- Items picked from inventory
- Quality control checks performed
- Items packed for shipment
- Shipping label generated
Tracking: Monitor via GET /api/v1/sales/orders/{order}/activities
Step 4: Ship Order
API Call: POST /api/v1/sales/orders/{order}/ship
Request:
{
"tracking_number": "1Z999AA10123456784",
"carrier": "UPS",
"service_level": "Ground",
"shipped_date": "2025-12-19",
"estimated_delivery": "2025-12-23"
}What Happens:
- Order status →
shipped - Inventory fully decremented
- Customer receives shipping notification
- Tracking information recorded
Result: Order in transit to customer
Step 5: Generate Invoice
API Call: POST /api/v1/sales/orders/{order}/generate-invoice
Request:
{
"issue_date": "2025-12-19",
"due_date": "2026-01-18",
"payment_terms": {
"terms": "Net 30",
"due_days": 30
},
"auto_send": false
}What Happens:
- Invoice created from order line items
- Invoice number assigned:
INV-20251219-001 - Tax and totals calculated
- Invoice status:
draft
Result: Invoice ready for review and sending
Step 6: Send Invoice
API Call: POST /api/v1/sales/invoices/{invoice}/send
Request:
{
"email_to": ["billing@acme.com"],
"subject": "Invoice INV-20251219-001",
"message": "Please find attached invoice for your recent order. Payment due within 30 days.",
"attach_pdf": true
}What Happens:
- Invoice status →
sent - PDF invoice generated
- Email sent to customer
- Invoice appears in accounts receivable
- Payment due date tracking begins
Result: Customer has invoice, payment expected by due date
Step 7: Process Payment
API Call: POST /api/v1/sales/payments
Request (Customer initiates payment):
{
"customer_id": 42,
"invoice_id": 456,
"amount": 347.47,
"method": "bank_transfer",
"reference_number": "WIRE-123456"
}Follow-up: POST /api/v1/sales/payments/{payment}/process
What Happens:
- Payment created with status
pending - Payment processed through gateway
- Payment status →
completed - Transaction recorded
Result: Payment received and confirmed
Step 8: Apply Payment to Invoice
API Call: POST /api/v1/sales/invoices/{invoice}/apply-payment
Request:
{
"payment_id": 789,
"amount": 347.47,
"payment_date": "2025-12-27"
}What Happens:
- Invoice amount_paid updated
- Invoice amount_due → $0.00
- Invoice status →
paid - Accounts receivable updated
Result: Invoice paid in full
Step 9: Complete Order
API Call: POST /api/v1/sales/orders/{order}/complete
Request:
{
"delivery_confirmed": true,
"delivered_date": "2025-12-23"
}What Happens:
- Order status →
completed - Revenue recognized
- Sales metrics updated
- Order archived
Result: Order-to-Cash cycle complete!
Workflow Variations
Variation 1: Prepaid Orders
Flow: Payment → Order → Fulfillment → Shipping → Invoice (receipt)
- Process payment first:
POST /api/v1/sales/payments - Create order with payment reference
- Confirm order (payment already received)
- Fulfill and ship
- Generate invoice as receipt (optional)
Use Case: E-commerce, retail, prepaid services
Variation 2: Net Terms (Credit Customers)
Flow: Order → Fulfillment → Shipping → Invoice → Payment (30-60 days later)
- Create and confirm order
- Fulfill and ship (no payment yet)
- Generate and send invoice with Net 30/60 terms
- Monitor invoice aging
- Send payment reminders
- Process payment when received
Use Case: B2B sales, established customers, wholesale
Variation 3: Partial Payments
Flow: Order → Deposit → Fulfillment → Shipping → Final Payment → Invoice
- Create order
- Process deposit payment (e.g., 50%)
- Apply partial payment to order
- Fulfill and ship
- Process final payment
- Generate final invoice showing both payments
Use Case: Custom orders, large purchases, installment sales
Variation 4: Consolidated Billing
Flow: Multiple Orders → Month End → Single Invoice → Payment
- Create and fulfill multiple orders throughout month
- At month end, generate consolidated invoice
- Invoice references all orders
- Single payment for all orders
- Payment distributed across invoices
Use Case: Enterprise accounts, subscription services, corporate customers
Integration Points
Order → Inventory Integration
When: Order confirmation Action: Reserve inventory for order items
GET /api/v1/operations/inventory?product_id=101
POST /api/v1/operations/inventory/reserve
{
"product_id": 101,
"quantity": 2,
"reference_type": "Order",
"reference_id": 123
}Order → Invoice Integration
When: After shipping (or per business rules) Action: Automatically generate invoice from order
POST /api/v1/sales/orders/123/generate-invoice
{
"auto_send": true,
"due_date": "2026-01-18"
}Invoice → Payment Integration
When: Payment received Action: Apply payment to invoice, update balance
POST /api/v1/sales/invoices/456/apply-payment
{
"payment_id": 789,
"amount": 347.47
}Payment → Accounting Integration
When: Payment completed Action: Create accounting entries
- Debit: Bank Account
- Credit: Accounts Receivable
Monitoring the O2C Cycle
Dashboard Metrics
Endpoint: GET /api/v1/sales/dashboard
Key Metrics:
- Average O2C cycle time
- Orders pending fulfillment
- Orders pending payment
- Overdue invoices
- Cash collection rate
- Days Sales Outstanding (DSO)
Orders Requiring Attention
Endpoint: GET /api/v1/sales/orders/requires-attention
Shows:
- Orders overdue for fulfillment
- Orders pending confirmation
- Orders on hold
Overdue Invoices
Endpoint: GET /api/v1/sales/invoices/overdue
Shows:
- Invoices past due date
- Days overdue
- Outstanding amounts
- Customer payment history
Performance Metrics
Endpoint: GET /api/v1/sales/orders/performance-metrics
Provides:
- Order fulfillment time
- Invoice generation time
- Payment collection time
- Complete O2C cycle time
Best Practices
Order Stage
- Validate Customer Data: Ensure complete and accurate customer information
- Check Inventory: Verify stock availability before confirming orders
- Set Realistic Due Dates: Consider fulfillment time and shipping duration
- Confirm Payment: Authorize payment before allocating inventory
Fulfillment Stage
- Prioritize Orders: Use priority flags to sequence fulfillment
- Batch Similar Orders: Group orders for efficient picking
- Quality Check: Inspect items before packing
- Update Status Promptly: Keep order status current
Invoicing Stage
- Invoice Promptly: Generate invoices same day as shipment
- Include Details: Provide clear line items and payment instructions
- Set Appropriate Terms: Match terms to customer creditworthiness
- Send Immediately: Don't delay sending invoices
Payment Stage
- Offer Multiple Methods: Accept various payment types
- Send Reminders: Automate payment reminder schedule
- Track Aging: Monitor accounts receivable aging weekly
- Follow Up Personally: Call customers with overdue payments
Completion Stage
- Verify Delivery: Confirm customer received goods
- Reconcile Payments: Match payments to invoices daily
- Complete Orders: Mark orders complete promptly for accurate metrics
- Archive Records: Maintain complete audit trail
Troubleshooting Common Issues
Order Stuck in Processing
Symptoms: Order in processing status for extended period
Causes:
- Inventory shortage
- Fulfillment bottleneck
- Quality control hold
Resolution:
- Check inventory availability
- Review fulfillment queue
- Contact warehouse manager
- Update customer on delay
Invoice Not Paid
Symptoms: Invoice past due date
Causes:
- Customer never received invoice
- Customer dispute
- Customer cash flow issues
- Invoice sent to wrong contact
Resolution:
- Resend invoice
- Call customer
- Verify contact information
- Offer payment plan if needed
Payment Processing Failed
Symptoms: Payment declined or failed
Causes:
- Insufficient funds
- Invalid payment method
- Card expired
- Fraud detection
Resolution:
- Contact customer for updated payment details
- Offer alternative payment methods
- Retry with updated information
- Consider payment plan
Order-to-Cash Taking Too Long
Symptoms: High DSO, long cycle times
Causes:
- Slow fulfillment
- Delayed invoicing
- Poor collection processes
- Customer payment terms too long
Resolution:
- Optimize fulfillment operations
- Automate invoice generation
- Implement aggressive collections
- Review and tighten payment terms
Success Metrics
Key Performance Indicators
Order Fulfillment Time:
- Target: < 3 days
- Measure: Order confirmed → Order shipped
Invoice Generation Time:
- Target: Same day as shipment
- Measure: Order shipped → Invoice sent
Days Sales Outstanding (DSO):
- Target: < 45 days
- Measure: Invoice sent → Payment received
Order-to-Cash Cycle Time:
- Target: < 30 days
- Measure: Order created → Payment received
Collection Rate:
- Target: > 95%
- Measure: Payments collected / Invoices sent
On-Time Delivery Rate:
- Target: > 90%
- Measure: Orders delivered by due date / Total orders
Automation Opportunities
Automated Workflows
- Auto-Confirm Orders: Automatically confirm orders with valid payment
- Auto-Generate Invoices: Create invoices immediately after shipment
- Auto-Send Invoices: Email invoices without manual review
- Auto-Apply Payments: Match and apply payments to invoices
- Auto-Send Reminders: Schedule payment reminder emails
- Auto-Complete Orders: Mark orders complete after payment and delivery
Webhook Integrations
Order Events:
order.createdorder.confirmedorder.shippedorder.completed
Invoice Events:
invoice.createdinvoice.sentinvoice.paidinvoice.overdue
Payment Events:
payment.completedpayment.failedpayment.refundedpayment.disputed
Related Guides
- Order Management - Creating and managing orders
- Order Workflow - Order fulfillment processes
- Invoice Generation - Creating invoices
- Invoice Workflow - Invoice management
- Payment Processing - Processing payments
- Sales Analytics - O2C performance metrics