---
title: "AppLink Fundamentals I: AppLink Integration Patterns – Connecting Salesforce to Heroku Applications"
description: "Heroku AppLink offers two core integration patterns between Salesforce and Heroku apps."
url: "https://swe.quest/articles/applink-fundamentals-i-applink-integration-patterns-connecting-salesforce-to-979e67d1f6466838"
canonical: "https://www.heroku.com/blog/applink-fundamentals-integration-patterns-salesforce-heroku/"
source: "Heroku Engineering"
published: "2025-07-29"
difficulty: "medium"
kind: "How-to"
reading_minutes: 11
tags: ["identity-auth","api-design","javascript","cloud"]
---

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

A post on [Heroku Engineering](https://swe.quest/sources/heroku.md), published 2025-07-29, 11 min read, How-to. Original: [https://www.heroku.com/blog/applink-fundamentals-integration-patterns-salesforce-heroku/](https://www.heroku.com/blog/applink-fundamentals-integration-patterns-salesforce-heroku/)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [API design](https://swe.quest/tags/api-design.md) (Backend & APIs)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)

## Prerequisites

- Salesforce orgs and permission sets
- Heroku CLI and buildpacks ([easy posts on Developer tools](https://swe.quest/tags/developer-tools.md?difficulty=easy))
- Node.js web frameworks ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))

## Keywords

Heroku AppLink, Salesforce, SOQL, Agentforce, OpenAPI, Fastify, Apex

## Related posts

- [Heroku AppLink: Extend Salesforce with Any Programming Language](https://swe.quest/articles/heroku-applink-extend-salesforce-with-any-programming-language-781061fca4332dc5.md): Heroku Engineering · 2025-07-17 · Easy · 7 min read · Cloud platforms, Identity & auth, API design
  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.
- [AppLink Fundamentals II: Advanced AppLink Integrations – Automation & AI](https://swe.quest/articles/applink-fundamentals-ii-advanced-applink-integrations-automation-ai-08ffd36a5cc535fb.md): Heroku Engineering · 2025-07-30 · Medium · 4 min read · API design, Identity & auth, JavaScript, Cloud platforms
  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\`.
- [AppLink Fundamentals III: Building with AppLink – Development Flow and Language Choices](https://swe.quest/articles/applink-fundamentals-iii-building-with-applink-development-flow-and-language-dfc29aba65ba6f73.md): Heroku Engineering · 2025-07-31 · Medium · 8 min read · API design, AI agents, CI/CD, Cloud platforms
  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.
- [Securing Salesforce Integrations with Heroku AppLink](https://swe.quest/articles/securing-salesforce-integrations-with-heroku-applink-468cff0c0ab69765.md): Heroku Engineering · 2025-09-10 · Medium · 8 min read · Identity & auth, Security, Cloud platforms
  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.
- [Mastering API Gateway Integration: Salesforce, Heroku, and MuleSoft Anypoint Flex Gateway](https://swe.quest/articles/mastering-api-gateway-integration-salesforce-heroku-and-mulesoft-anypoint-flex-61e38a9ef91192f3.md): Heroku Engineering · 2024-07-29 · Medium · 10 min read · API design, Cloud platforms, Identity & auth, Deployment
  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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
