Represents a Slack app. This type extends the MetadataWithContent metadata type and inherits its
The file suffix is
.slackapp for the Slack app configuration file. The accompanying metadata file is named
YourAppName.slackapp-meta.xml. The files are stored in the
slackapps folder in the corresponding package directory.
Slack apps are available in API version 54.0 and later.
To use this metadata type, your org must have Slack capabilities and packaging enabled. You must also enable user permissions to connect Salesforce with Slack.
|Field Name||Field Type||Description|
|string||Required. The app ID, as shown on the Slack app's Basic Information page.|
|string||Required. The app token, as shown on the Basic Information page. The app token starts with |
|string||The comma-separated list of scopes that determine what your app can access, as shown on the OAuth & Permissions page. For example, |
|string||Required. The client ID, as shown on the Basic Information page. Retrieving this field isn't supported. The client ID is always returned as |
|string||Required. The client secret, as shown on the Basic Information page. See Slack API: oauth.v2.access. Retrieving this field isn't supported. The client secret is always returned as |
|base64Binary||The page content. Base 64-encoded binary data. Prior to making an API call, client applications must encode the binary attachment data as base64. Upon receiving a response, client applications must decode the base64 data to binary. This conversion is usually handled for you by a SOAP client. This field is inherited from the MetadataWithContent component.|
|string||The developer name used as a unique identifier for API access. |
|boolean||Indicates whether the Slack app is protected (true) or not (false). If true, only this package can reference the Slack app directly.|
|string||Required. Name of the Slack app that appears in the Salesforce user interface.|
|string||Required. The string that Slack uses to sign the request. Retrieving this field isn't supported. The signing secret is always returned as |
|string||The comma-separated list of scopes that access user data and act on behalf of users that authorize them. For example, |
SlackApp enables you to configure your app's info, configuration, and connection.
Create the following files:
<appname>.slackapp-meta.xmldefines your app connection, such as your app key and token.
<appname>.slackappdefines your app handlers for slash commands, shortcuts, and event handlers in YAML format.
By default, posting to Slack on behalf of the app is restricted. If the app is protected, Apex references to the app, like
Slack.App.namespace.AppName, fail at save time.
This is the definition of a Slack app in the
userScopes, and other field values with your own.
MySlackApp.slackapp configuration file in YAML format, which defines the commands and shortcut handlers. See Define an App.
/classes directory, create the
SayHello.cls Apex class and the
SayHello.cls-meta.xml files. This class retrieves the
hello example view definition. See ViewDefinition.
SayHello.cls-meta.xml file looks like this.
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.