---
title: Order Received Stylesheet - Liquid Template Example
description: Render Order Received JSON messages from the Nodinite Order-to-Cash demo as a business-friendly Order Report with a Liquid Stylesheet. Available from Log Views and BPM Log Search (7.11).
---

# Order Received Stylesheet

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

![Log View Contoso: Orders searched for ORD-10005, the Order Received event opened with Action and View message formatted as O2C - View Order, ending on the Order Report, animated walkthrough (7.12)][1]  
*Animated walkthrough: search a [Log View][Log Views] for the order, open **Action** on the Order Received event, and choose **View message formatted as 'O2C - View Order'**.*  

**Render JSON order data into formatted, business-friendly reports.** With <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Stylesheets][], operators and business users read an order as a document instead of raw JSON, without external tools. On this page, you will:

* ✅ Transform raw JSON order messages into a formatted Order Report  
* ✅ Display the order header, customer, ship-to address, and line items with a total, with Bootstrap styling and a barcode  
* ✅ Open the same Order Report from [Log Views][] and from [BPM Log Search][Search log events from a BPM] <sup><span class="nodinite-new-badge">New 7.11</span></sup>  

## <i class="fal fa-diagram-project" aria-hidden="true"></i> Understanding the Order Received Stylesheet

A [Stylesheet][Stylesheets] is tied to a [Message Type][Message Types]. Every Order Received [Log Event][JSON formatted Log Event] in the demo carries the same Message Type, so <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> offers the **O2C - View Order** Stylesheet for each of them. Because the Stylesheet has **Message Body is Json** checked, <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> parses the JSON body and hands its properties to the Liquid template as variables.

<div class="mermaid">
graph LR
    A["fa:fa-inbox Order Received<br/>Log Event (JSON)"] --> B{"fa:fa-tags Message Type"}
    B --> C["fa:fa-file-code O2C - View Order<br/>(Liquid, Message Body is Json)"]
    C --> D["fa:fa-file-alt Order Report"]
    D --> E1["fa:fa-search Log Views"]
    D --> E2["fa:fa-sitemap BPM Log Search (7.11)"]
    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 Received [Log Event][] (blue) is matched to its Message Type (purple); the Liquid Stylesheet (teal) renders the Order Report (green), which users open from a Log View or from [BPM Log Search][Search log events from a BPM] (blue).*

### <i class="fal fa-puzzle-piece" aria-hidden="true"></i> Where Users Open the Order Report

|Where|How|
|---|---|
|[Log Views][]|Search the Log View, open **Action** on the Order Received event, and choose **View message formatted as 'O2C - View Order'**.|
|[Log Search][Search log events from a BPM] on a BPM <sup><span class="nodinite-new-badge">New 7.11</span></sup>|Click **Log Search** on the Order-to-Cash [BPM][], search for the order number, and open **Action** on the Order Received event in the BPM Viewer. The same option appears there.|

Users only see the Order Report for events in Log Views their role can use; BPM Log Search searches in those same Log Views. The dialog is titled **View message body formatted as 'O2C - View Order'** and has the buttons **Open in New Window**, **Print**, and **Close**.

![Order ORD-10005 for Tailspin Toys in Stockholm rendered as an Order Report by the O2C - View Order Stylesheet, with the Order Date, the Ship to address, the order lines, and the Total row (7.12)][2]  
*The Order Received JSON message rendered as an Order Report: order header with barcode, customer, ship-to address, and order lines with the total. The order lines vary per demo run. Amounts print as the plain number from the message, such as 199.9; see [Amounts with two decimals](#fa-coins-amounts-with-two-decimals). The **Order Date** prints as ISO `yyyy-MM-dd HH:mm:ss`, whatever the culture of the server.*  

### <i class="fal fa-gear" aria-hidden="true"></i> Stylesheet Settings

|Setting|Value|Why|
|---|---|---|
|Type|Liquid|The Order Received body is JSON|
|Message Body is Json|**Checked**|Exposes `orderId`, `customer.name`, `shipTo`, `orderRows`, and the other properties directly as Liquid variables|
|Message Types|`O2C.Order.Received/1.0` and `O2C.Forwarding/1.0`|Associates the Stylesheet with every Order Received Log Event, and with the forwarding event of the same step, *Order Forwarded to ERP*, which carries the same JSON. Every step's forwarding event logs `O2C.Forwarding/1.0`, so the Stylesheet is offered on all of them, but it renders an empty Order Report on every forwarding event except Step 1's.|

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p><strong>Message Body is Json</strong> is a setting on the Stylesheet, not on the Log View. With it unchecked, the variables are empty and the Order Report shows blank fields.</p></div>
</aside>

## <i class="fal fa-file-code" aria-hidden="true"></i> Input JSON

The Order Received body of order 1 as logged by the [demo data script][Generate-Demo]. `generatedAt` and `orderDate` are set to the day of the run at 06:00 UTC. Other orders carry another customer, ship-to address, product, quantity, and total ([the six demo customers][Demo Customers]).

```json
{
  "batchId": "batch-2025-10-14-001",
  "generatedAt": "2026-11-07T06:00:00.0000000Z",
  "orderId": "ORD-10001",
  "customer": {
    "customerId": "CUST-001",
    "name": "Contoso Corporation",
    "email": "orders@Contoso.example.com"
  },
  "shipTo": {
    "street": "100 Commerce Drive, Suite 100",
    "city": "Springfield",
    "region": "IL",
    "zip": "62701",
    "country": "US"
  },
  "orderDate": "2026-11-07T06:00:00.0000000Z",
  "orderRows": [
    {
      "rowId": 1,
      "sku": "SKU-DEMO-001",
      "description": "Demo Widget",
      "quantity": 1,
      "unitPrice": 99.95,
      "lineTotal": 99.95
    }
  ],
  "orderTotal": 99.95,
  "currency": "USD"
}
```

The property order varies between runs, because the script serializes a PowerShell hashtable; the Liquid template reads properties by name, so the order doesn't matter.

### <i class="fal fa-table" aria-hidden="true"></i> JSON to Order Report Mapping

|JSON property|Liquid variable|Shown in the Order Report as|
|---|---|---|
|`orderId`|`{{ orderId }}`|**Order ID** in the title and the header, and as a Code 39 barcode in **OCR**|
|`customer.name`, `customer.customerId`, `customer.email`|`{{ customer.name }}` …|**Customer**, with a mailto link|
|`shipTo.street`, `shipTo.zip`, `shipTo.city`, `shipTo.region`, `shipTo.country`|`{{ shipTo.city }}` …|**Ship to**, as an address block|
|`orderDate`|`{{ orderDate }}`|**Order Date**|
|`orderRows`|`{{ orderRows \| size }}`|**Rows** (number of order lines)|
|`orderTotal`, `currency`|`{{ orderTotal }}`, `{{ currency }}`|**Amount**, and the **Total** row under the order lines|
|`batchId`|`{{ batchId }}`|**Batch ID** in the footer|
|`orderRows[]`|`{% for row in orderRows %}`|**Order Lines** table: Line, SKU, Description, Qty, Unit Price, Line Total|

`generatedAt` is not displayed. An order logged before the `shipTo` object was added shows no **Ship to** block: the template skips it when `shipTo` is missing.

## <i class="fal fa-code" aria-hidden="true"></i> Liquid Template

The template uses Bootstrap 4 for the layout and the Libre Barcode 39 Text font for the barcode.

```liquid
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous" />
<link href="https://fonts.googleapis.com/css2?family=Libre+Barcode+39+Text&display=swap" rel="stylesheet">
<style>
  .barcode {
    font-family: 'Libre Barcode 39 Text', cursive;
    font-size: 22px;
  }
</style>

<div class="container mt-4">
  <div class="row align-items-center mb-3">
    <div class="col">
      <h1 class="mb-0">Order {{ orderId }}</h1>
      <span class="text-muted">Order Report</span>
    </div>
    <div class="col text-right">
      <img src="https://download.nodinite.com/public/logogoeshere.png" style="width: 200px;" alt="Company Logo" />
    </div>
  </div>

  <table class="table">
    <thead>
      <tr>
        <th>Order ID</th>
        <th>OCR</th>
        <th>Customer</th>
        <th>Order Date</th>
        <th>Rows</th>
        <th class="text-right">Amount ({{ currency }})</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><strong>{{ orderId }}</strong></td>
        <td class="barcode">{{ orderId }}</td>
        <td>
          <strong>{{ customer.name }}</strong><br/>
          <span class="text-muted">{{ customer.customerId }}</span><br/>
          <a href="mailto:{{ customer.email }}">{{ customer.email }}</a>
        </td>
        <td>{{ orderDate }}</td>
        <td>{{ orderRows | size }}</td>
        <td class="text-right"><strong>{{ orderTotal }}</strong></td>
      </tr>
    </tbody>
  </table>

  {%- if shipTo -%}
  <div class="card mb-3" style="max-width: 22rem;">
    <div class="card-body py-2">
      <h6 class="card-subtitle mb-1 text-muted">Ship to</h6>
      <strong>{{ customer.name }}</strong><br/>
      {{ shipTo.street }}<br/>
      {{ shipTo.zip }} {{ shipTo.city }}{% if shipTo.region %}, {{ shipTo.region }}{% endif %}<br/>
      {{ shipTo.country }}
    </div>
  </div>
  {%- endif -%}

  {%- if orderRows.size > 0 -%}
  <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>
      </tr>
    </thead>
    <tbody>
      {%- for row in orderRows -%}
      <tr>
        <td>{{ row.rowId }}</td>
        <td>{{ row.sku }}</td>
        <td>{{ row.description }}</td>
        <td class="text-center">{{ row.quantity }}</td>
        <td class="text-right">{{ row.unitPrice }}</td>
        <td class="text-right">{{ row.lineTotal }}</td>
      </tr>
      {%- endfor -%}
    </tbody>
    <tfoot>
      <tr>
        <th colspan="5" class="text-right">Total ({{ currency }})</th>
        <th class="text-right">{{ orderTotal }}</th>
      </tr>
    </tfoot>
  </table>
  {%- endif -%}

  <div class="mt-5 pt-3 border-top text-center text-muted">
    <small>Batch ID: {{ batchId }} · Rendered by a Nodinite Stylesheet from the Order Received message</small>
  </div>
</div>
```

### <i class="fal fa-coins" aria-hidden="true"></i> Amounts with two decimals

`{{ orderTotal }}` prints the number as the message holds it: `1245`, not `1245.00`. The Liquid engine in <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> has no number-format filter, and `round: 2` doesn't add decimals either. To always show two decimals, use the `currency` filter with a fixed culture, and drop the currency sign if you don't want it:

```liquid
<th class="text-right">{{ orderTotal | currency: "en-US" | remove: "$" }}</th>
```

`{{ orderTotal | currency: "en-US" }}` gives `$1,245.00`; with `remove: "$"` it gives `1,245.00`. Use the same filter on `row.unitPrice` and `row.lineTotal`.

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-palette" aria-hidden="true"></i> [Order Entry Stylesheet][Next-Stylesheet] — The XML message of Step 2, rendered with XSLT  
* <i class="fal fa-palette" aria-hidden="true"></i> [View all O2C stylesheets][Overview] — Complete stylesheet reference for all demo messages  
* <i class="fal fa-play" aria-hidden="true"></i> [Generate O2C Demo Data][Generate-Demo] — Create test messages for this stylesheet  
* <i class="fal fa-sitemap" aria-hidden="true"></i> [Search log events from a BPM][] — Open the Order Report from BPM Log Search  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-file-lines" aria-hidden="true"></i> [What is a Stylesheet?][Stylesheets]  
* <i class="fal fa-file-circle-plus" aria-hidden="true"></i> [Add or manage Stylesheet][]  
* <i class="fal fa-search" aria-hidden="true"></i> [Log Views][]  
* <i class="fal fa-tags" aria-hidden="true"></i> [Message Types][]  
* <i class="fal fa-inbox" aria-hidden="true"></i> [Order Received Message Type][Order-Received-Message] — First message in the order-to-cash call chain  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Repository/BPMs/O2C/O2C_Stylesheet_ViewOrder.gif
[2]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Repository/BPMs/O2C/OrderReceived_StylesheetView.png

[Add or manage Stylesheet]:https://docs.nodinite.com/administration/customize/stylesheets/features/add-or-manage-stylesheet/
[BPM]:https://docs.nodinite.com/repository-model/bpms/overview/
[Demo Customers]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/generate-o2c-demo-data/#fa-users-customers-products-and-grouping
[Generate-Demo]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/generate-o2c-demo-data/
[JSON formatted Log Event]:https://docs.nodinite.com/core-services/log-event/features/json-log-event/
[Log Event]:https://docs.nodinite.com/core-services/log-event/overview/
[Log Views]:https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/
[Message Types]:https://docs.nodinite.com/repository-model/message-types/overview/
[Next-Stylesheet]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/stylesheets/2-order-entry/
[Order-Received-Message]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/1-order-received/
[Overview]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/stylesheets/overview/
[Search log events from a BPM]:https://docs.nodinite.com/getting-started/repository/bpms/search-log-events-from-a-bpm/
[Stylesheets]:https://docs.nodinite.com/administration/customize/stylesheets/features/what-is-a-stylesheet/