---
title: "Step 2: Order Entry in ERP Finished—Order-to-Cash Log Event Example"
description: "Explore the second Order-to-Cash step: order entry into the ERP system. See the XML message format, business data, and how Nodinite Log Events track the Planning domain transition with Context Properties and Repository Binding."
---

# 2. Order Entry in ERP Finished

**Step 2** occurs when the Enterprise Resource Planning (ERP) system has entered the order. This confirms that the ERP has validated the order, added it to inventory planning, and made it ready for fulfillment. The [Log Event][JSON formatted Log Event] for this step is the first one in the Planning [Domain][Domains].

![Order Entry step of order ORD-10005 in BPM Log Search: Show Details on its event, then Context Values with the file name, order number, customer, amount, and Repository Binding, animated walkthrough (7.12)][1]  
*Animated walkthrough: in [BPM Log Search][Search log events from a BPM], open **Show Details** on the *Order Entry in ERP Finished* event of order `ORD-10005` (Tailspin Toys), then the **Context Values** tab with the step's business data. The walkthrough shows ORD-10005; the examples below use order 1.*  

## :fa-diagram-project: Understanding Step 2

<div class="mermaid">
graph LR
    Prev["fa:fa-inbox Step 1: Order Received<br/>Portal (Sales)"] --> This["fa:fa-server Step 2: Order Entry<br/>ERP (Planning)"]
    This --> Next1["fa:fa-envelope Step 3: Confirmation<br/>Portal (Sales)"]
    This --> Next2["fa:fa-calendar Step 4: Order Planned<br/>ERP (Planning)"]
    This -->|"Log Event<br/>O2C.Order.Entry/1.0"| LogAPI["fa:fa-cloud-arrow-down Log API"]
    style Prev fill:#2678BD
    style This fill:#E47528
    style Next1 fill:#2678BD
    style Next2 fill:#2678BD
    style LogAPI fill:#3F827B
</div>

*Step 2 (orange) receives the order from Step 1 and splits the flow into two paths, confirmation and planning (blue); its [Log Event][Log Events] goes to the [Log API][] (teal).*

### Message Details

* **Message Type**: `O2C.Order.Entry/1.0` ([Message Types][])
* **Domain**: Planning ([Domains][])
* **System**: ERP ([Systems][])
* **Service**: INT1337-ENT-Order-Entry ([Services][])
* **Direction**: Send (outgoing from ERP)
* **Format**: XML
* **Log Status**: `0` (Success); `-1337` on the Send event when the order stops at this step
* **Timing**: In the generated data, 30-300 seconds after Step 1

### Log Events in This Step

Step 2 logs two [Log Events] with the same `Body`. Only the business event appears in the [BPM][BPMs].

|SequenceNo (sent)|Service|Direction|EndPointName|Message Type|LogText|In BPM|
|---|---|---|---|---|---|---|
|3|INT1337-RCV-Order-Entry|Receive|ERP-OrderEntry-Receive|`O2C.Forwarding/1.0`|Order Entry Received|❌ No|
|4|INT1337-ENT-Order-Entry|Send|ERP-OrderEntry-Send|`O2C.Order.Entry/1.0`|Order Entry in ERP Finished|✅ Yes|

The demo sends `SequenceNo` 1 to 14 per order. :Nodinite: keeps that value as the event's `ServiceInstanceSequenceNo` and gives the event its own [SequenceNo][JSON formatted Log Event], a running number in the [Log Database][Log Databases].

### Business Data (Happy Path)

The data of the order from Step 1, here order 1. Other orders carry their own customer, product, quantity, and total, the same in every step (see [Generate O2C Demo Data][O2C Demo Customers]):

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

## :fa-file-code: Sample XML Message

This is the raw message payload that the Log Event carries base64-encoded in its `Body` field.

```xml
<?xml version="1.0" encoding="utf-8"?>
<OrderEntry xmlns="http://schemas.Contoso.example/O2C/1.0">
  <OrderHeader>
    <OrderId>ORD-10001</OrderId>
    <OrderDate>2025-10-14T09:15:00Z</OrderDate>
    <EntryDate>2025-10-14T09:18:30Z</EntryDate>
    <OrderStatus>ENTERED</OrderStatus>
  </OrderHeader>
  <Customer>
    <CustomerId>CUST-001</CustomerId>
    <CustomerName>Contoso Corporation</CustomerName>
    <CustomerEmail>orders@Contoso.example.com</CustomerEmail>
  </Customer>
  <OrderLines>
    <OrderLine>
      <LineId>1</LineId>
      <SKU>SKU-DEMO-001</SKU>
      <Description>Demo Widget</Description>
      <Quantity>1</Quantity>
      <UnitPrice>99.95</UnitPrice>
      <LineTotal>99.95</LineTotal>
      <InventoryReserved>true</InventoryReserved>
    </OrderLine>
  </OrderLines>
  <OrderTotal>99.95</OrderTotal>
  <Currency>USD</Currency>
  <ERPReferenceNumber>ERP-2025-10001</ERPReferenceNumber>
</OrderEntry>
```

## :fa-database: Nodinite Log Event (JSON formatted)

This step creates a Log Event that the demo sends to the :Nodinite: [Log API][]. See [Log Event Reference][] for the O2C Log Event structure, and [JSON formatted Log Event][] for every field.

### Context Properties (Business Data)

The [Context Options][] carry the business data and the [Repository Binding][]:

```json
{
  "FileName": "ORD-10001-order-entry-in-erp-finished.xml",
  "OrderNumber": "ORD-10001",
  "CustomerId": "CUST-001",
  "CustomerName": "Contoso Corporation",
  "OrderAmount": "99.95",
  "ExtendedProperties/1.0#RepositoryBinding": "..."
}
```

The ERP reference number (`ERP-2025-10001`) stays in the message body, not in the Context.

## :fa-file-lines: View the Message in Nodinite

With the demo [Stylesheet][O2C Stylesheet] installed, users read this XML message as an ERP order document. In the BPM Viewer, or a [Log View][O2C Log Views], open **Action** on the *Order Entry in ERP Finished* event and choose **View message formatted as 'O2C - View Order Entry'**.

![Order Entry ORD-10005 for Tailspin Toys rendered by the O2C - View Order Entry Stylesheet (7.13)][2]  
*The message rendered by the XSLT [Stylesheet][O2C Stylesheet]: ERP reference, dates, status, and the order lines with their reservation.*  

## :fa-lightbulb: Key Points for Step 2

1. **XML Format**: Demonstrates a structured data format for ERP integration (vs JSON in Step 1)
2. **Planning Domain Transition**: First entry into the Planning domain (Index 1, Step 1; the business event is sent with SequenceNo 4)
3. **External Service Relation**: The Receive event (`INT1337-RCV-Order-Entry`) has an `ExternalServiceRelations` entry back to the Step 1 Send Service (`INT1337-SND-Order-Incoming`, Portal), showing the data dependency
4. **Internal Service Relation**: The Send event (`INT1337-ENT-Order-Entry`) has an `InternalServiceRelations` entry to the Receive Service of the same step
5. **ERP Processing**: The script gives Send events a random ProcessingTime of 40-300 ms and Receive events 5-50 ms
6. **Send Direction**: Data flows outward from the ERP (`EndPointDirection: 1`, `EventDirection: 18`)
7. **Cross-System Connection**: First service relation connecting the Portal (Step 1) to the ERP (Step 2)

## :fa-hand-point-right: Next Steps

* :fa-palette: [Order Entry Stylesheet][O2C Stylesheet] — Render this message as an ERP order document  
* :fa-arrow-right: [3. Order Confirmation Delivered to Customer][] — Continue to Step 3  

## :fa-link-horizontal: Related Topics

* :fa-arrow-left: [1. Order Received from Customer][] — Previous step  
* :fa-house: [Order-to-Cash Process Demo][] — Overview of the complete 7-step demo process  
* :fa-file-code: [Log Event Reference][] — The O2C Log Event structure  
* :fa-sitemap: [Repository Binding][]  

[1]:{ndm}/Documentation%20Pictures/IM/WebClient/Repository/BPMs/O2C/O2C_Step2_OrderEntry.gif
[2]:{ndm}/Documentation%20Pictures/IM/WebClient/Repository/BPMs/O2C/O2C_Stylesheet_2-Order-Entry.png

[1. Order Received from Customer]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/1-Order-Received.md
[3. Order Confirmation Delivered to Customer]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/3-Order-Confirmation.md
[BPMs]:{ndr}/Repository%20Model/BPMs/Overview.md
[Context Options]:{ndr}/Core%20Services/Log%20Event/Features/Context%20Options.md
[Domains]:{ndr}/Repository%20Model/Domains/Overview.md
[JSON formatted Log Event]:{ndr}/Core%20Services/Log%20Event/Features/JSON%20Log%20Event.md
[Log API]:{ndr}/Core%20Services/Log%20API/Overview.md
[Log Databases]:{ndr}/Administration/5.%20Settings/2.%20Log%20Databases/Overview.md
[Log Event Reference]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/O2C-Log-Event-Structure.md#log-event-reference
[Log Events]:{ndr}/Core%20Services/Log%20Event/Overview.md
[Message Types]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[O2C Demo Customers]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Generate-O2C-Demo-Data.md#fa-users-customers-products-and-grouping
[O2C Log Views]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/What%20is%20a%20Log%20View.md
[O2C Stylesheet]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Stylesheets/2-Order-Entry.md
[Order-to-Cash Process Demo]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Overview.md
[Repository Binding]:{ndr}/Core%20Services/Log%20Event/Features/Repository%20Binding.md
[Search log events from a BPM]:{ndr}/Getting%20Started/4.%20Repository/BPMs/Search%20log%20events%20from%20a%20BPM.md
[Services]:{ndr}/Repository%20Model/Services/Overview.md
[Systems]:{ndr}/Repository%20Model/Systems/Overview.md