ChangeHistory
Universal audit trail tracking all field-level modifications with before/after values for any entity type. Supports regulatory compliance (GDPR Article 30, SOX, HIPAA) across all business entities.
Properties
| Property | Type | Mode | Description | Required |
|---|---|---|---|---|
| entityType | string | stored | Type of entity that was modified (Customer, Employee, Order, Product, etc.) Example: | Required |
| entityId | string | stored | Unique identifier of the entity that was modified Example: | Required |
| fieldName | string | stored | Name of the field that was modified Example: | Required |
| oldValue | string | stored | Previous value before the change (serialized as string) Example: | Optional |
| newValue | string | stored | New value after the change (serialized as string) Example: | Required |
| changeReason | string | stored | Business reason or justification for the change Example: | Optional |
| changeType | string | enum | Type of change operation Values: Example: | Required |
| ipAddress | string | stored | IP address from which the change was made Example: | Optional |
| userAgent | string | stored | Browser/client user agent string for additional context Example: | Optional |
| sessionId | string | stored | Session identifier for grouping related changes Example: | Optional |
Examples
Example 1
{
"@type": "ChangeHistory",
"entityType": "Customer",
"entityId": "CUST-2024-00123",
"fieldName": "status",
"oldValue": "active",
"newValue": "suspended",
"changeReason": "Customer requested temporary account suspension",
"changeType": "update",
"ipAddress": "192.168.1.100",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",
"sessionId": "sess_abc123xyz"
}Example 2
{
"@type": "ChangeHistory",
"entityType": "Customer",
"entityId": "CUST-2024-00789",
"fieldName": "creditLimit",
"oldValue": "50000.00",
"newValue": "100000.00",
"changeReason": "Credit review approved - increased limit for enterprise customer",
"changeType": "update",
"ipAddress": "10.0.0.50",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/119.0.0.0",
"sessionId": "sess_xyz789abc"
}Example 3
{
"@type": "ChangeHistory",
"entityType": "Product",
"entityId": "PROD-2024-05678",
"fieldName": "price",
"oldValue": "99.99",
"newValue": "79.99",
"changeReason": "Black Friday promotion - 20% discount applied",
"changeType": "update",
"ipAddress": "10.0.0.25",
"userAgent": "PostmanRuntime/7.35.0",
"sessionId": "api_batch_001"
}Example 4
{
"@type": "ChangeHistory",
"entityType": "Employee",
"entityId": "EMP-2024-0042",
"fieldName": "department",
"oldValue": "Sales",
"newValue": "Marketing",
"changeReason": "Internal transfer approved by HR",
"changeType": "update",
"ipAddress": "192.168.10.50",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Edge/119.0.0.0",
"sessionId": "sess_hr_transfer_123"
}