Heroku AppLink CLI Plugin (Pilot)
Last updated March 05, 2025
This article is a work in progress, or documents a feature that is not yet released to all users. This article is unlisted. Only those with the link can access it.
Table of Contents
Heroku AppLink is currently in pilot. The products offered as part of the pilot aren’t intended for production use and are considered as a Beta Service and are subject to the Beta Services terms at https://www.salesforce.com/company/legal/agreements.jsp.
The Heroku AppLink CLI plugin for the Heroku CLI allows you to set up and manage connections with the Heroku AppLink add-on (formerly Heroku Integration).
Install the Heroku CLI
You must have the Heroku CLI installed before adding the Heroku AppLink CLI plugin. See Heroku CLI for instructions.
Install the Heroku AppLink Plugin
To install the plugin, run the CLI command:
$ heroku plugins:install @heroku-cli/plugin-integration
Provision the Heroku AppLink Add-on
You must provision the add-on before you can issue any commands from the plugin. If you run a command before provisioning the add-on on the app, you get the error:
$ heroku integration:connections -a example-app
› Error: Heroku Integration add-on isn’t present on ⬢ example-app.
› Install the add-on using heroku addons:create heroku-integration -a example-app.
Heroku AppLink CLI Commands
This article includes the help texts for each of the plugin’s commands. You can see help text in your terminal with $ heroku salesforce:connect --help
.
heroku salesforce
This command manages Heroku app connections on a Salesforce org.
manages Heroku app connections to a Salesforce org
USAGE
$ heroku salesforce:COMMAND
COMMANDS
salesforce:connect connects a Salesforce org to a Heroku app
salesforce:disconnect disconnects a Salesforce org from a Heroku app
salesforce:import imports a Heroku app to a connected Salesforce org
heroku salesforce:connect
This command connects a Heroku app to a Salesforce org.
USAGE
$ heroku salesforce:connect ORG_NAME -a <value> [--browser <value>] [-l
<value>][-r <value>] [-S]
FLAGS
-S, --store-as-run-as-user store a user's Salesforce credentials
-a, --app=<value> (required) app to run command against
--browser=<value> browser to open the OAuth flow with (example:
"firefox", "safari")
-l, --login-url=<value> login URL for the Salesforce org
-r, --remote=<value> git remote of app to use
ARGUMENTS
ORG_NAME name for the Salesforce org. Must begin with a letter, end with a letter or a number, and between 3-30 characters. Only alphanumeric characters and non-consecutive underscores (\'_\') are allowed.
DESCRIPTION
connects a Heroku app to a Salesforce org
EXAMPLES
$ heroku salesforce:connect production-org -a example-app
Example Output
$ heroku salesforce:connect production-org -a example-app
Press any key to open up the browser to connect ⬢ example-app to production-org or q to exit:
Opening browser to https://login.salesforce.com/services/oauth2/authorize?client_id=…
Connecting ⬢ example-app to production-org... done
Connected org production-org to ⬢ example-app.
heroku salesforce:disconnect
This command disconnects a Heroku app from a Salesforce org.
USAGE
$ heroku salesforce:disconnect -a <value> -o <value>
FLAGS
-a, --app=<value> (required) app to run command against
-o, --org-name=<value> (required) name of authorized Salesforce org.
Must begin with a letter, end with a letter or a
number, and between 3-30 characters. Only alphanumeric
characters and non-consecutive underscores (\'_\')
are allowed.
-r, --remote=<value> git remote of app to use
DESCRIPTION
disconnects a Heroku app from a Salesforce org
EXAMPLES
$ heroku salesforce:disconnect -a example-app -o production-org
Example Output
$ heroku salesforce:disconnect -a example-app -o production-org
› Warning: Destructive Action
› This command will affect the app example-app.
To proceed, type example-app or re-run this command with --confirm example-app: example-app
Disconnecting production-org from ⬢ example-app... done
heroku salesforce:import
This command imports an API specification to an authenticated Salesforce org.
USAGE
$ heroku salesforce:import API_SPEC_FILE -a <value> -c <value> -o <value>
[-G]
FLAGS
-a, --app=<value> (required) app to run command against
-c, --client-name=<value> name given to the client stub
-G, --generate-auth-permission-set generate a permission set for the client
-r, --remote=<value> git remote of app to use
-o, --org-name=<value> (required) name of authorized Salesforce org
ARGUMENTS
API_SPEC_FILE OpenAPI 3.x spec file (JSON or YAML format)
DESCRIPTION
imports an API specification to an authenticated Salesforce org
EXAMPLES
$ heroku salesforce:import api-spec.yaml -a example-app -o production-org -c
AccountAPI -G false
Example Output
$ heroku salesforce:import api-spec.yaml -a example-app -o production-org -c AccountAPI -G false
Importing app ⬢ example-app as 'AccountAPI' to org production-org... done
heroku datacloud
This command manages Heroku app connections on a Data Cloud org.
manages Heroku app connections to a Data Cloud org
USAGE
$ heroku datacloud:COMMAND
TOPICS
datacloud:data-action-target manages data action target webhooks
COMMANDS
datacloud:connect connects a Data Cloud org to a Heroku app
datacloud:disconnect disconnects a Data Cloud org from a Heroku app
heroku datacloud: connect
This command connects a Heroku app to a Data Cloud org.
USAGE
$ heroku datacloud:connect ORG_NAME -a <value> [-l <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-l, --login-url=<value> login URL for the Salesforce org
-r, --remote=<value> git remote of app to use
ARGUMENTS
ORG_NAME Name for the Data Cloud org. Must begin with a letter, end with a letter or a number, and between 3-30 characters. Only alphanumeric characters and non-consecutive underscores (\'_\') are allowed.
DESCRIPTION
connects a Heroku app to a Data Cloud org
EXAMPLES
$ heroku datacloud:connect datacloud-org -a example-app
Example Output
$ heroku datacloud:connect datacloud-org -a example-app
Press any key to open up the browser to connect ⬢ example-app to datacloud-org or q to exit:
Opening browser to https://login.salesforce.com/services/oauth2/authorize?client_id=…
Connecting ⬢ example-app to datacloud-org... done
Connected org datacloud-org to ⬢ example-app.
heroku datacloud:disconnect
This command disconnects a Heroku app from a Data Cloud org.
USAGE
$ heroku datacloud:disconnect -a <value> -o <value>
FLAGS
-a, --app=<value> (required) app to run command against
-o, --org-name=<value> (required) name of authorized Data Cloud org
-r, --remote=<value> git remote of app to use
DESCRIPTION
disconnects a Heroku app from a Data Cloud org
EXAMPLES
$ heroku datacloud:disconnect -a example-app -o datacloud-org
Example Output
$ heroku datacloud:disconnect -a example-app -o datacloud-org
› Warning: Destructive Action
› This command will affect the app example-app.
To proceed, type example-app or re-run this command with --confirm example-app: example-app
Disconnecting datacloud-org from ⬢ example-app... done
heroku datacloud:data-action-target
This command manages webhook data action targets.
manages webhook data action targets
USAGE
$ heroku datacloud:data-action-target:COMMAND
COMMANDS
datacloud:data-acton-target:create creates a data action target for a Heroku app
heroku datacloud:data-action-target:create
This command creates a data action target for a Heroku app.
USAGE
$ heroku datacloud:data-action-target:create LABEL -a <value> -o <value> -p <value> [-n <value>] [-t WebHook]
ARGUMENTS
LABEL data action target label
FLAGS
-a, --app=<value> (required) app to run command against
(defaults to hk-sf-nodejs-fastify])
-n, --api-name=<value> API name for the data action target
(default derives from label)
-o, --org-name=<value> (required) name of authorized Data Cloud org
where data action target is created
-p, --target-api-path=<value> (required) API path for the data action target
excluding the app URL
(eg, "/" or "/handleDataCloudDataChangeEvent")
-t, --type=<option> the type of data action target
(options: wehbook) (defaults to wehbook)
DESCRIPTION
create a data action target for a Heroku app
EXAMPLES
$ heroku datacloud:data-action-target 'Example DAT' -a example-app -o production-org
Example Output
$ heroku datacloud:data-action-target 'Example DAT' -a example-app -o production-org
Creating a webhook data action target 'Example DAT' for ⬢ example-app in org production-org...done
heroku integration
This command accesses information and generates Heroku Integration projects templates.
access information and generate Heroku Integration projects
USAGE
$ heroku integration:COMMAND
COMMANDS
integration:connections lists Heroku Integration connections
integration:connections:info shows info for a Heroku Integration connection
integration:project generates a Heroku Integration project template
heroku integration:connections
This command lists Heroku Integration connections.
USAGE
$ heroku integration:connections [-a <value>]
FLAGS
-a, --app=<value> app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
lists Heroku Integration connections
COMMANDS
integration:connections:info shows info for a Heroku Integration connection
EXAMPLES
$ heroku integration:connections -a example-app
Example Output
$ heroku integration:connections
=== Heroku Integration connections
App Type Org Name State Run As User
───────────────────── ────────────── ──────────────────────── ──────────── ─────────────
datacloud-egress Data Cloud org admin@datacloud-org.com Connected
einstein-copilot-ai Salesforce org admin@einstein-test.com Connected
einstein-copilot-ai Salesforce org my-org-production Connected
einstein-copilot-ai Salesforce org my-org-production Connected user@mail.com
heroku integration:connections:info
This command shows info for a Heroku Integration connection.
USAGE
$ heroku integration:connections:info ORG_NAME -a <value>
ARGUMENTS
ORG_NAME name of the authorized org
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
shows info for a Heroku Integration connection
EXAMPLES
$ heroku integration:connections:info production-org -a example-app
Example Output
$ heroku integration:connections:info production-org -a my-app
Instance URL: https://dsg00000ef0nd2ad.test1.my.pc-rnd.salesforce.com
Org ID: 00DSG00000EF0nd2AD
Org Name: production-org
Run As User: user@mail.com
State: Connected
Type: Salesforce org
heroku integration:project
This command generates a Heroku Integration project template.
USAGE
$ heroku integration:project PROJECT_NAME -t <value> -l <value> [-o <value>]
ARGUMENTS
PROJECT_NAME name for the project
FLAGS
-l, --language=<value> (required) project programming language
(example: typescript, javascript)
-o, --output-directory=<value> output directory where files are placed
(defaults to ./{PROJECT_NAME})
-t, --project-type=<value> (required) project type
(example: salesforce)
DESCRIPTION
generates a Heroku Integration project template
EXAMPLES
$ heroku integration:project example-project -l typescript -t salesforce
Example Output
$ heroku integration:project example_project -l javascript -t salesforce
Generating a Salesforce integration project in JavaScript.
create bin/invoke.sh
create src/plugins/heroku-salesforce.js
create src/plugins/README.md
create src/routes/index.js
create src/app.js
create test/routes/accounts.test.js
create test/helper.js
create api-spec.yaml
create app.json
create Procfile
create README.md
create package.json