Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Heroku Engineering 8 min read How-to mediumAdept

AppLink Fundamentals III: Building with AppLink – Development Flow and Language Choices

Heroku AppLink lets Salesforce extensions be built in Node.js, Python, Java and other languages, and the development loop centers on local testing, OpenAPI contract management and disposable scratch orgs. An invoke.sh script simulates Salesforce requests by building the base64 x-client-context header from Salesforce CLI org details, and it can activate session-based permission sets for testing locally. Salesforce rejects publishes that break an OpenAPI spec still referenced by Apex, Flows or Agentforce Actions, so breaking changes mean removing those references or publishing under a new --client-name. Apex remains the choice for in-transaction trigger logic, while Heroku-hosted code suits compute-heavy work, external integrations and reuse of existing code. Agentforce actions are configured through x-sfdc OpenAPI extensions.

Assumes: Salesforce platform basicsOpenAPI specificationsSalesforce CLI

Related posts

  • Heroku AppLink: Extend Salesforce with Any Programming Language

    Heroku Engineering easyNovice

    Heroku AppLink, now generally available from the Salesforce Setup menu, is a free Heroku add-on that lets code in almost any language be deployed on Heroku and invoked from Salesforce Flow, Apex and Agentforce. It can also access Salesforce and Data Cloud data, with user mode enabled by default. It is built from several parts: the add-on, which exposes `HEROKU_APPLINK_API_URL` and `HEROKU_APPLINK_TOKEN`; a service-mesh buildpack that authenticates requests and blocks non-Salesforce callers; and a CLI, a dashboard and an API. SDKs exist for Node.js and Python; they decode the base64 JSON `x-client-context` header. OpenAPI 3.0 specs with `x-sfdc` extensions handle service registration, permission-set elevation and Agentforce actions. Languages without an SDK, such as Java, call the AppLink API directly.

  • AppLink Fundamentals II: Advanced AppLink Integrations – Automation & AI

    Heroku Engineering mediumAdept

    Heroku AppLink turns an OpenAPI spec with Salesforce-specific x-sfdc extensions into generated Apex classes, Flow External Service actions, Agentforce Agent Actions, and Connected App/Permission Set configuration via `heroku salesforce:publish`. Specs can be generated from framework schemas such as Fastify's rather than hand-written, keeping docs in sync with code. Apex can call services synchronously, subject to callout limits and timeouts, or asynchronously using OpenAPI callbacks for long-running work. Code runs in User Mode with the triggering user's permissions, and Permission Sets can optionally grant temporary elevated access ("user mode plus") during execution only.

  • AppLink Fundamentals I: AppLink Integration Patterns – Connecting Salesforce to Heroku Applications

    Heroku Engineering mediumAdept

    Heroku AppLink offers two core integration patterns between Salesforce and Heroku apps. Pattern 1 uses run-as-user authorizations (`salesforce:authorizations:add`) so a Heroku app can query Salesforce data via SOQL across multiple orgs with a designated user's permissions. Pattern 2 publishes the Heroku app as a service invokable from Flow, Apex or Agentforce. It uses an OpenAPI spec, a service-mesh buildpack that authenticates requests and blocks non-Salesforce traffic, and user-mode auth carried in a base64 `x-client-context` header, with optional elevated permissions granted through Permission Sets. Node.js and Java samples cover SDK middleware, manual header parsing without the SDK, and Unit of Work transactional DML.

  • Securing Salesforce Integrations with Heroku AppLink

    Heroku Engineering mediumAdept

    Heroku AppLink replaces long-lived OAuth refresh tokens and publicly exposed vendor endpoints in Salesforce integrations with a service mesh and short-lived, org-bound credentials minted at runtime. Inbound calls from Salesforce are accepted only from explicitly connected orgs, validated through an x-client-context header. Outbound calls to Salesforce run under user, user-plus (temporary session permission set) or authorized-user modes to enforce least privilege. The design targets token-replay attacks where stolen vendor-held tokens enable SOQL reconnaissance and Bulk API exfiltration, and CLI setup steps and SDK snippets are included.

  • Mastering API Gateway Integration: Salesforce, Heroku, and MuleSoft Anypoint Flex Gateway

    Heroku Engineering mediumAdept

    MuleSoft Anypoint Flex Gateway can run as a container app inside a Heroku Private Space and act as the single public ingress for internally routed Heroku APIs. The walkthrough deploys an internal API with --internal-routing, imports its OpenAPI spec into Design Center and publishes it to Exchange, then generates registration.yaml via Runtime Manager. It deploys the gateway with Flex-specific config vars (dynamic port, idle timeouts, Envoy drain time and concurrency) and wires the internal URL as the upstream in API Manager. A Client ID Enforcement policy then demonstrates gateway-level authentication without application code changes.

The quest for software engineering knowledge.

Look:
Layout: