Asset History

The append-only history stream that records every change across entities. Enables instant rollback, auditing, and time-travel analysis.


Setup

  • Asset History is enabled by default. Almost all user-driven changes create an immutable history record.
  • View changes on the Changes page in Settings or on entity-specific activity panels.
  • Use rollback on Stocks directly from the stock/variant overflow menu to undo the last stock change.

Attributes

asset-history.schema.ts
1type AssetHistory = { 2 id: string; // uuid 3 revisionNumber: number; 4 modifiedAt: Date; 5 modifiedById?: string; // uuid 6 modifiedByEmail?: string; 7 modifiedByEndpoint?: string; 8 9 // Which entity changed 10 assetType: HistoryTrackableEntity; // e.g. 'Item' | 'Variant' | 'Listing' | 'Stock' | ... 11 assetId: string; // uuid 12 13 // Before/after snapshots 14 oldData: Json; // partial or full snapshot before 15 newData: Json; // partial or full snapshot after 16 changedFields: string[]; // paths of changed fields 17 18 // Context 19 operation: string; // e.g. 'create' | 'update' | 'delete' | 'stock.adjust' | 'listing.update' 20 companyId: string; // uuid 21}


Rollback & Time Travel

Stocks: Easy Undo

Open the menu on a Stock row or a Variant's stock panel and choose Undo to revert the last stock change. This opens the undo dialog which will check to see if the operation is safe or could result in data loss.

Changes Page: Roll Back Any Field

In Settings → Changes, pick a revision and roll back the entity to a prior state using its oldData. Field-level diffs highlight exactly what will be reverted.

Audit & Compliance

Every write is preserved with the actor, time, and changed fields. Perfect for audits and tracing who changed what and when.

Forecasting & Insights

Use the full history stream to forecast future trends and understand how changes impact stock, sales, and operations over time.

FAQ

Copyright © 2025 Stockmate
All rights reserved