MSBA-310 · Lesson 6 of 12 · 20 min
Integration patterns
▶ Video coming soon A video version of this lesson is on the way.
A claims notice is useful only when it reaches the people and systems that act on it. In the claims design that meant BrokerDesk, Dataverse, Teams, Outlook, the hail triage model in Foundry, and 31 carriers with very different ways of receiving claims. Bram spent the fifth week of the studio with Pascal Wojtyniak and Yusra working through how each connection should work. This lesson describes the integration patterns available to agentic solutions on Microsoft's platforms, the criteria for choosing among them, and the engineering qualities that keep integrations dependable.
Multi-agent orchestration and the Model Context Protocol in depth belong to MSBA-311. Here the focus is on choosing patterns as part of a solution design.
The integration building blocks
Agents built in Copilot Studio and Microsoft 365 Copilot can reach other systems in several ways.
Connectors. Power Platform has a large library of prebuilt connectors for Microsoft and third-party services, and custom connectors wrap an organization's own REST APIs. In Copilot Studio a connector action can be added to an agent as a tool. Quillfield's BrokerDesk custom connector already exposed three operations: GetPolicy, ListDrivers and CreateChangeRequest.
REST API tools. Copilot Studio can call a REST API described by an OpenAPI specification directly as a tool, without building a custom connector first. This is convenient for prototypes; connectors remain the better choice where reuse across apps, flows and agents, or data policy control, matters.
Agent flows. Deterministic, multi-step processes built with the Power Automate designer inside Copilot Studio. An agent calls a flow as a tool, the flow runs its actions, and it can respond to the agent early while continuing to work. Flows suit approvals, retries, branching and long-running work.
Model Context Protocol (MCP) servers. MCP is an open protocol for exposing tools and resources to agents. Copilot Studio can connect to MCP servers as tools; when the server's tools change, the agent sees the change. Quillfield already used Northmark Mutual's MCP server for underwriting appetite questions.
Other agents. An agent can call child agents inside the same agent, connected agents built separately, and agents from other platforms. This is the territory of MSBA-311.
Event triggers. Autonomous agents can start from events, such as a new email in a mailbox, a new row in Dataverse, or a scheduled time, and act on the payload.
Copilot connectors. These bring external content into the Microsoft Graph so that Microsoft 365 Copilot and agents can use it as knowledge.
Foundry models and agents. A model deployed in Foundry can be called from a flow through an HTTP action or a connector, and Copilot Studio can connect to Foundry agents and models in supported scenarios.
Computer use. For systems with no API, Copilot Studio's computer use capability lets an agent operate a website or desktop application through its user interface. Microsoft announced it as generally available in May 2026. It is a last resort rather than a first choice: user interfaces change, runs are slower, and the security design is more demanding.
Choosing a pattern for each interaction
Bram's rule of thumb was to let the nature of each interaction choose the pattern, not the tool the team liked best.
Request and response suits quick reads and simple writes where the agent needs the answer to continue the conversation: matching a policy, checking a carrier's notification method, retrieving a claim's status. The call should complete in a few seconds.
Flow with early response suits work that takes longer or involves several systems, where the client should not wait: creating the Claim Notice record, storing photos, calling the triage model, and notifying the advocate. The flow returns the reference number to the agent at once, then continues.
Event-driven suits work that should happen whatever channel the notice arrived from. When a Claim Notice row reaches the "ready for review" status, an event starts the advocate notification. If notices later arrive by email or phone, the same event drives the same downstream process.
Human in the loop suits any action with consequences that are hard to reverse. Carrier notification, under Wendell's rule, would be prepared by the flow and approved by an advocate in Teams before being sent.
Batch or scheduled suits periodic work, such as a nightly reconciliation that checks every Claim Notice promoted to BrokerDesk actually exists there.
| Interaction | Pattern | Mechanism | Identity |
|---|---|---|---|
| Match policy from number and ZIP code | Request and response | BrokerDesk custom connector, new read operation | Narrow service identity |
| Create Claim Notice and store photos | Flow with early response | Agent flow, Dataverse, file store | Flow's service connection |
| Hail damage triage | Request and response inside the flow | HTTP call to Foundry endpoint | Managed identity |
| Notify advocate | Event-driven | Dataverse row status change starts flow | Service connection |
| Notify carrier with API | Human in the loop | Approval in Teams, then carrier API | Service identity per carrier |
| Notify carrier without API | Human in the loop | Draft email for advocate to send | Advocate's own mailbox |
| Promote to BrokerDesk claim | Batch nightly, later real time | Scheduled flow, then new API endpoint | Service identity |
| Reconcile notices and claims | Batch nightly | Scheduled flow with report | Service identity |
Carriers: one problem, many interfaces
The carrier side showed why integration design needs a portfolio approach. Of Quillfield's 31 carriers, Bram's survey found seven with a claims API Quillfield could use, fourteen with a web portal only, and ten that accepted email notifications. Northmark Mutual offered an MCP server, but its tools covered underwriting appetite, not claims.
He resisted the temptation to integrate all of them at once. The design treated carrier notification as one capability with three adapters: API, email draft, and portal (manual for now). For portals, he recorded computer use as a future option and explained why it was not in the first release: the advocate approval step meant a person was already involved, the portals changed often, and computer use would need its own security review. The proof of concept would include two API carriers and the email pattern.
Engineering qualities that make integrations dependable
Integrations fail in ordinary ways: timeouts, duplicates, partial failures, throttling and changed schemas. An agent can make these failures more confusing, because a language model may paper over an error with a confident message. Bram listed six qualities for every integration.
Idempotency. If a step runs twice, the result should be the same as running it once. A client who taps "submit" twice, or a flow that retries after a timeout, must not create two claim notices. The design gave each conversation a notice key; the create step checks for an existing record with that key first.
Timeouts and user experience. Agents work in conversation time. A tool that takes 40 seconds is a broken experience. Use early responses and asynchronous processing for anything slow, and tell the user what will happen next.
Error handling with honest messages. When a tool fails, the agent should say so plainly and offer a route ("I couldn't save your photos just now; your report is saved, and an advocate will ask for them"). Tool and flow errors must never be turned into invented success messages. Instructions and topic design both enforce this.
Retries with limits. Transient failures deserve a retry with back-off; permanent failures deserve an alert to a person. Flows have retry policies; the design specified them.
Throttling and limits. Connectors, APIs and models have rate limits. The architect estimates peak load (a hailstorm can produce a day's normal volume in an hour) and checks limits against it, which lesson 8 develops.
Contracts and versioning. Tool descriptions, input and output schemas, and API versions are contracts. When BrokerDesk changes, the connector, the agent and its tests must change together. Pascal agreed to give two weeks' notice of API changes, matching the agent contract already agreed for the HR Leave Assistant.
Worked problem
Designing the "create notice" step for safety under retry
The intake agent calls an agent flow to create the Claim Notice and store photos. A test showed that a slow network caused the client to resend, creating two notices. Redesign the step.
Show solution
- Generate a notice key at the start of the conversation and pass it to the flow as an input.
- In the flow, first look for an existing Claim Notice with that key; if one exists, return its reference instead of creating another.
- Respond to the agent early with the reference as soon as the record exists, before photo storage and triage begin.
- Run photo storage and triage after the response, updating the record's status; on failure, set a status that the advocate queue shows.
- Add a test case to the evaluation set in which the same submission is sent twice.
Answer: The step becomes idempotent and fast from the client's point of view, failures are visible to staff, and a regression test protects the fix.
Synchronous chains and the cost of coupling
Each synchronous call adds latency and a point of failure. A conversation that waits for BrokerDesk, then the file store, then Foundry, then Teams is only as fast as all four together and fails if any one fails. Bram's design kept the conversation's critical path to two synchronous calls at most (policy match and create notice), and moved everything else after the early response. This decoupling also made the components easier to change: the triage model could be retrained or replaced without touching the agent.
Where MCP and connected agents fit
Two newer patterns appeared in the design, deliberately at the edges. Northmark's MCP server was already in use by the Policy Service Assistant for appetite questions; the Claims Desk agent did not need it. And the Policy Service Assistant had a child agent, "Claims Questions", that answered staff questions about the claims process. Bram recommended retiring that child agent once the Claims Desk declarative agent was live, rather than connecting the two, to avoid two sources of claims answers for staff. He wrote that decision as ADR-08 and flagged it for MSBA-311-style review if the agents later needed to collaborate.
Connector or direct API tool?
Pascal raised a practical question when the new BrokerDesk read operation was designed: should it be added to the existing custom connector, or exposed to the agent directly as a REST API tool? Both would work in a demonstration. Bram compared them on four points.
Reuse. A custom connector can be used by agents, agent flows, cloud flows and Power Apps. The policy match operation would be needed by the intake agent and by the nightly reconciliation flow, so reuse mattered.
Governance. Connectors appear in Power Platform data policies, which let administrators allow or block them per environment. A direct API tool is governed through Copilot Studio settings instead, which gives administrators fewer levers.
Lifecycle. The custom connector was already in the Policy Service solution, with connection references and environment variables that moved through the pipeline. Adding an operation to it meant one change in one place.
Speed of experimentation. A direct API tool is quicker to set up for a prototype, because it reads an OpenAPI description without building a connector first.
The decision was to prototype the operation as a direct API tool in the development environment during the proof of concept, then add it to the custom connector before anything reached production. Bram wrote this down as a rule for the team: prototypes may take shortcuts, but production integrations go through connectors that data policies and pipelines can see.
Documenting each integration
Each integration in the design had a one-page entry: purpose, pattern, mechanism, identity, inputs and outputs, expected volume and peak, timeout, retry policy, error messages shown to users, owner, and the tests that cover it. The entries took time to write, but they turned later conversations with Pascal, Wystan and the carriers into checks against a document rather than debates from memory.
Common mistakes
MistakeCalling every system synchronously from the conversation.
InsteadKeep the conversation's critical path short and move slow work after an early response.
MistakeCreating records without protection against retries.
InsteadUse a key and check for an existing record before creating a new one.
MistakeLetting the agent describe a failed action as successful.
InsteadReturn explicit errors to the agent and design honest user messages.
MistakeReaching for computer use first because it works with any interface.
InsteadPrefer APIs and connectors; use computer use for well-justified cases with its own security review.
MistakeTreating tool descriptions and schemas as informal.
InsteadTreat them as versioned contracts with notice periods and regression tests.
Summary and key terms
- Agents integrate through connectors, REST API tools, agent flows, MCP servers, other agents, event triggers, Copilot connectors, Foundry endpoints and, as a last resort, computer use.
- Choose the pattern per interaction: request and response for quick reads, flow with early response for slow work, event-driven for channel-independent processing, human in the loop for consequential actions, and batch for reconciliation.
- Treat a capability with many partner interfaces as one capability with several adapters, phased by value.
- Design integrations for idempotency, sensible timeouts, honest errors, limited retries, throttling and versioned contracts.
- Keep the synchronous critical path short to reduce latency and coupling.
- Custom connector
- A wrapper that exposes an organization's REST API as actions usable across Power Platform and agents.
- Agent flow
- A deterministic multi-step process that an agent calls as a tool.
- Early response
- Returning a result to the caller before the rest of a flow completes.
- Idempotency
- The property that repeating an operation has the same effect as performing it once.
- Event trigger
- A condition, such as a new record or email, that starts an autonomous agent or flow.
- Computer use
- A Copilot Studio capability in which an agent operates a user interface when no API exists.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Why did the design use a flow with early response to create the Claim Notice?
Show answer
So the client gets a reference immediately while photo storage, triage and notifications continue in the background.
How many of Quillfield's carriers offered a claims API in Bram's survey?
Show answer
Seven of 31.
Why was computer use not in the first release for portal carriers?
Show answer
An advocate was already approving notifications, portals changed often, and computer use needed its own security review.
What is a notice key used for?
Show answer
To make the create step idempotent, so retries return the existing record instead of creating a duplicate.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.