- 9 minutes to read

Order Received Stylesheet

This page provides the Liquid Stylesheet O2C - View Order for the Order Received messages (Step 1) in the Order-to-Cash 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)
Animated walkthrough: search a Log View 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 Nodinite 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 New 7.11

Understanding the Order Received Stylesheet

A Stylesheet is tied to a Message Type. Every Order Received Log Event in the demo carries the same Message Type, so Nodinite offers the O2C - View Order Stylesheet for each of them. Because the Stylesheet has Message Body is Json checked, Nodinite parses the JSON body and hands its properties to the Liquid template as variables.

graph LR A["fa:fa-inbox Order Received
Log Event (JSON)"] --> B{"fa:fa-tags Message Type"} B --> C["fa:fa-file-code O2C - View Order
(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

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 (blue).

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'.
BPM Log Search New 7.11 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)
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. The Order Date prints as ISO yyyy-MM-dd HH:mm:ss, whatever the culture of the server.

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.

Important

Message Body is Json 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.

Input JSON

The Order Received body of order 1 as logged by the demo data script. 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).

{
  "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.

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.

Liquid Template

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

<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>

Amounts with two decimals

{{ orderTotal }} prints the number as the message holds it: 1245, not 1245.00. The Liquid engine in Nodinite 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:

<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.

Next Steps