Integration architecture playbook
Connect SaaS platforms, internal APIs, queues, and automation workflows with clear contracts and controls.
Integrations move business state between systems. They also amplify failures when contracts, retries, ownership, or data boundaries are unclear. Use this playbook to design integrations that can be operated, debugged, and safely automated.
Integration types#
Design checklist#
- Who owns each side of the integration?
- What is the source of truth for each field?
- Is the flow command-oriented, event-oriented, or synchronization-oriented?
- What happens if the receiver is down for minutes, hours, or days?
- How are retries made safe and idempotent?
- Which data fields are personal, regulated, secret, or customer-confidential?
- How do operators reconcile drift between systems?
Implementation controls#
Contracts#
Define event/API contracts before implementation:
- Schema and field meanings.
- Required vs optional fields.
- Versioning and compatibility rules.
- Example payloads.
- Error codes and retryability.
- Ownership and escalation channel.
Use CloudEvents or a similar envelope for event-driven integrations so metadata such as ID, source, type, time, and subject are consistent.
Idempotency and reconciliation#
Every integration that can retry needs idempotency.
- Use stable external IDs and idempotency keys.
- Store processed event IDs with an expiration window.
- Design updates as upserts where possible.
- Add reconciliation jobs to compare source and destination state.
- Keep dead-letter queues or failed-record tables with replay tooling.
Security#
- Verify webhook signatures and timestamps.
- Use scoped credentials per integration and environment.
- Rotate secrets and disable unused integration users.
- Avoid sending unnecessary personal data to third parties.
- Log who configured the integration and which fields are mapped.
Observability#
Minimum integration dashboards:
- Event/API volume by integration and operation.
- Success, retry, and dead-letter rates.
- End-to-end latency and queue lag.
- Provider rate-limit responses.
- Authentication/signature failures.
- Reconciliation drift count.
Each integration should have a runbook with replay instructions, provider status links, credential rotation steps, and known rate limits.
Example integration contract#
1name: crm-company-sync2owner: revenue-platform3source_of_truth: internal-customer-api4destination: crm-provider5pattern: queue-worker6schema_version: 2026-06-26.17idempotency_key: company_id + updated_at8personal_data: false9retry_policy:10 max_attempts: 811 backoff: exponential12 dead_letter_after: 24h13reconciliation:14 schedule: daily15 drift_threshold: 25 recordsRelated Assistance guides and services#
References#
- CNCF, CloudEvents
- IETF, HTTP Message Signatures
- OpenTelemetry, Messaging semantic conventions