Rana Maninder Singh
Lesson 12 of 12API & Integration Development

Enterprise Integration Architecture Capstone

Lesson opener

In one line: A capstone is a pack a colleague can operate on Monday: one path from the ERP to the report and to the assistant, with a stop rule on every write.

Why it matters: Northline can read stock, post a receipt, and show a dashboard. None of that survives a new hire unless the architecture, the identities, and the rollback are one document.

Before this lesson: Integration governance and operations. This is the last lesson. Figures remain illustrative.

What you will be able to do

Prerequisites

Lessons 1 to 11. You do not need a cloud account.

The pack

The diagram is the spine. Everything else is a table a person can check.

ERP (system of record)
  |  GET stock, POST receipt, GET order
  v
API layer (method, status, validation, identity)
  |  batch load of named facts
  v
Data warehouse (landed rows + batch equation)
  |  one published fact per visual
  v
Power BI (titled with the fact and the batch date)
  |
  +--> Copilot drafts text only
  |
  +--> Agent tools: reads may run; writes wait for a person

Power BI reads the warehouse, not the ERP session of a shared password. Copilot does not receive a bearer token inside a prompt. The agent uses the tool gate from lesson 10.

API inventory

IdMethod and pathSystem of recordIdentity roleWrite?
I1GET /items/{sku}Warehouseanalytics-readNo
I2GET /accounts/{id}ERPwebshopNo
I3POST /receiptsERPwarehouse-supervisorYes
I4POST /sales-ordersERPwebshopYes
I5Webhook goods.receivedERPwebhook receiverSignal only

Paths are Northline's illustrative contract, not a vendor standard.

Authentication model

Systems use OAuth 2.0 client credentials (RFC 6749 section 4.4, https://www.rfc-editor.org/rfc/rfc6749) where the ERP offers it. A person approving a write uses the authorization-code grant and still does not paste their token into a tool. API keys, if a component has nothing else, travel in the Authorization header and live in the secret store. Roles follow lesson 4. Webhooks use the verification that component's docs specify.

Data flow

  1. I1 pages item balances into the night batch. The fact is on-hand, with as_of.
  2. I3 posts a receipt only after human approval. The webhook I5 tells the webshop to refresh. It does not add quantity by itself.
  3. The warehouse table stores landed rows. Power BI's visual is titled "On hand, landed batch" plus the batch date.
  4. Copilot may draft a sentence about that visual. It may not call I3.
  5. The agent may call I1 without a second click. I3 and I4 wait for approval.

Integration matrix

FromToPatternIdentityIdempotency
WarehouseAPIRequestanalytics-readGET
WebshopERP accountsRequestwebshopGET
SupervisorERP receiptsRequest after approvalwarehouse-supervisorreceipt key
ERPWebshopWebhookdocumented checkevent_id
APIWarehouseBatchanalytics-readbatch window
WarehousePower BIRead the landed tablereport readerNot a write
PersonAgentTool proposalrole on the toolWrite holds

Monitoring plan

The board shows, for the last completed day: calls by status class, batches not in completed or completed_with_rejects, webhook events whose action ran more than once, and agent writes older than one business day still on hold. Northline's illustrative read target remains 99 of 100 item reads within 5 seconds. Misses stay in the denominator.

Logging strategy

Correlation id X-Correlation-Id on every call Northline originates. Log time, id, method, path, status, attempt, duration. Exclude Authorization, keys, and bank fields. Webhook logs store event_id and the verification result, not the raw secret.

Governance model

One owner for the integration pack, the ERP platform owner. Stewards for warehouse, webshop, and analytics may propose a field. They may not add a write tool. A new field is a versioned contract change with a consumer list, as in lesson 3. Conflicts on owned fields stop, as in lesson 7.

Security model

Least privilege per role. Secrets in the secret store. No secrets in git, URLs, prompts, or logs. 401 for a missing credential, 403 for a valid credential with the wrong role. Unverified webhooks are refused. Agent tools off the list are refused.

Risk register

RiskHow you noticeControl
Double receiptTwo resource ids for one business keyIdempotency key and event id
Short page marked successfulrows_read below the source countBatch equation, dashboard stays on the last good batch
Token in a log or promptSearch finds BearerLogger filter, secret store, rotation
Agent writes without a personAudit row has no approverHold on POST, PUT, PATCH, DELETE
Name-matched duplicate customerTwo account ids, similar namesMatch on account_id only
Stale Power BI titleVisual has no batch dateTitle includes the fact and the date

Rollback strategy

Rollback is per change, not "turn integration off" as the first move.

Implementation roadmap

Illustrative 30, 60, and 90 days. Dates are a plan, not a promise to a regulator.

Rubric

Score each row 0 to 3. Illustrative use: the pack is ready for the sponsor when every row is at least 2 and none is 0.

Row023
ArchitectureNo system of recordDiagram names ERP, API, warehouse, report, assistantA colleague can point to the write stops
InventoryTools without methodsMethods and roles listedEach write has an idempotency identity
SecurityShared admin secretRoles and header-only secretsOff-list tools and unverified webhooks refused
OperationsGreen mark onlyCounts and a correlation idRetry attempts distinguished from business results
Rollback"We will see"Previous build and batch hold namedA receipt rollback names the ERP reversal

Self-review checklist

Teacher walkthrough: Northline's Monday pack

Use the tables above as the worked example. A reviewer who was not in the room should find I3, see that it is a POST, see the supervisor role, see the hold, and see that a repeated key does not create a second receipt. They should find the Power BI visual and read a batch date. They should find one risk, the double receipt, and the control. If they cannot, the pack is still a drawing.

A second workplace case

A smaller site only sells through the ERP screen. It has no webshop and no agent. Copying Northline's five interfaces would fake scope. That site's inventory is I1 and the batch into Power BI. I3, I4, I5, and the agent are out of scope until a later decision. The rubric still applies to the rows they do claim.

Failure example: a poster of logos

Symptom: The slide shows ERP, a cloud, Power BI, and a chatbot logo. There is no method, no role, and no batch equation. A receipt doubles the next week.

Diagnosis: The pack cannot be operated. The root cause is a diagram with no inventory and no stop rule.

Correction: Replace the slide with the tables in this lesson. Where a cell is unknown, write "unknown" and the date it will be filled. Do not borrow Northline's 99-of-100 target as if you had measured it.

Validation: The rubric is at least 2 on architecture, inventory, and security, and a test duplicate event changes stock once.

Guided practice: finish two cells

Scenario: The batch read 200 item rows, landed 200, rejected 0. Source count is 200. An agent proposes post_receipt for 5 units and nobody has clicked approve. Figures are illustrative.

Hints:

Complete solution:

The batch is completed. Power BI may refresh and must show the batch date and the fact "on hand." The agent proposal is a write, so the gate returns hold. No receipt is posted. The audit row shows the hold and no 201. Validation: ERP receipt count is unchanged, and the visual's date matches the batch.

Independent practice

Build a pack for one real integration or for a fictional company you name.

Acceptance criteria:

Common mistakes

  • A diagram that includes tools you will not operate.
  • One admin key "for the capstone demo."
  • Refreshing the report when the batch failed.
  • Treating a chatbot paragraph as a posted ERP document.

Quick check

  1. What sits between the ERP and the warehouse in the diagram?
  2. Which inventory rows are writes?
  3. What must a Power BI visual show besides the number?
  4. An agent proposes a receipt and there is no approval click. What is posted?
  5. What is the first rollback step for a bad batch?

Answers:

  1. The API layer, with method, status, validation, and identity.
  2. I3 and I4. I5 is a signal, not a second write of the quantity.
  3. The fact name and the batch date.
  4. Nothing. The gate holds.
  5. Do not refresh Power BI. Keep the previous landed table. Re-run after the reject list is fixed.

Lesson summary

The pack is the diagram plus the inventory, identities, flow, matrix, monitors, logs, owner, security rules, risks, rollback, and a 90-day plan. The rubric asks whether a second person can run a duplicate test and a refused tool. Logos do not score.

Bridge to the next lesson

This is the last lesson in the course. There is no next lesson. Use the checklist on one integration you actually operate. Keep any figure you did not count marked as illustrative.