Export beta
Order Lifecycle events can be exported as a CSV file for analysis in spreadsheets, BI tools, or data warehouses. The export feature lives in Order Lifecycle → Export in the Craft sidebar.
Date Range
Presets
Quick-select buttons cover the most common windows:
| Preset | Description |
|---|---|
| Today | Midnight to 23:59:59 today |
| Yesterday | Full previous day |
| Last 7 / 30 / 90 days | Rolling window from now |
| This Month | First to last day of the current calendar month |
| Last Month | Full previous calendar month |
| This Year | 1 January to today |
| Last 365 days | Rolling one-year window |
| All Time | Every event in the database (from 1 January 2000) |
Clicking a preset highlights it and fills in the Date From and Date To fields automatically.
Custom Range
The Date From and Date To fields accept any date and time. Set them manually to export a specific window.
Filtering
Order ID
Enter a specific order ID to export events for a single order only. Leave blank to include all orders in the date range.
Event Types
Check individual event types to limit the export to those events. If no types are selected, all event types are included.
The event types are presented as a grouped checkbox list inside a semantic <fieldset>, so the whole group is announced together by assistive technology.

Columns
The Columns to Export table controls which fields appear in the CSV and in what order. Toggle each column on or off with its lightswitch. Drag rows by their handle to reorder columns.
| Column | Description |
|---|---|
| Log ID | Internal log entry ID |
| Date/Time | dateCreated timestamp |
| Order ID | Commerce order ID |
| Order Number | Commerce order number (hash) |
| Event Type | Event type string (e.g. orderCompleted) |
| Message | Auto-generated or custom event description |
| Customer Email | Email address on the order at export time |
| Order Status | Current order status name |
| Total Price | Order total at export time |
| Currency | Order currency code |
| Payload (JSON) | The payload key from the event snapshot |
WARNING
Customer Email, Order Status, Total Price, and Currency reflect the order's current state, not its state at the time the event was logged. Use the Payload (JSON) column for point-in-time values captured in the snapshot.
Downloading
Click Export CSV to download the file. The file is named lifecycle-events-YYYY-MM-DD-HHmmss.csv.
Console Alternative
Large exports can also be done via the CLI to avoid HTTP timeouts:
php craft order-lifecycle/logs/statsFor a programmatic export, query the orderlifecycle_logs table directly via Craft's database layer:
use craft\db\Query;
$rows = (new Query())
->select(['id', 'orderId', 'type', 'message', 'dateCreated'])
->from('{{%orderlifecycle_logs}}')
->where(['>=', 'dateCreated', '2024-01-01 00:00:00'])
->orderBy(['dateCreated' => SORT_ASC])
->all();Related Documentation
- Statistics - Store-wide metrics dashboard
- Configuration - Log pruning and maintenance settings
- Services API - Programmatic access to log data