Work with Shortcuts
The following are Apex classes for working with shortcuts.
Defines the dispatcher for the shortcut you are handling.
When a user interacts with your shortcut, your app receives an interaction payload. Your handler processes that payload and then sends a response. See Handle Slack Actions.
To respond to an interaction payload, always send an acknowledgement response, follow up with a modal to confirm any action that occurs next. See Slack API: Responding to shortcuts.
ShortcutDispatcher has the following method.
Invokes the action handler.
The action parameters for the shortcut handler. The format is a
Describes the context in which a Slack action is invoked.
To access the Slack context, use the
invoke() method. This method is passed in by an instance of
RequestContext. It exposes information about the source of the action in Slack, performs custom logic, and obtains the correct Slack client to respond to Slack based on the request.
Each action type receives different information in its
Contains information about the shortcut.
The following are constructors for
Creates an instance of the
Slack.ShortcutParameters class with the specified callback ID.
The ID sent in the interaction payload.
The following are methods for