See the system
Connect AI workflows to operational systems without losing authorization, consistency, or failure visibility.
Define the external contract
Document the integration’s operations, identifiers, schemas, authentication, authorization, error responses, rate limits, and versioning. Separate observed API behavior from assumptions. A sandbox may have different permissions or limits from production.
Keep the adapter narrow so provider-specific details do not spread across the application. Contract tests should reveal a changed field or status before it becomes silent data loss.
Preserve the caller’s authority
An integration service may have broad machine access. That does not mean every user can ask it to act on every resource. Verify the user’s entitlement and the target resource before a write.
Use supported service or delegated identity mechanisms as appropriate. Avoid treating a user-supplied ID as proof of ownership. Permissions may change between proposal and execution; recheck at the action boundary.
Handle duplicate and reordered events
Webhooks and queues often deliver messages more than once and may not preserve the order you expect. Use stable event IDs, resource versions, or explicit sequence logic according to the upstream contract.
Acknowledge an event only after the required durable handling step. If downstream work fails, retain a recoverable record. A dead-letter queue needs an investigation and replay procedure, not just a place where failures disappear.
Bound retries and protect dependencies
Retry transient failures with limits and an overall deadline. Respect documented rate limits and backoff guidance. A circuit breaker can reduce pressure on a persistently failing dependency, but also needs recovery behavior and useful visibility.
Distinguish accepted, completed, and failed work in the user interface. Never tell a user that a write succeeded merely because it was queued. Provide a stable operation identifier for follow-up.
Reconcile uncertain outcomes
A timeout can leave the caller unsure whether a write committed. Use an idempotency key or a supported lookup to determine the result before repeating the action. Keep an audit record linking proposal, approval, request, and outcome.
Periodic reconciliation can reveal discrepancies between internal state and the external system. Define ownership and remediation; do not silently overwrite the external system just to make counts match.
Worked scenario
A webhook is delivered twice, and the first ticket update succeeded before its response was lost. Reusing the logical operation’s idempotency key should return the recorded result. Sending a new key would risk a second side effect. The user should see the final verified outcome rather than two apparent successes.
Practical assignment
- Define a synthetic ticket-service adapter.
- Test invalid identifiers and unauthorized targets.
- Simulate duplicate events and timeouts.
- Verify stable logical-operation identity.
- Document reconciliation for an uncertain result.
- Submit contract tests and an audit trace.
What to submit
Submit the artifacts named above, a short explanation of your decisions, and evidence of the checks you performed. Distinguish measured results from estimates and designs from executed integrations.
| Review dimension | Submission evidence |
|---|---|
| Correctness | Show the expected behavior and a meaningful counterexample. |
| Reproducibility | State setup, inputs, versions, and what was actually executed. |
| Delivery judgment | Explain the client impact, alternative, and unresolved assumption. |
| Operational boundary | Identify permissions, failure behavior, and any resource cleanup. |
Knowledge check
Answer guide
- No. The application must preserve the user’s actual authority.
- Reconcile using the operation’s identity. The write may already have committed.
- Accepted for later processing. Acceptance and completion are distinct states.
References & next step
Platform examples are environment-dependent. Start with the official documentation in the reference library and verify the exact cloud, region, privileges, and versions you use.
Open the official reference library
Editorial edition: 5 October 2026. The local reference lab is executed locally; this course does not claim a live Databricks deployment.