{
  "id": "unit4-einvoicing-switch",
  "version": "0.1.0",
  "stage": null,
  "title_en": "E Invoicing Connection, one system, one rule set",
  "titles_json": {
    "en": "E Invoicing Connection, one system, one rule set"
  },
  "inputs_schema": {
    "system": "custom | legacy | erp | pos | odoo_community",
    "rule_set": "sa_fatoora | pl_ksef | de_xrechnung_zugferd | ae_provider | fr_be",
    "origin": "own_property | test_domain | stranger",
    "invoice_sample_ids": [
      "string"
    ]
  },
  "steps": [
    "map the system to the national format of the rule set",
    "connect to the platform, an accredited provider or a Peppol access point",
    "validate 20 real invoices with the official validator",
    "fix every reject and revalidate",
    "Gulf rule sets: an Arabic readable copy beside each XML invoice",
    "record the validator rule file version used",
    "write the runbook",
    "signed record; VAT treatment stays with the client accountant, written into the scope"
  ],
  "acceptance_tests_json": [
    {
      "test_id": "invoices_validate_20",
      "test_version": "1",
      "outside_observable": false,
      "evidence_source": "official_validator",
      "definition": "20 real invoices from the client system pass the official validator for the rule set with no errors."
    },
    {
      "test_id": "connection_accepts",
      "test_version": "1",
      "outside_observable": false,
      "evidence_source": "platform_response",
      "definition": "The platform, accredited provider or access point accepts a test submission from the client system."
    },
    {
      "test_id": "rejects_closed",
      "test_version": "1",
      "outside_observable": false,
      "evidence_source": "firm_record",
      "definition": "Every reject seen during the unit has a recorded cause and fix, and the invoice passes on resubmission."
    },
    {
      "test_id": "rule_version_recorded",
      "test_version": "1",
      "outside_observable": false,
      "evidence_source": "firm_record",
      "definition": "The record names the validator rule file version the invoices were tested against."
    },
    {
      "test_id": "arabic_copy_matches",
      "test_version": "1",
      "outside_observable": false,
      "evidence_source": "firm_record",
      "definition": "Gulf rule sets only: each Arabic readable copy carries the same invoice number, dates, amounts and tax lines as its XML. Not applicable outside the Gulf rule sets."
    }
  ],
  "risk_class": "read_only",
  "signer_type": "accountable_reviewer",
  "turnaround_hours": null,
  "price_direct_usd": null,
  "price_wholesale_usd": null,
  "prices_by_rule_set_order": [
    "direct",
    "wholesale",
    "runbook_direct",
    "runbook_wholesale"
  ],
  "prices_by_rule_set": {
    "sa_fatoora": ["990.00", "590.00", "792.00", "472.00"],
    "pl_ksef": ["380.00", "248.00", "304.00", "198.40"],
    "de_xrechnung_zugferd": ["690.00", "450.00", "552.00", "360.00"],
    "ae_provider": ["690.00", "450.00", "552.00", "360.00"],
    "fr_be": ["587.00", "383.00", "469.60", "306.40"]
  },
  "tier_rule": {
    "tier_share": {
      "1": "1.00",
      "2": "0.85",
      "3": "0.55",
      "4": "0.35"
    },
    "runbook_mode_discount": "0.20",
    "runbook_price_direct_usd": null,
    "runbook_price_wholesale_usd": null,
    "runbook_prices_note": "Runbook prices differ by rule set; see prices_by_rule_set."
  },
  "warranty_terms_hash": null,
  "allowed_tools": [
    "official_validator_run",
    "platform_sandbox_api"
  ],
  "approval_rules": {
    "mode": "runbook",
    "client_applies_every_change": true,
    "write_tools": []
  },
  "review_level": "full",
  "bench_min_cases": 50,
  "bench_pass_rate": null,
  "bench_passed_at": null,
  "status": "draft"
}
