O2C Demo: Data Generation
Section titled “ O2C Demo: Data Generation”This page is part of the Order-to-Cash demo. 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.

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 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.
Demo Data
Section titled “ Demo Data”The demo uses realistic, fictitious sample data:
- Order IDs:
ORD-10001throughORD-10100(100 interchanges) - Customers: six, in Springfield, Seattle, Stockholm, and Gothenburg; order 1 is always
CUST-001Contoso 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.
Happy Path Assumption
Section titled “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
0for success, except the last Send event of an incomplete order, which receives-1337)
Demo Execution Strategy
Section titled “ Demo Execution Strategy”Data Generation
Section titled “Data Generation”A PowerShell script generates 100 order interchanges with:
- Deterministic Happy Path: Each order starts at Step 0 (Order Received)
- 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
- Incremental Order Numbers: Starting from
ORD-10001, incrementing by 1 - 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
- 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 keeps0 - Paired Events: Each step generates 2 events (Receive + Send) for a complete audit trail
- SequenceNo: Starts at 1 (not 0) for easier progress tracking, and ranges from 1-14 for complete orders
PowerShell Data Generation Script
Section titled “ PowerShell Data Generation Script”A PowerShell script automates the creation of 100 realistic orders:
- Script: Generate O2C Demo Data Script
- Usage guide: 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 Nodinite
- 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
- SequenceNo starts at 1 (not 0) for easier tracking
Data Generation Options
Section titled “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
- 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
Next Steps
Section titled “ Next Steps”- Generate O2C Demo Data - Run the script
- O2C Demo: Follow One Order - See the result in Nodinite
- O2C Demo: Log Event Structure - What each generated event holds