---
title: Order Planned Stylesheet - Liquid Template Example
description: Render the JSON Order Scheduled messages of the Nodinite Order-to-Cash demo as a production schedule with the Liquid Stylesheet O2C - View Order Planned, from Log Views and BPM Log Search (7.12).
---

# Order Planned Stylesheet

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

![O2C BPM Viewer with order ORD-10005 for Tailspin Toys, Action on the Production Scheduled in ERP event and View message formatted as O2C - View Order Planned, ending on the Production Schedule SCH-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 *Production Scheduled in ERP* event of order `ORD-10005` and choose **View message formatted as 'O2C - View Order Planned'**.*  

**Show planners the schedule, not the JSON.** With <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Stylesheets][], the planning message reads as a production schedule with its lines and materials. On this page, you will:

* ✅ Transform the JSON Order Scheduled message into a production schedule with Liquid  
* ✅ Loop over the production lines and the materials of the order  
* ✅ Open the schedule 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 Planned Stylesheet

A [Stylesheet][Stylesheets] is tied to a [Message Type][Message Types]. The business [Log Event][] of Step 4, *Production Scheduled in ERP*, carries the Message Type `O2C.Order.Scheduled/1.0`, so <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> offers **O2C - View Order Planned** for it. With **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 template as variables, such as `scheduleId` and `productionLines`.

<div class="mermaid">
graph LR
    A["fa:fa-inbox Order Planned<br/>Log Event (JSON)"] --> B{"fa:fa-tags Message Type<br/>O2C.Order.Scheduled/1.0"}
    B --> C["fa:fa-file-code O2C - View Order Planned<br/>(Liquid, Message Body is Json)"]
    C --> D["fa:fa-file-alt Production schedule"]
    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 Planned [Log Event][] (blue) is matched to its [Message Type][Message Types] (purple); the Liquid [Stylesheet][Stylesheets] (teal) renders the schedule (green), which users open from a [Log View][Log Views] 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 Production Schedule

|Where|How|
|---|---|
|[Log Views][]|Search the Log View, open **Action** on the *Production Scheduled in ERP* event, and choose **View message formatted as 'O2C - View Order Planned'**.|
|[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 Production Scheduled event in the BPM Viewer.|

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

![Production Schedule SCH-2025-10005 for order ORD-10005 and Tailspin Toys rendered by the O2C - View Order Planned Stylesheet, with priority HIGH, one production line, one material, and the order amount (7.13)][2]  
*The JSON Order Scheduled message rendered as a production schedule: priority, ready-by date, the production lines with their shift and duration, and the materials.*  

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

|Setting|Value|Why|
|---|---|---|
|Name|`O2C - View Order Planned`|The name users pick in the **Action** menu|
|Type|Liquid|The Order Scheduled body is JSON|
|Render as HTML|**Checked**|The template outputs HTML|
|Message Body is Json|**Checked**|Exposes `scheduleId`, `productionLines`, `materials`, and the other properties as Liquid variables|
|Message Types|`O2C.Order.Scheduled/1.0`|Only the Step 4 business event gets the Stylesheet|

<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>With <strong>Message Body is Json</strong> unchecked, the template still renders, but every field is empty: the JSON stays one string in <code>data</code>.</p></div>
</aside>

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

The Order Scheduled body of order 1 as logged by the [demo data script][Generate-Demo], the same message as on the [Step 4 page][Order-Planned-Message]. Orders of 500 USD or more get the priority `HIGH`.

```json
{
  "scheduleId": "SCH-2025-10001",
  "orderId": "ORD-10001",
  "customerId": "CUST-001",
  "customerName": "Contoso Corporation",
  "orderDate": "2025-10-14T09:15:00Z",
  "scheduleDate": "2025-10-14T09:37:45Z",
  "productionLines": [
    {
      "lineId": "LINE-01",
      "lineName": "Assembly Line A",
      "scheduledStart": "2025-10-16T06:00:00Z",
      "scheduledEnd": "2025-10-16T14:30:00Z",
      "expectedDuration": 510,
      "shift": "DAY",
      "capacity": 50
    }
  ],
  "materials": [
    {
      "materialId": "MAT-SKU-DEMO-001",
      "sku": "SKU-DEMO-001",
      "description": "Demo Widget",
      "quantityRequired": 1,
      "quantityAllocated": 1,
      "availableAtScheduleTime": true
    }
  ],
  "orderQuantity": 1,
  "orderAmount": 99.95,
  "currency": "USD",
  "priorityLevel": "NORMAL",
  "schedulingStatus": "CONFIRMED",
  "estimatedCompletionDate": "2025-10-16T14:30:00Z"
}
```

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

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

|JSON property|Shown in the schedule as|
|---|---|
|`scheduleId`, `orderId`|The title, *Planned for order*, and **Order ID**|
|`customerName`, `customerId`|**Customer**|
|`orderQuantity`, `priorityLevel`|**Quantity**, **Priority**|
|`estimatedCompletionDate`|**Ready by**|
|`schedulingStatus`|**Status**, as a badge|
|`productionLines[]`|**Production Lines** table: Line, Name, Shift, Start, End, Minutes (`expectedDuration`)|
|`materials[]`|**Materials** table: Material, SKU, Description, Required, Allocated, In stock (*Yes* when `availableAtScheduleTime` is true)|
|`orderAmount`, `currency`|*Order amount*|

The JSON parser normalizes dates and numbers before Liquid sees them: `2025-10-16T14:30:00Z` shows as `2025-10-16 14:30:00`, and `1245.0` shows as `1245`. To print amounts with two decimals, see [Amounts with two decimals][Amounts].

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

```liquid
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" />
<div class="container mt-4">
  <h1 class="mb-0">Production Schedule {{ scheduleId }}</h1>
  <span class="text-muted">Planned for order {{ orderId }}</span>
  <table class="table mt-3">
    <thead>
      <tr><th>Order ID</th><th>Customer</th><th>Quantity</th><th>Priority</th><th>Ready by</th><th>Status</th></tr>
    </thead>
    <tbody>
      <tr>
        <td><strong>{{ orderId }}</strong></td>
        <td><strong>{{ customerName }}</strong><br/><span class="text-muted">{{ customerId }}</span></td>
        <td>{{ orderQuantity }}</td>
        <td>{{ priorityLevel }}</td>
        <td>{{ estimatedCompletionDate }}</td>
        <td><span class="badge badge-success">{{ schedulingStatus }}</span></td>
      </tr>
    </tbody>
  </table>
  <h5 class="mt-4">Production Lines</h5>
  <table class="table table-sm">
    <thead>
      <tr><th>Line</th><th>Name</th><th>Shift</th><th>Start</th><th>End</th><th class="text-right">Minutes</th></tr>
    </thead>
    <tbody>
      {%- for line in productionLines -%}
      <tr><td>{{ line.lineId }}</td><td>{{ line.lineName }}</td><td>{{ line.shift }}</td><td>{{ line.scheduledStart }}</td><td>{{ line.scheduledEnd }}</td><td class="text-right">{{ line.expectedDuration }}</td></tr>
      {%- endfor -%}
    </tbody>
  </table>
  <h5 class="mt-4">Materials</h5>
  <table class="table table-sm">
    <thead>
      <tr><th>Material</th><th>SKU</th><th>Description</th><th class="text-center">Required</th><th class="text-center">Allocated</th><th class="text-center">In stock</th></tr>
    </thead>
    <tbody>
      {%- for m in materials -%}
      <tr><td>{{ m.materialId }}</td><td>{{ m.sku }}</td><td>{{ m.description }}</td><td class="text-center">{{ m.quantityRequired }}</td><td class="text-center">{{ m.quantityAllocated }}</td><td class="text-center">{% if m.availableAtScheduleTime %}Yes{% else %}No{% endif %}</td></tr>
      {%- endfor -%}
    </tbody>
  </table>
  <p class="text-right">Order amount: <strong>{{ orderAmount }} {{ currency }}</strong></p>
  <div class="mt-5 pt-3 border-top text-center text-muted"><small>Rendered by a Nodinite Stylesheet (Liquid) from the Order Scheduled message</small></div>
</div>
```

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

* <i class="fal fa-palette" aria-hidden="true"></i> [Order Ready Stylesheet][Next-Stylesheet] — The XML packing message of Step 5  
* <i class="fal fa-palette" aria-hidden="true"></i> [View all O2C stylesheets][Overview] — Every demo Stylesheet and its settings  
* <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-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-arrow-left" aria-hidden="true"></i> [Order Confirmation Stylesheet][Previous-Stylesheet]  
* <i class="fal fa-calendar" aria-hidden="true"></i> [4. Order Planned][Order-Planned-Message] — The step this message belongs to  
* <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-tags" aria-hidden="true"></i> [Message Types][]  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Repository/BPMs/O2C/O2C_Stylesheet_4-Order-Planned_Open.gif
[2]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Repository/BPMs/O2C/O2C_Stylesheet_4-Order-Planned.png

[Add or manage Stylesheet]:https://docs.nodinite.com/administration/customize/stylesheets/features/add-or-manage-stylesheet/
[Amounts]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/stylesheets/1-order-received/#fa-coins-amounts-with-two-decimals
[BPM]:https://docs.nodinite.com/repository-model/bpms/overview/
[Generate-Demo]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/generate-o2c-demo-data/
[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/5-order-ready/
[Order-Planned-Message]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/4-order-planned/
[Overview]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/stylesheets/overview/
[Previous-Stylesheet]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/stylesheets/3-order-confirmation/
[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/