The independent daily for Salesforce admins, developers and architects

Curated by Abhinav (opens in a new tab)

Recommended

Route a voice agent's Salesforce calls through a small endpoint you control (opens in a new tab)

You will learn why a token-renewing middle endpoint suits a voice agent that cannot refresh OAuth tokens itself, how to set up a client credentials External Client App with a locked-down integration user, and how to log call results as Tasks without duplicates.

  1. Agent sends request with bridge key
  2. Endpoint attaches cached Salesforce token
  3. Salesforce returns success or error
  4. Endpoint passes reply back to webhook
  5. Webhook retries temporary failures
How a call result reaches Salesforce through the endpoint

The author treats Salesforce’s reply as the only proof that a call reached the CRM, so any non-success reply should trigger a retry. Because the Salesforce client credentials flow issues short-lived tokens with no refresh token, and the Dograh voice platform stores credentials only as fixed values, the design places a small HTTPS endpoint between the agent and Salesforce. That endpoint holds the Salesforce secret, caches tokens, and checks a fixed bridge key header before doing anything else.

The token logic fetches a token, reuses it, and on a 401 response fetches a fresh one and retries once, so nothing downstream has to handle expiry. For setup, the article recommends starting with an External Client App, since new Connected Apps are restricted from Spring ’26. It advises enabling OAuth and the client credentials flow, running the app as a dedicated integration user with the Minimum Access - API Only Integrations profile, and granting only read on Contacts and Leads plus create on Tasks.

For inbound calls, a pre-call data fetch can search Contacts and Leads by phone number before the agent speaks, matching on the last 10 digits to handle inconsistent formatting. The author warns to keep this fast and to confirm identity with an approved check before using any Salesforce data. After the call, a webhook files a Task on the matched record, with TaskSubtype set to Call at creation since it cannot be changed later. Retries can file duplicates, so the endpoint should track the run_id of filed Tasks and skip repeats. The article closes with testing advice: check View Trace after a live call, and test an unknown caller.

Read the original at dev.to (opens in a new tab)

Worth reading?

Recommended

Salesforce Headless 360 exposes the platform to agents through APIs and MCP (opens in a new tab)

You will learn what Salesforce Headless 360 offers through its three access paths, why governance has to move from the UI to the schema, and how to start a controlled pilot with a Hosted MCP Server.

  1. Pick one workflow
  2. Audit the schema
  3. Connect a sandbox client
  4. Define agent identity and limits
  5. Test, trace and measure
A five-step plan for a first Headless 360 pilot

Salesforce Headless 360 is an architecture that exposes Salesforce capabilities through APIs, Model Context Protocol (MCP) tools and CLI commands, so AI agents, apps and developer tools can use the platform without a browser. Announced at TDX 2026, it keeps the data, workflows and business logic built over 25 years, and the company now also calls the offering Headless Toolkit. Salesforce cites more than 60 MCP tools, 30 preconfigured coding skills, 4,000 APIs and 220 CLI commands, and states that Lightning and the browser remain available for human users.

The piece explains three access paths. APIs serve developers and integration platforms that read and write records. MCP tools let AI clients such as Claude, ChatGPT and Cursor discover and call capabilities at runtime, with no custom integration code written in advance. CLI commands support scaffolding, testing and deployment through DevOps pipelines. MCP tools are further split between coding agents, which read metadata, generate Apex and deploy, and business agents, which reach Salesforce from Slack or other chat clients. Hosted MCP Servers became generally available in April 2026, and the Headless 360 MCP Server followed in beta in July 2026. Every Hosted MCP call runs as the authenticated user through an External Client App with the mcp_api scope, and the article warns that pricing via Flex Credits may bill for usage, so teams should confirm terms with their account team.

For architects, the central change is that governance moves from the screen to the schema. An agent never sees a page layout, so Validation Rules, sharing models, Apex and approvals must carry the controls. The article proposes a four-layer view of experience, access, execution and data, and lists review questions about rule placement, least-privilege Permission Sets, human-only actions and approval points for high-risk actions. It also covers the Headless Experience Layer and Multi-Framework support for React, and notes that agent testing needs evaluation sets, session tracing and the Agentforce Testing Center. MuleSoft supplies governed access to systems outside Salesforce, while Data 360 supplies unified customer context.

The article suggests starting with one workflow, auditing the schema, connecting a sandbox Hosted MCP Server to one client, defining agent identity and limits, and then testing, tracing and measuring results against the manual process. It treats vendor customer stories as reference points only and advises a pilot to generate real evidence.

Read the original at Cloud Odyssey (opens in a new tab)

Worth reading?

Must-read

Salesforce retires the OAuth username password flow and guides migration to client credentials (opens in a new tab)

Readers will learn how to identify integrations still using the retiring authentication method and follow step-by-step instructions to migrate them to supported flows like client credentials or web server with PKCE.

  1. Create an External Client App
  2. Configure the Run As User
  3. Get the Client ID and Client Secret
  4. Update the Authentication Request
  5. Handle Token Expiration
Migration steps to replace the retiring OAuth username-password flow with the client credentials method

Salesforce will retire the OAuth 2.0 Username-Password Flow on February 20, 2027. The flow has an external application send a Salesforce username, password and security token to the token endpoint. Salesforce first announced the change in Spring ’26 and later moved enforcement from Winter ’27 to the Spring ’27 release. The article calls this a breaking change: integrations that still use the flow will fail when they request new access tokens after enforcement, and the failures may go unnoticed, such as a scheduled job that quietly stops updating records. Orgs created in Summer ’26 and later already block the flow, and the article says that an org with no matching release update may already be blocked.

To find affected integrations, the article recommends several checks. Create a Login History view filtered on the OAuth Username-Password login subtype, keeping in mind that history is kept for about six months, so an empty result does not prove that nothing is affected. Review Connected Apps in App Manager, although the Connected Apps OAuth Usage page does not show these integrations. Search middleware, custom code and repositories for grant_type=password, the Resource Owner Password Credentials term and calls to the token endpoint, checking the grant_type value because other flows use the same endpoint. Managed packages and third-party applications also need review, and the article suggests asking vendors whether they use the flow and what update is required.

The replacement depends on the integration. Client Credentials suits server-to-server work, Web Server Flow with PKCE suits applications that act for individual users, and JWT Bearer suits certificate-based server-to-server setups. For Client Credentials, the article describes creating an External Client App with the api scope, enabling the flow, and choosing a Run As user with only the permissions the integration needs. It also warns that a different user may lack the original user’s record access. The token request changes to grant_type=client_credentials without a username or password. Because this flow issues no refresh tokens, the integration should request a new token when the current one expires, not for every call, and should include retry handling.

The PKCE flow sends users to Salesforce to sign in and authorize the app, then exchanges an authorization code and a code verifier for a token, and it can use refresh tokens. JWT Bearer uses a signed assertion checked against a certificate, which means certificates must be managed. The article also notes that legacy Connected Apps lose full support in Summer ’27, and that migrating one to an External Client App does not fix the username-password dependency, because External Client Apps do not support that flow.

To test, the article advises disabling the Allow OAuth Username-Password Flows setting in a sandbox under OAuth and OpenID Connect Settings, then running each integration. Successful connection tests can be misleading because cached sessions may keep working for a while, so each integration should obtain a fresh token through a supported flow. Failures may show an invalid_grant error and an OAuth Username-Password Flow Disabled status in Login History. The article’s main advice is to start the inventory and migration well before the deadline.

Read the original at Salesforce Time (opens in a new tab)

Worth reading?