---
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 :Nodinite: [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] :new7.11:  

## :fa-diagram-project: 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 :Nodinite: offers **O2C - View Order Planned** for it. With **Message Body is Json** checked, :Nodinite: 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).*

### :fa-puzzle-piece: 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 :new7.11:|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.*  

### :fa-gear: 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|

>[!IMPORTANT]
>With **Message Body is Json** unchecked, the template still renders, but every field is empty: the JSON stays one string in `data`.

## :fa-file-code: 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.

### :fa-table: 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].

## :fa-code: 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>
```

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

* :fa-palette: [Order Ready Stylesheet][Next-Stylesheet] — The XML packing message of Step 5  
* :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 Confirmation Stylesheet][Previous-Stylesheet]  
* :fa-calendar: [4. Order Planned][Order-Planned-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_4-Order-Planned_Open.gif
[2]:{ndm}/Documentation%20Pictures/IM/WebClient/Repository/BPMs/O2C/O2C_Stylesheet_4-Order-Planned.png

[Add or manage Stylesheet]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Features/Add%20or%20manage%20Stylesheet.md
[Amounts]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Stylesheets/1-Order-Received.md#fa-coins-amounts-with-two-decimals
[BPM]:{ndr}/Repository%20Model/BPMs/Overview.md
[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/5-Order-Ready.md
[Order-Planned-Message]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/4-Order-Planned.md
[Overview]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Stylesheets/Overview.md
[Previous-Stylesheet]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Stylesheets/3-Order-Confirmation.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