# ERP Sync Troubleshooting Runbook

Use this runbook when CRM, ERP, portal or finance syncs stop moving cleanly.

## First 15 Minutes

1. Confirm whether the failure affects reads, writes or both.
2. Check the correlation ID in the CRM, queue worker and ERP logs.
3. Identify the failed entity type: customer, item, price, quote, order, invoice or payment.
4. Check if the payload failed validation, authentication, timeout, duplicate detection or downstream business rules.
5. Decide whether to retry, replay from the outbox, correct source data or hold the record for manual review.

## Evidence To Capture

- Correlation ID
- Source system and destination system
- Payload version
- Entity ID in both systems
- HTTP status or queue error
- Retry count
- Dead-letter reason
- Business owner for the record

## Recovery Decision

| Condition | Action |
|---|---|
| Duplicate request with same idempotency key | Do not create a second record. Return stored result. |
| Temporary ERP timeout | Retry with exponential backoff. |
| Payload schema mismatch | Stop retries, fix mapping or version contract. |
| Business validation failure | Route to owner with source data correction task. |
| Unknown downstream state | Reconcile by external reference before replay. |

## Done Criteria

- Failed record has a final state.
- Source and destination IDs are linked.
- Related queue message is removed or replayed.
- Monitoring dashboard no longer shows the incident as open.
- Root cause is added to the integration error catalog.
