- 5 minutes to read

O2C Demo: Log Event Structure

This page is part of the Order-to-Cash demo. It shows how every Log Event of the demo is built, how it reaches the Log API, how the events of one order are correlated, and which payload fields make good Search Fields.

Log Event Structure in This Demo

Each Log Event follows the Nodinite JSON formatted Log Event structure with:

  1. Details (mandatory fields + optional context)
    • LogAgentValueId: 5
    • EndPointName: Domain-specific endpoint name
    • EndPointUri: File-based path
    • EndPointDirection: 0 (receive) or 1 (send)
    • EndPointTypeId: 60 (file)
    • OriginalMessageTypeName: Message Type from the table of steps for business events, O2C.Forwarding/1.0 for forwarding events
    • LogDateTime: UTC with random increments between steps
    • SequenceNo: Position of the event within its order (1-14); EventNumber: running counter across all orders
  2. Payload (Body)
    • Base64-encoded message content
    • Alternates between JSON, XML, and flat-file formats
    • All messages keep the same business data values
  3. Context Properties (Context Options)
    • FileName: Order-specific file name
    • OrderNumber: Incrementing order number
    • CustomerId, CustomerName, OrderAmount: Static customer and order references
    • ExtendedProperties/1.0#RepositoryBinding: Repository Binding for automatic landscape creation

The Correlation ID is not a Context Property; the demo stores it in ApplicationInterchangeId.

Log Agent Configuration

Note

5 is also the default Log Agent for Azure Logic Apps logging. In an environment that already logs Logic Apps, or that other demos share, change $LOG_AGENT_VALUE_ID in your copy of the script to an id no other Log Agent uses, so the demo events stay separate.

Log API Invocation

Each interchange step is a Log Event for the Nodinite Log API:

  • Correlation ID: {PREFIX}-{DATEPART}-{HHMM}-{SEQUENCE} in ApplicationInterchangeId (see Correlation ID Format below)
  • Endpoint: REST POST to https://{host}:{port}/LogAPI/api/LogEvent, see Log using REST
  • Payload: Nodinite JSON Log Event (base64-encoded body + context)

Important Implementation Details

Log Status Handling

  • Log Status 0: Success (all completed steps)
  • Log Status -1337: Failed/incomplete (last step of partial orders)
  • Semantic meaning: Lets you track where orders stop in the pipeline

Correlation ID Format

  • Format: {PREFIX}-{DATEPART}-{HHMM}-{SEQUENCE}, stored as ApplicationInterchangeId
  • Components:
    • {PREFIX} = Customer code (e.g., PIC, Process Interchange Correlation)
    • {DATEPART} = Execution date in YYYYMMDD format (generated when the script runs)
    • {HHMM} = Hour and minute when the script generates the order (e.g., 0915 for 09:15)
    • {SEQUENCE} = Order sequence number (e.g., 0001)
  • Example: PIC-20251023-0915-0001, PIC-20251023-0915-0042, etc. (when executed on Oct 23, 2025 at 09:15)
  • Example: PIC-20251024-1430-0001, PIC-20251024-1430-0002, etc. (when executed on Oct 24, 2025 at 14:30)
  • Scope: All steps of an order share the same Correlation ID
  • Purpose: End-to-end tracing and grouping
  • Benefit: You can rerun the script on any date and time without code changes

Log Event Reference

All steps create Nodinite Log Events that follow the JSON formatted Log Event structure:

The first Log Event of order ORD-10001, generated on Oct 14, 2025 at 09:15 (Body and the Repository Binding shortened):

{
  "LogAgentValueId": 5,
  "EndPointName": "Portal-OrderReceived-Drop",
  "EndPointUri": "C:\\Integration\\Portal\\Orders\\In",
  "EndPointDirection": 0,
  "EndPointTypeId": 60,
  "OriginalMessageTypeName": "O2C.Order.Received/1.0",
  "LogDateTime": "2025-10-14T06:02:15.0000000Z",
  "EventDirection": 17,
  "ProcessingUser": "Portal\\OrderService",
  "SequenceNo": 1,
  "EventNumber": 1,
  "LogText": "Order Received from Customer",
  "ApplicationInterchangeId": "PIC-20251014-0915-0001",
  "LocalInterchangeId": null,
  "LogStatus": 0,
  "ProcessName": "O2C-Order-Reception",
  "ProcessingMachineName": "portal-server-01",
  "ProcessingModuleName": "Portal.OrderService.Receiver",
  "ProcessingModuleType": "WindowsService",
  "ServiceInstanceActivityId": null,
  "ProcessingTime": 23,
  "Body": "eyJiYXRjaElkIjoiYmF0Y2gtMjAyNS0x...",
  "Context": {
    "FileName": "ORD-10001-order-received-from-customer.json",
    "OrderNumber": "ORD-10001",
    "CustomerId": "CUST-001",
    "CustomerName": "Contoso Corporation",
    "OrderAmount": "99.95",
    "ExtendedProperties/1.0#RepositoryBinding": "{...}"
  }
}

Key Fields

  • OriginalMessageTypeName: Determines the Search Field Expressions (critical); forwarding events use O2C.Forwarding/1.0
  • ApplicationInterchangeId: Correlation ID linking all Log Events of one order
  • SequenceNo: Starts at 1 for each order and runs to 14 for a complete order; EventNumber keeps counting across all orders
  • LogStatus: 0 (success) or -1337 (incomplete)
  • EndPointDirection: 0 (Receive) or 1 (Send), with EventDirection 17 or 18 to match
  • Body: Base64-encoded message (JSON, XML, or flat file)
  • LogText: Milestone name only (e.g., "Order Received from Customer"), with no order ID to avoid clutter
  • ExtendedProperties/1.0#RepositoryBinding: Automatic landscape creation (requires AllowRepositoryAutomapping = true)

Search Field Extraction

The Message Type of each step decides which Search Fields Nodinite extracts from its message. The table lists the payload fields of each message that make good Search Fields, with example values for order ORD-10001:

Step Message Type Payload Fields to Extract Example
1 O2C.Order.Received/1.0 orderId, customer.customerId, orderTotal, orderDate ORD-10001
2 O2C.Order.Entry/1.0 OrderId, ERPReferenceNumber, EntryDate ERP-2025-10001
3 O2C.Order.Confirmation/1.0 OrderId, ConfirmationId, EstimatedShipDate CONF-2025-10001
4 O2C.Order.Scheduled/1.0 orderId, scheduleId, productionLines lineId SCH-2025-10001
5 O2C.Order.Ready/1.0 OrderId, PackingId, TrackingNumber, Warehouse TRK-20251016-10001
6 O2C.Order.Delivered/1.0 OrderId, DeliveryId, DeliveryDate, TrackingNumber DLVY-2025-10001
7 O2C.Order.Invoice/1.0 orderId, invoiceId, invoiceTotal, dueDate INV-2025-10001

Next Steps