---
title: "O2C Demo: Demo Data and How the Script Generates It | Nodinite"
description: "How the Nodinite Order-to-Cash demo data is generated: the sample orders, customers, and products, the happy-path assumption, how the PowerShell script decides which steps each order completes, its timing, and the DryRun and ExportToFile options."
---

# <i class="fal fa-terminal" aria-hidden="true"></i> O2C Demo: Data Generation

This page is part of the [Order-to-Cash demo][O2C Overview]. It describes the sample data and the strategy the PowerShell script follows to turn it into [Log Events][]. To run the script, follow [Generate O2C Demo Data][Generate-O2C-Demo-Data].

![PowerShell 7 exporting 10 orders to the file O2C-10.json, a loop posting the file's 126 Log Events, then the Log View Contoso: Orders searched Today with the new orders, the first row ORD-10010's last step in red with Log Status -1337, animated walkthrough (7.12)][1]  
*Animated walkthrough: generate 10 orders with `-ExportToFile`, post the exported events to the [Log API][] in a loop (the script itself never calls it), and search the **Contoso: Orders** [Log View][Log Views] with **Today**. The orders are dated from 06:00 UTC today, and the red row is the last Send event of an incomplete order, with Log Status `-1337`.*  

## <i class="fal fa-database" aria-hidden="true"></i> Demo Data

The demo uses realistic, fictitious sample data:

* **Order IDs**: `ORD-10001` through `ORD-10100` (100 interchanges)
* **Customers**: six, in Springfield, Seattle, Stockholm, and Gothenburg; order 1 is always `CUST-001` *Contoso Corporation*
* **Products**: three SKUs, quantity 1 to 5, in `USD`

The tables, and how to group the orders by Country, City, ZIP, and Customer, are in [Generate O2C Demo Data][Generate-O2C-Demo-Data].

### Happy Path Assumption

Within one order, the data stays consistent across [Message Types][]:

* The customer, product, quantity, and total are the same in every step
* No error states or retry scenarios (all Log Statuses are `0` for success, except the last Send event of an incomplete order, which receives `-1337`)

## <i class="fal fa-gears" aria-hidden="true"></i> Demo Execution Strategy

### Data Generation

A **PowerShell script** generates 100 order interchanges with:

1. **Deterministic Happy Path**: Each order starts at Step 0 (Order Received)
2. **Random Step Completion**: Not all orders complete all 7 steps
   * Probability of progressing to the next step: 90% per milestone
   * The first order always completes all 7 steps, and every other order completes at least 2 steps
   * This simulates realistic business scenarios where some orders get stuck or are cancelled
3. **Incremental Order Numbers**: Starting from `ORD-10001`, incrementing by 1
4. **Random DateTime Increments**: The first order starts at 06:00 UTC on the day you run the script, so a run before 06:00 UTC creates events dated later than now (search them with **Today**). Each step's Receive event comes 30-300 seconds after the previous event, its Send event 1-4 seconds later, and the next order starts 2-10 minutes after the previous one ends
5. **Incomplete Order Handling**: The last Send event of an incomplete order receives Log Status code `-1337` (custom error code for this demo); its Receive event keeps `0`
6. **Paired Events**: Each step generates 2 events (Receive + Send) for a complete audit trail
7. **SequenceNo**: Starts at 1 (not 0) for easier progress tracking, and ranges from 1-14 for complete orders

## <i class="fal fa-terminal" aria-hidden="true"></i> PowerShell Data Generation Script

A PowerShell script automates the creation of 100 realistic orders:

* **Script**: [Generate O2C Demo Data Script][Generate-O2C-Demo-Data-Script]
* **Usage guide**: [Generate O2C Demo Data][Generate-O2C-Demo-Data]
* **Generates**: ~1,070 Log Events (100 orders × ~10.7 events average per order; every run differs)
  * Complete orders (all 7 steps): ~54 orders × 14 events = ~756 events
  * Partial orders (2-6 steps): ~46 orders × variable events = ~314 events
* **Features**:
  * Probabilistic step completion (90% progression rate)
  * Incremental order numbers (ORD-10001 through ORD-10100)
  * Random timestamp increments (30-300 seconds between steps, 1-4 seconds between a step's Receive and Send events)
  * Multi-format payloads (JSON, XML, CSV, PSV), to demonstrate the format-agnostic logging in <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>
  * Context Properties for business analytics
  * Varied customers and products, consistent within each order
  * Paired Receive→Send events for each milestone, including separate Log Events for the [forwarding Services][O2C Forwarder Services]
  * SequenceNo starts at 1 (not 0) for easier tracking

### Data Generation Options

* **DryRun mode**: Previews the first 14 Log Events, which is the first order (it always completes all 7 steps)
* **ExportToFile**: Saves to a JSON file (no API calls)
* **Posting**: The script never calls the Log API; post the exported file with the loop in [Post the Exported Events to the Log API][Post Exported Events]
* **PowerShell 7**: The script needs `pwsh`; Windows PowerShell 5.1 and PowerShell ISE can't run it
* **Randomness**: The script sets no random seed, so every run produces a different mix of complete and incomplete orders

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

* <i class="fal fa-terminal" aria-hidden="true"></i> [Generate O2C Demo Data][Generate-O2C-Demo-Data] - Run the script  
* <i class="fal fa-eye" aria-hidden="true"></i> [O2C Demo: Follow One Order][O2C Follow One Order] - See the result in <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>  
* <i class="fal fa-file-code" aria-hidden="true"></i> [O2C Demo: Log Event Structure][O2C Log Event Structure] - What each generated event holds  

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

* <i class="fal fa-house" aria-hidden="true"></i> [Order-to-Cash Demo Overview][O2C Overview]  
* <i class="fal fa-code" aria-hidden="true"></i> [Generate O2C Demo Data Script][Generate-O2C-Demo-Data-Script]  
* <i class="fal fa-diagram-project" aria-hidden="true"></i> [O2C Demo: Process Steps, Systems, and Services][O2C Process]  

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

[Generate-O2C-Demo-Data]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/generate-o2c-demo-data/
[Generate-O2C-Demo-Data-Script]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/generate-o2c-demo-data-script/
[Log API]:https://docs.nodinite.com/core-services/log-api/overview/
[Log Events]: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/
[O2C Follow One Order]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/o2c-follow-one-order/
[O2C Forwarder Services]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/o2c-process-and-services/#forwarder-services
[O2C Log Event Structure]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/o2c-log-event-structure/
[O2C Overview]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/overview/
[O2C Process]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/o2c-process-and-services/
[Post Exported Events]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/generate-o2c-demo-data/#post-the-exported-events-to-the-log-api