Ch 5 — Enterprise Integration Patterns

Connecting agents to ERP, CRM, and ITSM — APIs, protocols, middleware, and why "just connect to SAP" is never simple
High Level
api
API
arrow_forward
bolt
Events
arrow_forward
link
Protocol
arrow_forward
mediation
Middleware
arrow_forward
security
Auth
arrow_forward
hub
Orchestrate
-
Click play or press Space to begin...
Step- / 8
api
The Three Integration Patterns
API-first, event-driven, and orchestrated — the building blocks
Three Approaches
Enterprise AI integration in 2026 follows three dominant patterns. API-first: expose agent-ready REST/GraphQL endpoints across enterprise systems with standardized authentication and rate limiting. This is the simplest pattern but requires each system to have a modern API layer. Event-driven: use message brokers and event meshes to trigger agent actions when business events occur — a new invoice arrives, a ticket is escalated, a contract is signed. This enables real-time responsiveness without polling. Multi-agent orchestration: connect multiple specialized agents through distributed event handling, where each agent owns a domain and communicates through structured messages. Most production deployments combine all three.
Pattern Comparison
API-First Agent calls system directly Sync, request-response Simple but tightly coupled Event-Driven System publishes, agent subscribes Async, real-time triggers Decoupled but complex routing Orchestrated Router dispatches to specialists Mixed sync/async Scalable but needs coordination // Source: Azilen, SAP, 2026
Key insight: The pattern choice depends on latency requirements and system maturity. API-first for modern SaaS, event-driven for real-time workflows, orchestrated for multi-system processes.
link
MCP and A2A: The New Standards
How Anthropic and Google are standardizing agent-to-system communication
Protocol Revolution
Two protocols are reshaping enterprise AI integration. Anthropic's Model Context Protocol (MCP) standardizes how AI agents connect to external tools and data sources — replacing custom connectors with a universal interface. Google's Agent-to-Agent Protocol (A2A) standardizes how agents communicate with each other across organizational boundaries. Both are now supported by SAP, Salesforce, ServiceNow, and Workday. The impact: instead of building custom integrations for every system-agent pair, enterprises can implement the protocol once and connect to any compliant system. This is the same shift that REST APIs brought to web services — standardization that dramatically reduces integration cost.
Protocol Landscape
MCP (Anthropic) Agent ↔ Tools/Data sources Universal tool interface Supported: SAP, Salesforce, ServiceNow, Workday A2A (Google) Agent ↔ Agent Cross-org communication Supported: same vendors Impact: Before: N×M custom connectors After: N+M protocol adapters
Key insight: MCP and A2A are doing for AI agents what REST did for web APIs — creating a shared language that turns N×M custom integrations into N+M standardized adapters. Bet on protocol-compliant systems.
domain
Connecting to SAP
The most common enterprise integration challenge
SAP Integration Reality
SAP runs the core business processes of 77% of the world's transaction revenue. Connecting an AI agent to SAP means navigating BAPIs (Business Application Programming Interfaces), RFCs (Remote Function Calls), OData services, and increasingly the SAP Integration Suite. SAP has been named a six-time Leader in the Gartner Magic Quadrant for iPaaS (2026), offering 4,000+ prebuilt integration flows and 250+ connectors. Their Integration Suite now includes AI-assisted features: anomaly detection, script optimization, traffic prediction, and integration-flow generation. For agents, SAP's agentic AI capabilities expose API-first access with enterprise-grade security policies. But legacy SAP installations (ECC, R/3) still require BAPI/RFC access through middleware.
SAP Access Layers
Modern (S/4HANA Cloud): OData REST APIs SAP Integration Suite MCP-compatible endpoints Agent-ready Transitional (S/4HANA On-Prem): OData + BAPI hybrid Cloud Connector needed Middleware required Legacy (ECC / R/3): BAPI/RFC only Screen scraping fallback Significant investment // SAP: 6x Gartner iPaaS Leader
Rule of thumb: Check your SAP version first. S/4HANA Cloud is agent-ready. Anything older requires middleware investment proportional to the version gap.
cloud
Salesforce, ServiceNow, and Microsoft
The three platforms every enterprise agent must talk to
Platform Capabilities
Salesforce Agentforce leads CRM AI agents with 8,000+ customers, offering pre-built agents for sales, service, and marketing that connect natively to Salesforce data. ServiceNow ranked #1 for AI Agents in the 2025 Gartner Critical Capabilities assessment, with deep ITSM integration and workflow automation. Microsoft Copilot Studio provides no-code and pro-code agent building across the Microsoft ecosystem, with Logic Apps handling cross-platform orchestration. All three now support MCP and A2A protocols. The challenge isn't connecting to any single platform — it's orchestrating across all three when a business process spans CRM, ITSM, and productivity tools simultaneously.
Platform Strengths
Salesforce Agentforce 8,000+ customers CRM-native agents Sales, service, marketing ServiceNow AI Agents #1 Gartner Critical Capabilities ITSM, HR, CSM workflows Deep process automation Microsoft Copilot Studio No-code + pro-code M365, Dynamics, Azure Logic Apps orchestration // All support MCP + A2A protocols
Key insight: Each platform excels in its domain. The real integration challenge is cross-platform orchestration — when a customer issue requires CRM data, IT ticket creation, and email follow-up simultaneously.
mediation
The Middleware Layer
iPaaS, integration platforms, and the glue that holds it together
Why Middleware Matters
Most enterprises can't connect agents directly to every system. The middleware layer — Integration Platform as a Service (iPaaS) — handles authentication, data transformation, rate limiting, error handling, and retry logic across all connected systems. SAP Integration Suite, MuleSoft, Workato, and Microsoft Logic Apps are the dominant players. The middleware translates between the agent's standardized tool calls and each system's proprietary API format. It also provides observability: logging every integration call, tracking latency, and alerting on failures. Without middleware, every agent-to-system connection is a custom, brittle, point-to-point integration that breaks when either side changes.
Middleware Functions
What iPaaS handles: Auth: OAuth, API keys, certs Transform: JSON ↔ XML ↔ BAPI Rate limit: Throttle per system Retry: Exponential backoff Circuit break: Fail fast on outage Log: Every call, both directions Alert: Latency, errors, anomalies Major platforms: SAP Integration Suite MuleSoft (Salesforce) Workato, Microsoft Logic Apps
Rule of thumb: If your agent connects to more than 2 enterprise systems, you need middleware. The cost of building it is always less than the cost of maintaining point-to-point integrations at scale.
security
Authentication and Authorization
The agent needs access, but not too much access
The Access Problem
An AI agent that can read from SAP, write to ServiceNow, and send emails through Exchange has more system access than most employees. Enterprise security teams rightfully ask: what can this agent do? What data can it see? Who approved its access? What happens if it's compromised? The answer requires least-privilege access: the agent gets only the permissions it needs for its specific use case, nothing more. Each system connection needs its own service account with scoped permissions, OAuth tokens with limited lifetimes, and audit logging of every action. The agent's identity must be traceable in every system's access logs — not hidden behind a shared service account.
Security Checklist
Per-system requirements: □ Dedicated service account □ Scoped to minimum permissions □ OAuth with token rotation □ IP allowlisting where possible □ All actions logged with agent ID Agent-level controls: □ Read-only by default □ Write requires approval flow □ PII access requires justification □ Financial actions capped □ Credential rotation automated
Key insight: Treat the agent as an employee with a security clearance review. It should have a named identity, scoped permissions, regular access reviews, and the ability to be instantly revoked.
sync
Idempotency and Error Recovery
When the agent retries, the same action shouldn't happen twice
The Retry Problem
Network calls fail. APIs time out. Systems go down for maintenance. An enterprise agent must handle all of these gracefully. The critical requirement is idempotency: if the agent retries a failed operation, the result should be the same as if it succeeded the first time. Creating a duplicate invoice, sending a duplicate email, or double-booking a resource because the agent retried a timed-out call is a production incident. Every tool call the agent makes must be designed so that retrying is safe. This means using idempotency keys, checking for existing records before creating new ones, and designing write operations as upserts rather than inserts.
Idempotency Patterns
Non-idempotent (dangerous): POST /invoices {amount: 4250} Timeout → retry → duplicate invoice Idempotent (safe): PUT /invoices/INV-4401 {amount: 4250} Timeout → retry → same invoice Patterns: Idempotency keys on every write Check-before-create logic Upsert instead of insert Deduplication at middleware layer
Key insight: In traditional software, a retry bug creates a support ticket. In an AI agent, a retry bug creates real-world consequences — duplicate payments, duplicate orders, duplicate communications. Design every tool call to be safely retryable.
trending_up
The $52 Billion Opportunity
Market trajectory and what it means for integration investment
Market Context
The enterprise AI agents market is projected to grow from $7.84 billion in 2025 to $52.62 billion by 2030 at a 46.3% CAGR. This growth is driving massive investment in integration infrastructure. SAP's Integration Suite now runs across 40+ data centers worldwide. Salesforce, ServiceNow, and Microsoft are all building agent-native integration layers. The implication for enterprises: integration infrastructure built today will serve as the foundation for the next decade of AI deployment. Investing in middleware, standardized protocols, and clean API layers isn't just solving today's agent connectivity problem — it's building the platform that every future AI capability will depend on.
Market Trajectory
Enterprise AI Agents Market: 2025: $7.84B 2030: $52.62B (projected) CAGR: 46.3% Integration investment thesis: Middleware built now serves every future AI use case. Protocol adoption (MCP, A2A) reduces marginal integration cost for each new agent. // Source: Planetary Labour, 2026
Key insight: Integration infrastructure is the compounding asset of enterprise AI. Every dollar spent on clean APIs, middleware, and protocol adoption pays dividends across every future agent deployment.