- 6 minutes to read

7. Order Invoiced

Step Overview

Step 7 is the final step in the Order-to-Cash process. The invoice is generated in the Finance system and represents the completion of the entire order lifecycle. This step triggers accounts receivable processes and customer billing.

Message Details

  • Message Type: O2C.Order.Invoice/1.0
  • Domain: Finance
  • System: ERP-Finance
  • Service: INV-Order-Invoiced
  • Direction: Send (Outgoing from Finance)
  • Format: JSON
  • Log Status: 0 (Success) for issued invoice, -1337 if invoicing fails
  • Timing: Typically 1-5 days after Order Delivered

Business Data (Happy Path)

Same customer and product data:

  • Order ID: ORD-10001 (same as source order)
  • Customer ID: CUST-001
  • Product SKU: SKU-DEMO-001
  • Quantity: 1
  • Order Total: USD 99.95

Sample JSON Message

This is the raw message payload that would be base64-encoded in the Log Event Body field.

{
  "invoiceId": "INV-2025-10001",
  "orderId": "ORD-10001",
  "customerId": "CUST-001",
  "customerName": "Acme Corporation",
  "customerEmail": "orders@acme.example.com",
  "invoiceDate": "2025-10-21T09:15:00Z",
  "dueDate": "2025-11-20",
  "paymentTerms": "NET30",
  "invoiceStatus": "ISSUED",
  "invoiceItems": [
    {
      "lineNumber": 1,
      "description": "Demo Widget",
      "sku": "SKU-DEMO-001",
      "quantity": 1,
      "unitPrice": 99.95,
      "lineTotal": 99.95,
      "taxCode": "STANDARD",
      "taxRate": 0.0,
      "taxAmount": 0.0
    }
  ],
  "subtotal": 99.95,
  "taxTotal": 0.0,
  "shippingCharge": 0.0,
  "invoiceTotal": 99.95,
  "currency": "USD",
  "paymentMethod": "INVOICE",
  "purchaseOrder": "PO-2025-10001",
  "trackingNumber": "TRK-20251016-0001",
  "gl_account": "4100-Sales-Revenue",
  "revenue_recognition_date": "2025-10-20"
}

Nodinite Log Event (JSON formatted)

This is the complete Log Event structure that would be sent to the Nodinite Log API. The message above is base64-encoded into the Body field.

Full Nodinite Log Event

{
  "LogAgentValueId": -5,
  "EndPointName": "ERP-Finance-Invoice-Send",
  "EndPointUri": "C:\\Integration\\ERP\\Finance\\Invoices\\Out",
  "EndPointDirection": 1,
  "EndPointTypeId": 60,
  "OriginalMessageTypeName": "O2C.Order.Invoice/1.0",
  "LogDateTime": "2025-10-21T09:16:00.234Z",
  "EventDirection": 18,
  "ProcessingUser": "ERP\\FinanceService",
  "SequenceNo": 6,
  "EventNumber": 6,
  "LogText": "Order Invoiced",
  "ApplicationInterchangeId": "PIC-20251022-0001",
  "LocalInterchangeId": null,
  "LogStatus": 0,
  "ProcessName": "O2C-Finance-Invoicing",
  "ProcessingMachineName": "erp-server-01",
  "ProcessingModuleName": "ERP.FinanceService.Invoicer",
  "ProcessingModuleType": "WindowsService",
  "ServiceInstanceActivityId": null,
  "ProcessingTime": 267,
  "Body": "eyJpbnZvaWNlSWQiOiJJTlYtMjAyNS0xMDAwMSIsIm9yZGVySWQiOiJPUkQtMTAwMDEiLCJjdXN0b21lcklkIjoiQ1VTVC0wMDEiLCJjdXN0b21lck5hbWUiOiJBY21lIENvcnBvcmF0aW9uIiwiY3VzdG9tZXJFbWFpbCI6Im9yZGVyc0BhY21lLmV4YW1wbGUuY29tIiwiaW52b2ljZURhdGUiOiIyMDI1LTEwLTIxVDA5OjE1OjAwWiIsImR1ZURhdGUiOiIyMDI1LTExLTIwIiwicGF5bWVudFRlcm1zIjoiTkVUMzAiLCJpbnZvaWNlU3RhdHVzIjoiSVNTVUVEIiwiaW52b2ljZUl0ZW1zIjpbeyJsaW5lTnVtYmVyIjoxLCJkZXNjcmlwdGlvbiI6IkRlbW8gV2lkZ2V0Iiwic2t1IjoiU0tVLURFTU8tMDAxIiwicXVhbnRpdHkiOjEsInVuaXRQcmljZSI6OTkuOTUsImxpbmVUb3RhbCI6OTkuOTUsInRheENvZGUiOiJTVEFOREFSRCIsInRheFJhdGUiOjAuMCwidGF4QW1vdW50IjowLjB9XSwic3VidG90YWwiOjk5Ljk1LCJ0YXhUb3RhbCI6MC4wLCJzaGlwcGluZ0NoYXJnZSI6MC4wLCJpbnZvaWNlVG90YWwiOjk5Ljk1LCJjdXJyZW5jeSI6IlVTRCIsInBheW1lbnRNZXRob2QiOiJJTlZPSUNFIiwicHVyY2hhc2VPcmRlciI6IlBPLTIwMjUtMTAwMDEiLCJ0cmFja2luZ051bWJlciI6IlRSSy0yMDI1MTAxNi0wMDAxIiwiZ2xfYWNjb3VudCI6IjQxMDAtU2FsZXMtUmV2ZW51ZSIsInJldmVudWVfcmVjb2duaXRpb25fZGF0ZSI6IjIwMjUtMTAtMjAifQ==",
  "Context": {
    "FileName": "ORD-10001-invoice.json",
    "OrderNumber": "ORD-10001",
    "CustomerId": "CUST-001",
    "CustomerName": "Acme Corporation",
    "OrderAmount": "99.95",
    "InvoiceId": "INV-2025-10001",
    "InvoiceDate": "2025-10-21T09:15:00Z",
    "DueDate": "2025-11-20",
    "PurchaseOrder": "PO-2025-10001",
    "ExtendedProperties/1.0#RepositoryBinding": "{\"Name\":\"Order Invoiced\",\"Service\":{\"Name\":\"INT1337-INV-Order-Invoiced\",\"Direction\":\"Send\",\"System\":{\"Name\":\"ERP-Finance\"},\"Integration\":{\"Name\":\"INT1337 - Order-to-Cash\"},\"ExternalServiceRelations\":[{\"Name\":\"INT1337-DEL-Order-Delivered\",\"System\":{\"Name\":\"WMS\"}}],\"BPMs\":[{\"Name\":\"INT1337 - Order-to-Cash Flow\",\"ArtifactRenaming\":\"Order Invoiced - Complete\",\"Domain\":{\"Name\":\"Finance\",\"Index\":3},\"Step\":6,\"ServiceRelations\":[{\"Name\":\"INT1337-DEL-Order-Delivered\",\"Direction\":\"Receive\",\"Domain\":{\"Name\":\"Logistics\",\"Index\":2},\"Step\":5,\"Label\":\"Delivery Proof\",\"ConnectorStyle\":1,\"SourceAttachmentPoint\":2,\"TargetAttachmentPoint\":0}]}]}}"
  }
}

Key Points

  1. Finance System: First and only involvement of Finance domain system (ERP-Finance)
  2. Revenue Recognition: Includes GL account and revenue recognition date for accounting compliance
  3. Complete Order Closure: This final step closes the order-to-cash cycle
  4. Correlation Completed: Same CorrelationId ({PREFIX}-{DATEPART}-{SEQUENCE}) completes the full traceability chain
  5. Payment Terms: DueDate and PaymentTerms establish accounts receivable expectations
  6. Sequence Final: SequenceNo 6 indicates all 7 steps completed (steps 0-6 = 7 steps)
  7. Cross-Domain Closure: Finance domain (Index 3, Step 6) receives delivery proof from Logistics to initiate billing
  8. Complete BPM Journey: All 4 domains and 7 steps now visualized with connectors

Repository Binding for Step 7

This log event includes a Repository Binding JSON that defines:

  • Service: INT1337-INV-Order-Invoiced with Direction Send
  • System: ERP-Finance
  • Integration: INT1337 - Order-to-Cash
  • ExternalServiceRelations: Links to INT1337-DEL-Order-Delivered in the WMS system (delivery confirmation triggers invoicing)
  • BPM: Specifies this is Step 6 (the final step) in the Finance domain (Index 3) with milestone name "Order Invoiced - Complete"
  • BPM ServiceRelations: Includes an external relation to INT1337-DEL-Order-Delivered showing data flow from Step 5 (Logistics domain) with:
    • Label: "Delivery Proof" - Delivery confirmation triggers invoice generation
    • ConnectorStyle: 1 - Orthogonal connector with arrow
    • SourceAttachmentPoint: 2 - Arrow originates from bottom of Step 6 (Finance/ERP-Finance)
    • TargetAttachmentPoint: 0 - Arrow terminates at top of Step 5 (Logistics/WMS)

Step 7 represents the final business milestone—invoice generation completing the order-to-cash cycle. The Finance domain uses delivery proof (proof that goods reached customer) as the trigger for revenue recognition and billing.


Full Order-to-Cash Journey Summary

The following represents a complete happy-path order from Step 1 through Step 7:

Step Time (Relative) Domain System Message Type Status
1 T+0 min Sales Portal O2C.Order.Received/1.0 Received
2 T+3 min Planning ERP O2C.Order.Entry/1.0 Entered
3 T+7 min Sales Portal O2C.Order.Confirmation/1.0 Confirmed
4 T+23 min Planning ERP O2C.Order.Scheduled/1.0 Planned
5 T+2880 min (2 days) Logistics WMS O2C.Order.Ready/1.0 Packed
6 T+5760 min (4 days) Logistics WMS O2C.Order.Shipped/1.0 Shipped
7 T+6240 min (4.3 days) Finance ERP-Finance O2C.Order.Invoice/1.0 Invoiced

Total Journey Time: ~4.3 days from order reception to invoice issuance.


HTTP Request to Log API

The Log Event above would be sent as a POST request:

POST /api/v2/LogEvents HTTP/1.1
Host: nodinite-api.example.com
Content-Type: application/json
x-ms-client-tracking-id: {PREFIX}-{DATEPART}-{SEQUENCE}
Authorization: Bearer YOUR_API_KEY

{
  "LogAgentValueId": -5,
  "EndPointName": "ERP-Finance-Invoice-Send",
  ...
}

Next Steps