Every calculation includes an audit trail — a step-by-step record of how each value was computed. Required for legal compliance in most Latin American countries.Documentation Index
Fetch the complete documentation index at: https://docs.clevis.dev/llms.txt
Use this file to discover all available pages before exploring further.
Enabling the audit trail
The audit trail is included by default. To disable it (useful for high-frequency batch runs where you only need the summary):Structure
Each step in the audit trail records exactly how a value was calculated:Field reference
| Field | Description |
|---|---|
step | Sequential step number in the calculation order |
concept_id | Internal identifier of the payroll concept |
label | Human-readable label (typically in Spanish) |
formula | The DSL formula that was evaluated |
inputs | Snapshot of all input values used in the formula |
result_unrounded | Result before rounding (full precision) |
result_final | Final value after rounding |
Use cases
- Compliance audits — Demonstrate to tax authorities exactly how each value was derived
- Debugging — Identify which formula or input caused an unexpected result
- Reconciliation — Compare engine results against manual calculations step by step
- Employee inquiries — Explain payslip line items with full transparency
Performance considerations
For batch requests processing hundreds of employees, disabling the audit trail can significantly reduce response payload size. The calculation itself is not affected — only the response content changes.audit_trail field in the response will be null.