Makhzon 360 · RB-ZATCACLIENT

ZATCA Fatoora API Client — incident runbook

The ZATCA Fatoora client submits e-invoices for clearance and reporting. Outages create a compliance backlog rather than immediate operator downtime — invoices must queue, never be dropped.

Warning at ZATCA API failure rate ≥ 3%, critical at ≥ 8%. Critical means user-visible impact: page the escalation owner.

dashboard: sim://grafana/zatca-clientlogs: sim://logs/zatca-clientowner: Compliance Engineeringrunbook: RB-ZATCACLIENT

Signals & thresholds

  • Primary metric: ZATCA API failure rate (%)
  • Warning threshold: ≥ 3%
  • Critical threshold: ≥ 8%
  • Dashboard: sim://grafana/zatca-client
  • Log source: sim://logs/zatca-client
  • SLA: 99% clearance within 5 minutes
  • SLO: 99.9% of requests under warning threshold
  • External dependencies: ZATCA Fatoora APIs

1. Detection

  1. Clearance probe reports ZATCA API failure rate above the warning threshold with errors returned by ZATCA Fatoora APIs.
  2. Provider status page or error codes confirm degraded service.

2. Triage

  1. Confirm whether ZATCA endpoints are reachable and check the returned status codes.
  2. Separate credential/certificate failures from provider unavailability.
  3. Check certificate and CSR expiry dates for affected stores.
  4. Measure the queue depth of pending clearance submissions.

3. Mitigation

  1. Keep invoices queued with exponential backoff; never discard unsubmitted documents.
  2. If credentials expired, re-onboard the affected store certificate.
  3. Inform finance/compliance owners about the backlog size and expected clearance delay.

4. Verification

  1. Confirm ZATCA API failure rate has been below the warning threshold for at least 10 minutes.
  2. Confirm the affected business services are healthy on the dashboard.
  3. Confirm no alerts remain open for this component and its downstream consumers.
  4. Spot-check one real end-to-end operation through the affected flow.

5. Rollback / restore

  1. If a deploy caused the incident, roll back to the previous release and re-verify.
  2. If a configuration or threshold change caused it, restore the previous value and record why.
  3. Re-enable any job, feature flag or channel that was paused during mitigation, one at a time.

Escalation path

  • First responder: NOC on duty — acknowledge within 5 minutes.
  • Component owner: Compliance Engineering.
  • Escalation owner (page on critical): Compliance On-Call.
  • Escalate if the metric is still critical 15 minutes after mitigation, or if data integrity is in doubt.
  • Declare a major incident if two or more critical components are alerting at the same time.

Blast radius — business services affected (1)

ZATCA E-Invoicing

External dependencies

ZATCA Fatoora APIs — E-invoice clearance and reporting

Simulated incidents that exercise this runbook

ZATCA API unavailable — Fatoora clearance/reporting endpoints unreachable; invoices queueing.

Reporting notes

  • Record start time, actions taken and recovery time in the incident record.
  • Attach the dashboard screenshot and the dominant error message to the postmortem.
  • Content drafted for the monitoring demo — confirm the exact commands with the owning team before production use.