Methodology / Commissions / Data format

Data format

The Sales Compensation Analyzer JSON format: versioned schema, structure, examples, compatibility and how to verify the hash.

Open toolOpens in a new tab

JSON is the master format: what «Download JSON» produces and what the tool loads back.

Schema

  • JSON Schema 2020-12, version 1.0.0: https://commissions.oriacgimeno.com/schema/plan/1.0.0/plan.schema.json.
  • Semantic versioning: a major version is incompatible and needs a migration; a minor version only adds optional fields; a patch fixes descriptions or constraints.
  • Valid examples (generated by the engine with made-up data), invalid examples (one defect each) and the changelog are published with the schema.

Structure

  • inputs: the plans (relationship, fixed pay, target variable, cap, one or two metrics with quota and curve, relationship options), role, payment frequency, excellence level, scenarios and, if present, case: the person’s actual or forecast sales for the plan’s annual period, one per metric and shared by A and B.
  • results: per plan, the result at 100% of quota (variable pay, cost breakdown or the reason it is not calculated), alerts, legal warnings and risks; the scenario table or the comparison at equal sales; A/B alerts; and the «Your case» result.
  • Where the table is: results.scenarios is plan A’s table when there is one plan, or two that cannot be compared. It is null when two plans are compared: the table is then comparison.rows.
  • provenance: the sha256 of inputs and results in canonical form (RFC 8785).

Conventions

  • Amounts in integer cents (*_minor fields), rounded on export.
  • Ratios as fractions with six decimals (cost_to_sales_ratio only if the quota is revenue; cost_to_margin_ratio if it is margin).
  • Dates and periods in ISO 8601.
  • Stable codes, no translated text: alerts carry code, severity, evidence (M, C or H for the source; calc if measured on the plan; legal for a legal rule), threshold_hypothesis, params and dated sources.

Compatibility

  • The importer ignores unknown fields, reads any 1.x document and migrates older major versions with tested functions.
  • Old links (#p=v1) still open and are migrated.
  • When a JSON file is loaded, the tool recomputes the results with its own engine and legal data and warns if anything differs.

Minimal example

{
  "provenance": {
    "canonicalization": "RFC8785",
    "hash_algorithm": "sha-256",
    "inputs_sha256": "…",
    "results_sha256": "…"
  }
}

The full examples are published with the schema.