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
- Draw the path from ERP to API to warehouse to Power BI to Copilot to an agent.
- List the APIs, the identity on each, and the data that may cross.
- Write the monitor, the log, the risks, and the rollback.
- Score the pack with the rubric instead of calling it finished because the diagram looks complete.
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 personPower 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
| Id | Method and path | System of record | Identity role | Write? |
|---|---|---|---|---|
| I1 | GET /items/{sku} | Warehouse | analytics-read | No |
| I2 | GET /accounts/{id} | ERP | webshop | No |
| I3 | POST /receipts | ERP | warehouse-supervisor | Yes |
| I4 | POST /sales-orders | ERP | webshop | Yes |
| I5 | Webhook goods.received | ERP | webhook receiver | Signal 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
- I1 pages item balances into the night batch. The fact is on-hand, with
as_of. - I3 posts a receipt only after human approval. The webhook I5 tells the webshop to refresh. It does not add quantity by itself.
- The warehouse table stores landed rows. Power BI's visual is titled "On hand, landed batch" plus the batch date.
- Copilot may draft a sentence about that visual. It may not call I3.
- The agent may call I1 without a second click. I3 and I4 wait for approval.
Integration matrix
| From | To | Pattern | Identity | Idempotency |
|---|---|---|---|---|
| Warehouse | API | Request | analytics-read | GET |
| Webshop | ERP accounts | Request | webshop | GET |
| Supervisor | ERP receipts | Request after approval | warehouse-supervisor | receipt key |
| ERP | Webshop | Webhook | documented check | event_id |
| API | Warehouse | Batch | analytics-read | batch window |
| Warehouse | Power BI | Read the landed table | report reader | Not a write |
| Person | Agent | Tool proposal | role on the tool | Write 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
| Risk | How you notice | Control |
|---|---|---|
| Double receipt | Two resource ids for one business key | Idempotency key and event id |
| Short page marked successful | rows_read below the source count | Batch equation, dashboard stays on the last good batch |
| Token in a log or prompt | Search finds Bearer | Logger filter, secret store, rotation |
| Agent writes without a person | Audit row has no approver | Hold on POST, PUT, PATCH, DELETE |
| Name-matched duplicate customer | Two account ids, similar names | Match on account_id only |
| Stale Power BI title | Visual has no batch date | Title includes the fact and the date |
Rollback strategy
Rollback is per change, not "turn integration off" as the first move.
- A bad release of the API: run the previous pinned build. In-flight idempotency keys still resolve to the original resource ids.
- A bad batch: do not refresh Power BI. Leave the previous landed table in place. Fix the reject list and re-run the window.
- A bad receipt: the ERP owner reverses that receipt id. The webhook then refreshes the copy. Do not subtract the quantity in the webshop by hand.
- A leaked token: revoke it, rotate, and confirm new logs are clean. Do not keep the old token "until the sprint ends."
Implementation roadmap
Illustrative 30, 60, and 90 days. Dates are a plan, not a promise to a regulator.
- Days 1–30: inventory I1–I5 written down, roles created, one GET in production with the log fields. Done when 100 test reads match the warehouse screen.
- Days 31–60: receipt POST with approval and idempotency, webhook with event id. Done when a duplicated event changes on-hand once.
- Days 61–90: batch equation, Power BI title, agent read tool, write tool behind approval. Done when a refused off-list tool creates no HTTP call and the dashboard shows the batch date.
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.
| Row | 0 | 2 | 3 |
|---|---|---|---|
| Architecture | No system of record | Diagram names ERP, API, warehouse, report, assistant | A colleague can point to the write stops |
| Inventory | Tools without methods | Methods and roles listed | Each write has an idempotency identity |
| Security | Shared admin secret | Roles and header-only secrets | Off-list tools and unverified webhooks refused |
| Operations | Green mark only | Counts and a correlation id | Retry attempts distinguished from business results |
| Rollback | "We will see" | Previous build and batch hold named | A receipt rollback names the ERP reversal |
Self-review checklist
- [ ] The diagram matches the inventory. No extra arrow.
- [ ] Every write has an identity, a role, and an approval rule.
- [ ] Pagination and the batch equation are stated.
- [ ] Logs exclude secrets. The correlation id is named as a choice.
- [ ] Power BI titles the fact and the batch.
- [ ] Copilot drafts are not API calls. Agent writes wait.
- [ ] The risk register has a control you could demonstrate.
- [ ] Rollback does not say "edit the webshop quantity by hand."
- [ ] Targets and field names copied from Northline are marked illustrative when they are not your measurements.
- [ ] No universal legal duty or vendor schema was invented.
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:
- Score the batch.
- Score the agent gate.
- Say what Power BI may do.
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:
- The diagram includes only systems you can name.
- The inventory has method, system of record, role, and whether it writes.
- The authentication model separates people and systems.
- The data flow states one fact the report shows.
- The matrix includes idempotency for every write.
- Monitoring has at least two counts you can recompute.
- Logging lists excluded fields.
- Governance names one owner.
- Security includes least privilege and the 401/403 split.
- The risk register has at least three risks with controls.
- Rollback covers a bad batch and a leaked secret.
- The roadmap has a "done when" for each slice.
- You score the rubric and you do not award a 3 without a check a second person could run.
- You invent no legal requirement and no universal vendor schema.
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
- What sits between the ERP and the warehouse in the diagram?
- Which inventory rows are writes?
- What must a Power BI visual show besides the number?
- An agent proposes a receipt and there is no approval click. What is posted?
- What is the first rollback step for a bad batch?
Answers:
- The API layer, with method, status, validation, and identity.
- I3 and I4. I5 is a signal, not a second write of the quantity.
- The fact name and the batch date.
- Nothing. The gate holds.
- 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.