Apex SDK for Slack (Beta)
Documentation Changelog
Enable Slack for Salesforce Beta
Set Up Your Development Environment
Set Up Your SFDX Project
Deploy a Slack App
Sample Apex SDK for Slack App
Use Salesforce DX tools for an integrated development experience. Make sure that you have a Slack workspace that you can deploy apps to.
To set up Salesforce DX tools:
Next, get your Salesforce org ready for Slack development by following these steps.
A Dev Hub org enables you to create and manage scratch orgs.
You must also accept the Salesforce for Slack Beta Terms and Conditions to use Apex SDK for Slack.
Important
To set up a Dev Hub org with My Domain enabled:
If you’re working with second-generation managed packaging (2GP), see Distribute Slack Apps.
Note
To enable user permission for developing Slack apps:
To authenticate to your org from the CLI:
Use a terminal to cd to a location.
Create an SFDX project by using this command.
1sf project generate --name <project_name>Go to your project.
1cd <project_name>Authenticate to your org.
1sf org login web --alias devhub --set-default-dev-hub --instance-url https://<my_domain>.my.salesforce.comorg login web opens a browser and uses the URL specified by --instance-url. Use the my.salesforce version (Classic) of the URL, not a Lightning Experience one.--alias sets an alias for your Dev Hub org username so that you can refer to it with a simpler name from other commands.--set-default-dev-hub sets this org as the default Dev Hub org for your project so that you can omit the target Dev Hub org for commands that require it.Log in with the username and password from the org you just made. Allow access to the org from the CLI.
The command exits in your shell when the authentication is successful.
You can see your authenticated orgs by running sf org list. If you must authenticate to your dev hub org again, run sf org login web --set-default-dev-hub.
Tip
Now that you authenticated to your Dev Hub org, you can run your Slack app with Apex.
Beta Feature