Bỏ qua để đến nội dung

The Contract Decided in the First Weeks

Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.

Module 5 of 8 in the chapter Enterprise Integration Architecture, chapter 18 of the Integration Architect course. Each module stands on its own. Previous: API-Led Connectivity and the Canonical Model · Next: Gateways and API Management

The question this module answers: When a middleware team reaches into Salesforce, who owns Salesforce’s side of the middle, and why does a company need to decide that early, and once?

Their Team Knows Your Inner Workings, or It Doesn’t

Section titled “Their Team Knows Your Inner Workings, or It Doesn’t”

You’ve met this decision twice already. In chapter 1 it was a decision about the boundary: where one team’s responsibility stops and the other’s starts. In chapter 8 it was a decision about the door: Salesforce’s standard API, or your own Apex REST contract, with the project where we built our own and logged every call.

Here’s how I put it in class: it’s a big decision, and it comes down to one question. Am I going to have my middleware team know my inner workings, or not know my inner workings?

This module looks at the same question with the whole enterprise around it. With one project and one team, it’s a design choice. With forty teams and a middle that every one of them depends on, it’s a choice about who owns what, for years.

Put the decision on module 4’s layers, and it becomes very concrete. Either way, there’s a system API for Salesforce in the middle. The question is who builds it, and what it knows.

With the standard API, the middleware team builds Salesforce’s system API themselves, directly on your objects and fields. Their system API knows that a delivery is a Work Order, with these fields, saved in this order, with these validation rules. Your org’s inner workings now live in their code, on their side of the boundary.

With your own contract, the Salesforce team builds a door like save manifest and get delivery in Apex REST, and that door is what the middleware’s system API calls. The middleware’s system API becomes thin. It knows the contract, not your objects. Your inner workings stay on your side.

Neither is free. Somebody has to understand the org, and somebody has to change code when the org changes. The decision is which team that is.

In class I say this needs to be decided in that very first week or two of the project, while you’re in the design phase. Here’s why it can’t wait.

Everything else gets built on top of it. The middleware team writes its mappings against whatever Salesforce’s side looks like. The process APIs call those mappings. The tests, the error handling, the performance test plan and the monitoring all assume one shape or the other. Six weeks in, switching means redoing all of it.

And it decides who you need on the project. If it’s your own contract, there need to be some good Apex programmers on the Salesforce side, from the start. If it’s the standard API, the middleware team needs people who understand Salesforce’s data model, its limits and its rules. You can’t staff either one in week eight.

So in the first week, put the two teams in one room and decide it. Not by default, and not by whichever team starts building first.

The way I summed it up for the class: either you have very tight teams, where they use the standard API, or you create the contract, and then you stand that up.

Each choice comes with commitments. Write them down when you decide, because each team is agreeing to something.

They call the standard APIThey call your contract
Who knows the orgThe middleware team: your objects, fields, picklist values and the order to save themThe Salesforce team, behind the door
What the Salesforce team commits toThe middleware team is in your meetings. Every new object, renamed field and changed picklist value is announced before it ships, because otherwise it’s going to breakGood Apex developers; a contract that’s versioned, so a change is a new version, not a surprise (chapter 3 module 2); the code, its tests and its errors
What the middleware team commits toTaking responsibility for the errors, since they’re working in your objects; testing in a sandbox ahead of every Salesforce release (chapter 14 module 9)Calling only the contract; moving to a new version when the old one is retired
What you getNothing to build on Salesforce’s side; a fast startA separation of responsibility; one place on Salesforce’s side to log every call (chapter 14 module 2)
It fits whenThe teams are tight: one team, or two that sit together, on a stable orgSeparate teams or companies, an org that changes often, an integration that will live for years

Chapter 1’s picture draws the two side by side.

Here’s what changes at enterprise scale. If every project decides this from scratch, you end up with both: some middleware APIs built on your objects, some on contracts, each with its own team habits, and nobody sure which is which when a field needs renaming.

So decide it once, for the company, as a standard. Something like this:

Outside teams reach Salesforce through a contract the Salesforce team owns. The standard API is allowed when one team owns both sides and sits together, and the decision is recorded.

You can set the default the other way, if your teams really are tight. What matters is that there is one, that it’s written down, and that every exception is a decision someone made on purpose, in the first weeks, with a name next to it.

Put the decision in the design record for each integration (chapter 16 module 6): which choice, who decided, and what each team committed to. When the org changes two years from now, that’s the page someone will look for.

Test knowledge. Expect a scenario where an outside team or middleware needs to work with Salesforce data, and the question is how to keep the integration from breaking when the org changes. Know the trade: calling the standard APIs is fast to start but ties the caller to your objects and fields; a custom Apex REST service is more work on Salesforce’s side but hides the org behind a stable contract. And know when each one fits.

Beyond the exam: what AI changes. An AI that writes integration code makes the standard API look even easier: ask it for a MuleSoft flow that writes deliveries into Salesforce, and it will reach straight into your objects. That’s the “know my inner workings” choice, made without anyone deciding it. If your company’s default is a contract, give the AI the contract, not the object model.

  • Whether outside teams know your inner workings: the standard API, or a contract the Salesforce team owns.
  • When: in the first week or two of the project, with both teams in the room.
  • What each team commits to, written down: meetings and change notices, or versions and Apex developers.
  • The company’s default, and who can approve an exception.
  • Where it’s recorded, in each integration’s design record.