ViewDefinition

Represents a view definition on a Slack app. This type extends the MetadataWithContent metadata type and inherits its content and fullName fields.

The file suffix is .view for the view definition. The accompanying metadata file is named YourViewName.view-meta.xml. The files are stored in the viewdefinitions 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.

Field NameField TypeDescription
apiVersiondoubleRequired. A double value that binds the view definition to a Salesforce API version.
contentbase64BinaryThe 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.
descriptionstringA description of the view definition.
fullNamestringThe developer name used as a unique identifier for API access. fullName can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the Metadata component.
isProtectedbooleanIndicates whether the view definition is protected (true) or not (false). If true, only this package can reference the view definition directly.
masterLabelstringRequired. Name of the view definition that appears in the Salesforce user interface.
targetTypeViewTargetType (enumeration of type string)Required. Specifies where the view can be used. Valid value is slack.

This is the hello.view-meta.xml metadata file.

Here's the corresponding hello.view definition. This view uses the SlackApp example with the slash command dispatcher. See Define a View.

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.