HTMLCSSJAVASCRIPTANGULARINTERVIEW QUESTIONSSQLPYTHONJAVAPHPHOW TOW3.CSSCC++C#BOOTSTRAPREACTNEXTJSMYSQLJQUERYEXCELXMLDJANGONUMPYPANDASNODEJSDSATYPESCRIPTANGULARJSGITPOSTGRESQLMONGODBASPAIRGOKOTLINSWIFTSASSVUEGEN AIAGENTIC AIPROMPT ENGINEERINGDOCKERKUBERNETESSPRINGSPRING BOOTUNIXSCIPYAWSCYBERSECURITYDATA SCIENCEINTRO TO PROGRAMMINGINTRO TO HTML & CSSBASHRUSTTOOLS
AI-Powered Full Stack Tutorial 0/70 lessons ~6 min read Lesson 44“React, Next.js, Node, PostgreSQL, LLMs, RAG, agents, and production AI apps”
Connecting AI Applications to Business APIs
Priya, a learner at Northwind, asks the TechLearningPro operations assistant why her invoice still shows a seat she dropped.
Course progress0%
Focus
24 guided sections
Practice signal
Examples included
Career prep
Interview Q&A included
AI-Powered Full Stack Development · Lesson 44 · AI Agents, Workflow Automation and Integrations
Lesson Overview
Priya, a learner at Northwind, asks the TechLearningPro operations assistant why her invoice still shows a seat she dropped. The model answers with a fluent plan: look up the enrollment, read the invoice, and "POST the refund to whatever URL is in the prompt." That last step is the bug this lesson exists to make impossible. A business API is a system of record. Billing, enrollment, and outbound mail keep money, access, and messages. The model may name an operation. It may not choose the host, the credential, the tenant, or the HTTP method.
Lessons 36 through 43 taught tool schemas, executors, state, multi-step runs, LangChain and LangGraph as optional runtimes, streaming UI, and MCP as a tool catalog. This lesson is the adapter those runtimes call when the tool is a real product API. The function is executeBusinessCall. It resolves a registered operationId, checks the tenant allow-list, validates arguments, and runs a read. A write returns needs_approval and does not open a socket. Lesson 45 is the approval gate. Lesson 46 is the retry and budget policy around this call. The Module 4 capstone composes all three.
Planning assumptions:
Ports in the lab are in-memory fakes. The composition root wires billing, enrollment, and messaging hosts.
Catalog version is business-connectors-v1. Illustrative read timeout is 3 seconds. Re-read each vendor's limit when you bind a host.
Credentials are secret handles such as billing/northwind. The lesson never contains a token, a connection string, or a live base URL.
The model proposal is JSON with operationId and args. Fields named url, headers, authorization, or secret are rejected.
Fixtures use synthetic learner and invoice ids. No customer payloads.
The knowledge assistant from Production Knowledge Assistant Capstone stays a read. knowledge.answer can sit in the same catalog later. It is not a billing client.
Learning Objectives
By the end of this lesson you will be able to:
Explain why a model must name a registered operation instead of a URL.
Classify each business operation as read, write_reversible, or write_irreversible.
Implement executeBusinessCall against a connector port and an operation catalog.
Reject proposals that carry a host, a header, or a secret field.
Enforce a per-tenant operation allow-list before any upstream call.
Validate arguments with a server schema, including length and id shape.
Scope reads so a Northwind session cannot load a Contoso invoice.
Return needs_approval for writes with a connector call count of zero.
Apply a timeout and map upstream failures to typed reasons.
Keep idempotency keys on the call so a later approval can replay one effect.
Pass a secret handle to the adapter and omit that handle from traces.
Trace operation id, tenant id, latency, and status without response bodies.
Separate the MCP or LangChain tool wrapper from the connector that holds authority.
Test unknown operations, cross-tenant ids, write short-circuits, and timeouts without a vendor account.
State which writes this lesson refuses to execute, and which lesson will execute them.
You can run Node's test runner. You do not need a billing, CRM, or email vendor key.
What is a Business API Connector?
A business API connector is the server adapter that performs one allow-listed operation against a system of record. Billing, enrollment, CRM, and messaging are the systems. The connector's purpose is to make those calls boring: fixed hosts, fixed credentials, typed arguments, typed errors, and a hard stop on anything the catalog marks as a write.
The connector exists because tool-calling demos treat "the model emitted JSON" as authority to call fetch. A prompt can contain a URL. A retrieved page can contain a URL. An MCP server someone installed can point at a URL. The product needs a layer that has never heard of those URLs. executeBusinessCall hears operation ids that your team registered.
Historically, integration code lived in workers and BFF routes with human-written clients. Agents made the client selection probabilistic. The history that matters here is short: the same controls you already use for a support console — least privilege, tenant scope, idempotency, timeouts — must sit in front of the model, because the model is now one of the callers.
Term
Meaning in this lesson
Operation id
Stable name such as billing.invoice.read
Catalog
The map of operation id to effect class, timeout, and argument rules
Allow-list
Operation ids a tenant policy permits
Effect class
read, write_reversible, or write_irreversible
Secret handle
A name the composition root resolves. Never a token
Proposal
Model JSON: operation id and args. No transport fields
Upstream
The business system behind the port
needs_approval
The write result this lesson returns without a network call
Hosts and credentials live in the composition root, so a prompt cannot move them.
A new vendor is a new adapter behind the same operation id, which matches the portability lesson.
Support can explain a refusal: the operation is unknown, not allowed, invalid, or waiting on a person.
Lesson 45 can trust that a write has not already happened when it opens an approval.
Traces stay safe to ship to a log vendor because they omit bodies and secrets.
Real World Example
Sam, a Northwind support agent, asks the assistant for Priya's enrollment and the open invoice. The session scope is Northwind. The proposal is { "operationId": "enrollment.lookup", "args": { "learnerId": "lrn_priya" } }. The catalog marks the operation as a read. The fake upstream returns the seat for pgvector because that row's tenant is Northwind. A second proposal, { "operationId": "billing.invoice.read", "args": { "invoiceId": "inv_contoso_1" } }, returns not_found. Contoso's invoice is not in the Northwind adapter's query. A third proposal names billing.refund.create. The function returns needs_approval and the test's upstream counter stays at the earlier read.
The same shape is how a bank assistant may read the caller's accounts and must stop before a wire, how a clinic portal may read the chart the clinician can open and must stop before an order, and how Amazon-style and Shopify-style commerce assistants quote an order the account owns before any refund workflow. Netflix-style account help can read the plan the subscriber can see. Microsoft 365 and Google Workspace connectors read the mailbox or drive the signed-in user can already open, and they still do not let the model pick the OAuth token. TechLearningPro's version reads enrollment and invoices. Refunds and outbound mail wait.
Internal Working
If featureEnabled is false, return disabled. Do not resolve a secret or call upstream.
If tenantId or userId is empty, return unauthorized.
Parse the proposal. Missing operationId, a non-object args, or any transport key (url, baseUrl, headers, authorization, secret, token) returns invalid_args.
Look up the operation in the catalog. Ids that parsed but are not registered return unknown_operation.
If the tenant allow-list does not contain the id, return not_allowed.
Validate arguments for that operation: string ids, max length 80, pattern ^[a-z0-9_]+$. Extra keys are rejected.
If the effect class is write_reversible or write_irreversible, return needs_approval with the effect class. The upstream port is not called.
For a read, require a non-empty idempotencyKey so the workflow can correlate the trace. Reads are safe to repeat. The key is still stored so support can find the call.
Call the port with { tenantId, operationId, args, secretHandle, timeoutMs }. The handle comes from the server config for that tenant and operation, never from args.
On a thrown timeout, return timeout. On a thrown upstream error, return upstream_unavailable. On a scoped miss, return not_found.
Trace tenantId, operationId, effect, status, and durationMs. Omit args values that are email addresses, omit upstream bodies, and omit the secret handle.
Architecture
flowchart TB
subgraph client [Browser]
Panel[Operations panel]
end
subgraph server [TechLearningPro API]
Parse[parseProposal]
Catalog[Operation catalog]
Allow[Tenant allow-list]
Exec[executeBusinessCall]
end
subgraph adapters [Composition root]
Enroll[Enrollment adapter]
Bill[Billing adapter]
Mail[Messaging adapter]
end
subgraph records [Systems of record]
EnrDb[Enrollment]
BillDb[Billing]
Mailer[Mail transport]
end
Panel --> Parse
Parse --> Catalog
Catalog --> Allow
Allow --> Exec
Exec --> Enroll
Exec --> Bill
Exec --> Mail
Enroll --> EnrDb
Bill --> BillDb
Mail --> Mailer
text
Session scope + proposal + idempotencyKey
|
v
Flag, identity, transport-field rejection
|
v
Catalog lookup and tenant allow-list
|
v
Argument schema
|
+--> write --> needs_approval, zero upstream calls
|
v
Read through the port with secret handle + timeout
|
+--> other tenant --> not_found
+--> timeout --> timeout
|
v
Scoped DTO + trace ids
Request flow never forwards the raw model JSON to the vendor. Response flow to the panel is the connector result. The vendor JSON stays inside the adapter, which maps it to the DTO.
Deep Dive
The catalog is the allow-list of effects
business-connectors-v1 ships five operations:
Operation
Effect
Upstream in production
enrollment.lookup
read
Enrollment service, filtered by tenant_id
billing.invoice.read
read
Billing service, filtered by tenant_id
billing.refund.create
write_reversible
Billing service, after Lesson 45
messaging.email.send
write_reversible
Mail transport, after Lesson 45
messaging.email.cancel
write_reversible
Mail transport, only for a queued message
An irreversible example you should register the same way, and still not execute here, is certificate.issue. Issuing a certificate is hard to undo. The class tells Lesson 45 which approval policy to load. It does not tell this function to become creative.
Adding an operation is a code change: a catalog row, an argument validator, an adapter method, and a test. A prompt that invents billing.refund.all fails unknown_operation.
Proposals are data
parseProposal accepts a string or an object. It returns invalid_args when the payload is an array, when operationId is not a string, or when any key in a denylist appears anywhere in the top-level object or inside args. The denylist is the point of the lesson. url feels helpful in a demo and is the SSRF bug in production. Headers are how a model would launder a stolen token into your process.
The idempotency key is a separate argument on executeBusinessCall, supplied by the workflow, so the model cannot swap it for a key that collides with another tenant's effect. The lab still checks that the key is 8 to 80 characters of [A-Za-z0-9_-].
Tenant scope is inside the adapter
The function passes tenantId from the session into the port. The adapter must put that value in the query or the vendor's account id. Returning a row and then filtering in the orchestrator is too late if the log line already contains the other tenant's email. The fake in the test stores rows with a tenant and returns not_found when they differ. Production SQL uses the session tenant the same way Lesson 34's predicate uses it for chunks.
The composition root resolves the handle with your secret manager at process start or on a short cache. executeBusinessCall receives the handle string only so the port signature stays explicit in tests. The trace drops it. A unit test asserts the trace object has no secret field and that the upstream request has no authorization copied from the proposal, because the proposal never had one.
OAuth client-credentials and API keys are both handles. The model is not in the token exchange. Least privilege means the billing read token cannot call refund, even if a bug skipped needs_approval. Separate credentials per effect class make that bug survivable.
Reads now, writes later
This split is deliberate. If the connector executed refunds as soon as the model asked, Lesson 45 would be an audit of damage. needs_approval includes the operation id, the validated args, the effect class, and the idempotency key. Lesson 45 stores that payload on the ticket. The executor later calls the same port with an approvalId the connector of this lesson does not accept. You will add executeApprovedBusinessCall in the next lesson so a read path cannot be confused with a commit path.
MCP, LangChain, and HTTP clients
An MCP tool named billing_invoice_read can wrap executeBusinessCall. The MCP server still must not accept a URL argument. A LangChain DynamicStructuredTool does the same. The framework is a caller. The catalog is the policy. Importing fetch inside a tool callback that interpolates model strings is a review failure, the same way a vendor SDK import inside the Lesson 35 orchestrator was a review failure.
Timeouts and error mapping
The port races the upstream with timeoutMs from the catalog. The lab uses 3_000. A timeout is timeout, which Lesson 46 may retry because the operation is a read. A 404 scoped to the tenant is not_found, which is a successful security outcome and must not be retried into a broader query. A 429 or a 5xx is upstream_unavailable. The connector does not implement the retry loop. Doing both here and in the guardrail lesson double-counts attempts.
Traces
ConnectorTrace fields: tenantId, userId, operationId, effect, status, durationMs, catalogVersion. When status is needs_approval, durationMs is the validation time and upstreamCalled is false. Do not attach invoice amounts, learner emails, or argument objects. Support who need the body use the system of record, under their own authorization.
Code Examples
Place the connector in packages/connectors/src/. The composition root is the only file that reads secret material and constructs real adapters.
Simple example: catalog and proposal parsing
packages/connectors/src/catalog.ts
typescript
/** Catalog version. A new operation is a new version, not a silent map edit. */
parseProposal accepts billing.refund.all as a string. executeBusinessCall then returns unknown_operation and does not call upstream. A url key is invalid_args even when the operation id is real. That is the SSRF check.
The read port is one function so tests can count calls. Production splits it by adapter, and the composition root switches on operationId after this lesson's checks have passed.
The fake applies tenant equality before it returns a label. The refund test is the contract Lesson 45 builds on: zero upstream calls. The URL test is the SSRF contract.
In production the API process constructs ConnectorPorts once. Northwind's policy row lists the four operation ids in the test, and the secret manager holds billing/northwind and enrollment/northwind with read scopes. The billing adapter sets the vendor account id from tenantId and requests the invoice. The trace table receives status and duration. A dashboard pages when timeout or upstream_unavailable exceeds a threshold for five minutes. The runbook's first move is the feature flag, which stops new calls. The second is the vendor status page. The third is to keep writes on needs_approval rather than to "temporarily" execute them because the queue is long.
Sam can see Priya's seat. Sam cannot see Contoso by changing invoiceId. A synthetic probe in CI asks for inv_contoso_1 with a Northwind scope and expects not_found and an empty body in the trace.
Challenge: the billing vendor is down, the tenant is in a strict privacy review, and the model was jailbroken to include https://billing.internal/refund. The URL path returns invalid_args with no call. The outage path returns upstream_unavailable for reads and still returns needs_approval for refunds, because the write check happens before the port. Privacy review means traces already omit amounts and emails, so you do not add a debug flag that logs args. If Northwind's contract forbids a second billing vendor, you do not fall back to one inside the timeout branch. That fallback is a policy change, not an error handler.
Performance Optimization
Reads are one upstream call plus validation. Validation is CPU and should stay in front of the network so invalid proposals do not occupy vendor rate limit. Do not retry inside executeBusinessCall. Lesson 46 owns backoff, and only for reads. Cache a read only with a key of tenant, operation, and argument hash, and only when the product can tolerate a stale invoice. Enrollment status during a drop-seat flow should skip the cache.
Set timeoutMs from the catalog so a stuck vendor cannot pin a Node request. Bound learnerIds at 50 so a "remind everyone" proposal cannot turn one tool call into a 10,000-row read. Fan-out of emails is a workflow with approval, not a larger timeout.
The panel should not call this endpoint to render the lesson player. Connector latency must not sit on the document path. Staff tools call it from the operations panel, which can show a pending state.
Connection reuse belongs in the adapter (keep-alive on the vendor client). The orchestrator does not open a new client per call. That is a composition-root concern, and it is where you also cap concurrency per tenant so one Northwind incident cannot consume the global billing quota.
Security
Authentication. The route builds SessionScope before the call. Empty identity returns unauthorized.
Authorization. The allow-list is tenant policy. The adapter filters by tenantId. Role checks for who may invoke the panel sit on the route. The connector still refuses writes.
SSRF. Transport keys fail parsing. Hosts live in adapters.
Secrets. Handles are names. Tokens stay in the secret manager. Traces omit handles.
Injection. Operation ids are a closed union. Argument strings are id-shaped. Template ids are constants, so the model cannot supply the email body.
BOLA. A foreign invoice id is not_found inside the adapter, not a filter after a full-table read.
Least privilege. Read credentials cannot refund. Write credentials are not loaded on this path.
Logging. Status, ids of operations, duration. Not payloads.
Disable.featureEnabled comes from the server. The body cannot turn it on.
OWASP issues that match this path are SSRF, broken object level authorization, injection into a privileged client, and sensitive data exposure in logs. The controls are the catalog, the tenant filter, the transport denylist, and the trace shape.
Common Mistakes
Letting the model pass a URL. Symptom: the server calls a host from the prompt. Cause: the tool schema had a url string. Fix: denylist transport keys and keep hosts in the adapter.
Executing refunds because the JSON schema was valid. Symptom: money moves before a person looks. Cause: "the tool succeeded" was treated as approval. Fix: effect class write_* returns needs_approval and the call count stays zero.
Filtering tenant after the vendor responds. Symptom: another tenant's email appears in a log. Cause: the adapter fetched by id globally. Fix: put tenantId in the vendor query and return not_found.
Putting the API token in the prompt "so the model can help." Symptom: the token shows up in a trace vendor. Cause: the secret was an argument. Fix: secret handles in server config.
Retrying a write inside the connector. Symptom: two refunds for one click. Cause: a 5xx was looped with no idempotency. Fix: this function does not retry. Writes wait for Lesson 45.
Accepting raw email addresses from the model. Symptom: the model emails an attacker-supplied inbox. Cause: to was a free string. Fix: learnerIds plus a server template id.
Logging the upstream body on error. Symptom: invoice amounts in the log platform. Cause: console.log(error.response). Fix: trace status and operation id.
One shared credential for every tenant. Symptom: a bug in the query still presents a token that can read Contoso. Cause: a single global key. Fix: a handle per tenant and per effect class.
Treating MCP installation as a security review. Symptom: a community server gains your billing token. Cause: the token was in the MCP process env. Fix: MCP wrappers call executeBusinessCall and hold no write credential.
Using not_found as a signal to drop the tenant filter. Symptom: the "fix" for an empty read returns more rows. Cause: an empty set looked like a bug. Fix: not_found is a valid result.
Allowing extra argument keys. Symptom: { learnerId, url } passes validation. Cause: the validator checked only required fields. Fix: exact key sets.
Caching reads without the tenant in the key. Symptom: Northwind sees Contoso's cached invoice. Cause: the cache key was the invoice id. Fix: include tenant and operation.
Best Practices
Register every operation in a versioned catalog.
Classify effect before you write the adapter.
Parse proposals with a transport denylist.
Take identity from the session.
Take the allow-list from tenant policy.
Validate arguments with closed key sets and id patterns.
Return needs_approval for every write in this function.
Pass tenantId into the vendor query.
Resolve credentials by handle in the composition root.
Use separate credentials for reads and writes.
Set timeouts from the catalog.
Map vendor errors to a small reason union.
Leave retries to the guardrail layer.
Require an idempotency key even on reads, for correlation.
Trace status and duration, not bodies or handles.
Bound list arguments.
Keep template ids as constants when the operation can cause a message.
Wrap LangChain or MCP tools around this function.
Fail closed when the secret handle is missing.
Test cross-tenant ids, transport keys, writes, and the feature flag.
Do not put the connector on the lesson-player render path.
Document business-connectors-v1 next to the catalog constant.
Probe production with synthetic tenants, not customer invoices.
Interview Questions & Answers
Beginner
What is an operation id, and why not a URL?
An operation id is a name your team registered, such as billing.invoice.read. A URL is an address the model can be tricked into choosing. The connector maps the id to a host that lives in server code. If the id is unknown, the call stops.
What does this lesson do with a refund proposal?
It validates the arguments and returns needs_approval. The upstream port is not called. A person and an audit row come in the next lesson. A valid schema is not permission to move money.
Where does the API token live?
In a secret manager, addressed by a handle such as billing/northwind. The model proposal cannot contain it. Traces do not record the handle.
Intermediate
How do you stop a Northwind session from reading a Contoso invoice?
The session tenant is passed into the adapter, and the adapter's query includes that tenant. A foreign id returns not_found. Filtering after a global fetch is too late, because logs and vendor audit already saw the row.
Why reject extra JSON keys?
A model that is allowed to add fields will add url or authorization beside a valid learnerId. Exact key sets make the smuggled field invalid_args. The denylist is the backstop for the same bug at the top level.
Why are email recipients learner ids?
A free-form to address lets a prompt redirect mail. The server loads addresses for ids that belong to the tenant when Lesson 45 executes the send. The model picks a template id from a constant, not the message body.
Senior
How do you test this without a billing vendor?
Fake ports.read. Count calls. Assert a refund counts zero. Assert a foreign tenant id is not_found. Assert a url field never reaches the fake. Contract-test the real adapter in a staging account with fixture invoices, and record the vendor doc date on the adapter.
What is the relationship to MCP?
MCP can publish the operation as a tool. The tool implementation calls executeBusinessCall. The MCP process does not receive the write credential and does not accept a host argument. Installing a server is not a review of your billing policy.
Architect
How do you add a second billing vendor for one tenant?
You add an adapter behind the same operation id and select it in the composition root from tenant config. You do not add a model argument named vendor. A timeout does not switch vendors. A vendor change is a config release with its own credential handle.
What should you refuse to cache?
Writes, and any read whose staleness changes money or access during the same staff task. A cached invoice that still shows a dropped seat will cause a wrong refund proposal. If you cache enrollment for a dashboard, include tenant and operation in the key and a short TTL, and skip the cache on the action path.
How does this lesson sit next to the knowledge assistant?
The assistant answers from authorized passages and does not call billing. The connector reads business records and does not call the model. A workflow may call both. Neither function should import the other's vendor client. The capstone in Lesson 47 is the place they meet, behind the same scope object.
What fails closed?
Disabled flag, empty identity, bad idempotency key, transport fields, unknown operations, allow-list misses, invalid args, and a missing secret handle. Each returns a reason and does not call upstream. An unexpected throw from the adapter should be mapped to upstream_unavailable at the route, not to a 200 with an empty object.
Knowledge Check
1. What problem does this capability solve?
It lets an assistant use enrollment, billing, and messaging without giving the model a host, a credential, or the ability to commit a write. Reads are scoped. Writes stop at needs_approval.
2. What alternatives exist, and when would you choose each?
A hand-written route is enough when a human clicks a button you rendered. A connector catalog is what you want when a model selects the operation. Direct vendor SDKs inside a tool callback fit a local demo and should still call this function before production. Webhooks are inbound events, a different port, with signature checks. They are not how the model initiates a refund.
3. Which data, identity, and trust boundaries matter?
The server supplies scope, the allow-list, the secret handle, and the feature flag. The model supplies an operation id and ids that must match a schema. The upstream is trusted only after the tenant filter. Traces store status, not payloads.
4. What can fail, and how should the system respond?
Disabled, unauthorized, invalid, unknown, and not-allowed return reasons and do not call upstream. Writes return needs_approval. Foreign ids return not_found. Timeouts and 5xx return typed upstream failures. The function does not retry and does not widen the query.
5. How would you test quality, security, performance, and cost?
Unit tests cover the matrix above and assert call counts. Security tests assert transport keys and foreign tenants never yield rows. Performance tests assert one upstream read and a bounded id list. Cost tests assert writes and invalid proposals do not call a vendor that bills per request.
Practical Exercise
Implement packages/connectors/src/ and run the tests. Add a case where messaging.email.send includes a third argument note and assert invalid_args with zero calls. Write three sentences on how your composition root will resolve billing/northwind without importing a secret into execute.ts.
Deliverable and Rubric
Submit the sequence diagram, the connector package, the test output, a note on which operations are reads, and a list of fields you refused to trace.
Area
Weight
Conceptual accuracy and architecture
20%
Working implementation and code quality
25%
Security, privacy, and responsible AI
20%
Testing, reliability, and observability
20%
Documentation and decision rationale
15%
Production checklist:
Scope comes from the session.
Feature flag short-circuits calls.
Proposals cannot carry URLs, headers, or tokens.
Operation ids come from business-connectors-v1.
Tenant allow-lists are server config.
Argument keys are exact.
Writes return needs_approval with zero upstream calls.
Reads include tenantId in the vendor query.
Secret handles are names, and traces omit them.
Timeouts are catalog values.
The function does not retry.
The lesson player does not depend on this endpoint.
Key Takeaways
A business connector runs registered operations, not model-supplied URLs.
The catalog version is business-connectors-v1.
Effect class decides whether this function may call upstream.
Reads are tenant-scoped. Foreign ids are not_found.
Writes return needs_approval and do not open a socket.
Transport keys fail the proposal.
Credentials are handles resolved in the composition root.
Templates and learner ids keep the model away from raw emails.
Timeouts are typed. Retries belong to Lesson 46.
Traces store status and duration, not bodies or secrets.
MCP and LangChain are callers of this function.
A missing secret handle fails closed.
Extra argument keys are invalid.
The knowledge assistant remains a different read path.
Lesson 45 is the only path that should commit a write.
Summary
Lesson 44 puts TechLearningPro's billing, enrollment, and messaging behind a catalog the model cannot extend at runtime. executeBusinessCall is the seam: parse, allow-list, validate, read or stop. Systems of record stay in adapters that already know the host and the tenant. Refunds and email are visible as proposals and invisible as effects until a person approves them. That split is what makes the next lesson an approval workflow instead of an incident review.
Next Lesson Preview
Next is Human Approval, Audit Trails and Reversible Actions. You will turn needs_approval into a ticket a support lead can approve, an append-only audit row, and a compensation path for a refund or a queued email. The connector you just built stays the only code that talks to the vendor. Approval will not be a second HTTP client with a weaker allow-list.