---
title: Order Entry Stylesheet - XSLT Template Example
description: Render the XML Order Entry messages of the Nodinite Order-to-Cash demo as a readable ERP order document with the XSLT Stylesheet O2C - View Order Entry, from Log Views and BPM Log Search (7.12).
---

# Order Entry Stylesheet

> This page provides the **XSLT** [Stylesheet][Stylesheets] **O2C - View Order Entry** for the **Order Entry** messages (Step 2) in the [Order-to-Cash demo][Generate-Demo].

![O2C BPM Viewer with order ORD-10005 for Tailspin Toys, Action on the Order Entry in ERP Finished event and View message formatted as O2C - View Order Entry, ending on the Order Entry document ERP-2025-10005, animated walkthrough (7.12)][1]  
*Animated walkthrough: in the BPM Viewer of [BPM Log Search][Search log events from a BPM], open **Action** on the *Order Entry in ERP Finished* event of order `ORD-10005` and choose **View message formatted as 'O2C - View Order Entry'**.*  

**Read the ERP's XML order as a document, not as markup.** With :Nodinite: [Stylesheets][], operators see what the ERP registered without reading namespaced XML. On this page, you will:

* ✅ Transform the XML Order Entry message into an ERP order document with XSLT  
* ✅ Show the ERP reference, the order and entry dates, the status, and the order lines with a Reserved column  
* ✅ Open the document from [Log Views][] and from [BPM Log Search][Search log events from a BPM] :new7.11:  

## :fa-diagram-project: Understanding the Order Entry Stylesheet

A [Stylesheet][Stylesheets] is tied to a [Message Type][Message Types]. The business [Log Event][] of Step 2, *Order Entry in ERP Finished*, carries the Message Type `O2C.Order.Entry/1.0`, so :Nodinite: offers **O2C - View Order Entry** for it. XSLT reads the XML body directly; the namespace `http://schemas.Contoso.example/O2C/1.0` is bound to the prefix `o` in the template.

<div class="mermaid">
graph LR
    A["fa:fa-inbox Order Entry<br/>Log Event (XML)"] --> B{"fa:fa-tags Message Type<br/>O2C.Order.Entry/1.0"}
    B --> C["fa:fa-file-code O2C - View Order Entry<br/>(XSLT)"]
    C --> D["fa:fa-file-alt Order Entry document"]
    D --> E1["fa:fa-search Log Views"]
    D --> E2["fa:fa-sitemap BPM Log Search"]
    style A fill:#2678BD
    style B fill:#9E59BB
    style C fill:#3F827B
    style D fill:#93d16d
    style E1 fill:#2678BD
    style E2 fill:#2678BD
</div>

*The Order Entry [Log Event][] (blue) is matched to its [Message Type][Message Types] (purple); the XSLT [Stylesheet][Stylesheets] (teal) renders the document (green), which users open from a [Log View][Log Views] or from [BPM Log Search][Search log events from a BPM] (blue).*

### :fa-puzzle-piece: Where Users Open the Order Entry Document

|Where|How|
|---|---|
|[Log Views][]|Search the Log View, open **Action** on the *Order Entry in ERP Finished* event, and choose **View message formatted as 'O2C - View Order Entry'**.|
|[Log Search][Search log events from a BPM] on a BPM :new7.11:|Click **Log Search** on the Order-to-Cash [BPM][], search for the order number, and open **Action** on the Order Entry event in the BPM Viewer.|

The dialog is titled **View message body formatted as 'O2C - View Order Entry'** and has the buttons **Open in New Window**, **Print**, and **Close**. The forwarding event of the step, *Order Entry Received*, logs `O2C.Forwarding/1.0`, so this Stylesheet isn't offered there.

![Order Entry ORD-10005 for Tailspin Toys rendered by the O2C - View Order Entry Stylesheet, with the ERP reference, the dates, the status ENTERED, and one reserved order line (7.13)][2]  
*The XML Order Entry message rendered as an ERP order document: ERP reference, order and entry dates, status, and the order lines with their inventory reservation and the total.*  

### :fa-gear: Stylesheet Settings

|Setting|Value|Why|
|---|---|---|
|Name|`O2C - View Order Entry`|The name users pick in the **Action** menu|
|Type|XSLT|The Order Entry body is XML|
|Render as HTML|**Checked**|The template outputs an HTML page|
|Message Body is Json|Not shown|The checkbox only appears for Liquid; XSLT always reads the body as XML|
|Message Types|`O2C.Order.Entry/1.0`|Only the Step 2 business event gets the Stylesheet|

## :fa-file-code: Input XML

The Order Entry body of order 1 as logged by the [demo data script][Generate-Demo], the same message as on the [Step 2 page][Order-Entry-Message]. Other orders carry another customer, product, quantity, and total ([the six demo customers][Demo Customers]).

```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-table: XML to Document Mapping

|XML element (prefix `o`)|Shown in the document as|
|---|---|
|`o:OrderHeader/o:OrderId`|The title, and **Order ID**|
|`o:ERPReferenceNumber`|*Registered in the ERP as* under the title|
|`o:Customer/o:CustomerName`, `o:Customer/o:CustomerId`|**Customer**|
|`o:OrderHeader/o:OrderDate`, `o:OrderHeader/o:EntryDate`|**Order Date**, **Entry Date**|
|`o:OrderHeader/o:OrderStatus`|**Status**, as a badge|
|`o:OrderLines/o:OrderLine`|**Order Lines** table: Line, SKU, Description, Qty, Unit Price, Line Total|
|`o:InventoryReserved`|**Reserved**: *Yes* for `true`, otherwise *No*|
|`o:OrderTotal`, `o:Currency`|The **Total** row|

XML values show exactly as the message holds them: dates stay `2025-10-14T09:15:00Z`, and amounts keep their two decimals. `CustomerEmail` is not displayed.

## :fa-code: XSLT Template

The template uses Bootstrap 4 for the layout. `exclude-result-prefixes="o"` keeps the namespace out of the HTML output.

```xml
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:o="http://schemas.Contoso.example/O2C/1.0" exclude-result-prefixes="o">
  <xsl:output method="html" indent="yes"/>
  <xsl:template match="/o:OrderEntry">
    <html>
      <head>
        <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/>
      </head>
      <body>
        <div class="container mt-4">
          <h1 class="mb-0">Order Entry <xsl:value-of select="o:OrderHeader/o:OrderId"/></h1>
          <span class="text-muted">Registered in the ERP as <strong><xsl:value-of select="o:ERPReferenceNumber"/></strong></span>
          <table class="table mt-3">
            <thead>
              <tr><th>Order ID</th><th>Customer</th><th>Order Date</th><th>Entry Date</th><th>Status</th></tr>
            </thead>
            <tbody>
              <tr>
                <td><strong><xsl:value-of select="o:OrderHeader/o:OrderId"/></strong></td>
                <td><strong><xsl:value-of select="o:Customer/o:CustomerName"/></strong><br/><span class="text-muted"><xsl:value-of select="o:Customer/o:CustomerId"/></span></td>
                <td><xsl:value-of select="o:OrderHeader/o:OrderDate"/></td>
                <td><xsl:value-of select="o:OrderHeader/o:EntryDate"/></td>
                <td><span class="badge badge-success"><xsl:value-of select="o:OrderHeader/o:OrderStatus"/></span></td>
              </tr>
            </tbody>
          </table>
          <h5 class="mt-4">Order Lines</h5>
          <table class="table table-sm">
            <thead>
              <tr><th>Line</th><th>SKU</th><th>Description</th><th class="text-center">Qty</th><th class="text-right">Unit Price</th><th class="text-right">Line Total</th><th class="text-center">Reserved</th></tr>
            </thead>
            <tbody>
              <xsl:for-each select="o:OrderLines/o:OrderLine">
                <tr>
                  <td><xsl:value-of select="o:LineId"/></td>
                  <td><xsl:value-of select="o:SKU"/></td>
                  <td><xsl:value-of select="o:Description"/></td>
                  <td class="text-center"><xsl:value-of select="o:Quantity"/></td>
                  <td class="text-right"><xsl:value-of select="o:UnitPrice"/></td>
                  <td class="text-right"><xsl:value-of select="o:LineTotal"/></td>
                  <td class="text-center"><xsl:choose><xsl:when test="o:InventoryReserved = 'true'">Yes</xsl:when><xsl:otherwise>No</xsl:otherwise></xsl:choose></td>
                </tr>
              </xsl:for-each>
            </tbody>
            <tfoot>
              <tr><th colspan="5" class="text-right">Total (<xsl:value-of select="o:Currency"/>)</th><th class="text-right"><xsl:value-of select="o:OrderTotal"/></th><th></th></tr>
            </tfoot>
          </table>
          <div class="mt-5 pt-3 border-top text-center text-muted"><small>Rendered by a Nodinite Stylesheet (XSLT) from the Order Entry message</small></div>
        </div>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>
```

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

* :fa-palette: [Order Confirmation Stylesheet][Next-Stylesheet] — The CSV message of Step 3, rendered with Liquid  
* :fa-palette: [View all O2C stylesheets][Overview] — Every demo Stylesheet and its settings  
* :fa-play: [Generate O2C Demo Data][Generate-Demo] — Create test messages for this Stylesheet  

## :fa-link-horizontal: Related Topics

* :fa-arrow-left: [Order Received Stylesheet][Previous-Stylesheet]  
* :fa-server: [2. Order Entry in ERP Finished][Order-Entry-Message] — The step this message belongs to  
* :fa-file-lines: [What is a Stylesheet?][Stylesheets]  
* :fa-file-circle-plus: [Add or manage Stylesheet][]  
* :fa-tags: [Message Types][]  

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

[Add or manage Stylesheet]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Features/Add%20or%20manage%20Stylesheet.md
[BPM]:{ndr}/Repository%20Model/BPMs/Overview.md
[Demo Customers]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Generate-O2C-Demo-Data.md#fa-users-customers-products-and-grouping
[Generate-Demo]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Generate-O2C-Demo-Data.md
[Log Event]:{ndr}/Core%20Services/Log%20Event/Overview.md
[Log Views]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/What%20is%20a%20Log%20View.md
[Message Types]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[Next-Stylesheet]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Stylesheets/3-Order-Confirmation.md
[Order-Entry-Message]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/2-Order-Entry.md
[Overview]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Stylesheets/Overview.md
[Previous-Stylesheet]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Stylesheets/1-Order-Received.md
[Search log events from a BPM]:{ndr}/Getting%20Started/4.%20Repository/BPMs/Search%20log%20events%20from%20a%20BPM.md
[Stylesheets]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Features/What%20is%20a%20Stylesheet.md