- 3 minutes to read
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.
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
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
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. Each step's Receive event comes 30-300 seconds after the previous event, its Send event 1-5 seconds later, and the next order starts 2-10 minutes after the previous one ends
- Incomplete Order Handling: The last recorded event for incomplete orders receives Log Status code
-1337(custom error code for this demo) - 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
A PowerShell script automates the creation of 100 realistic orders:
- Script: Generate O2C Demo Data Script
- Usage guide: Generate O2C Demo Data
- Generates: ~1,090 Log Events (100 orders × ~10.9 events average per order)
- Complete orders (all 7 steps): ~53 orders × 14 events = 742 events
- Partial orders (2-6 steps): ~47 orders × variable events = ~318 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-5 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
- 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)
- Production mode: (Future enhancement) Direct Log API calls
- Randomness: The script sets no random seed, so every run produces a different mix of complete and incomplete orders
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