---
schema_version: "1"
id: 30f0b3694087d8299d7038e7dc2e49d63b3d5bead91b2370df36ea91f4809501
title: Apex Reference for Slack
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforce-slack-sdk/apex-slack-sdk/guides/apex_ref/apex_ref.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-slack-sdk/guide/apex_ref.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 03fb706bd3273f2216d2f332370e1498ea70fdeacf8b87e6f3f495281e9f3c21
products:
  - Apex SDK for Slack (Beta)
---
# Apex Reference for Slack

Use Apex classes in the `Slack` namespace to simplify your Slack app development.

The `Slack` namespace provides classes and methods for interacting with your Slack apps, such as creating handlers for Slack actions and events, and getting access to a Slack client.

Before you create a handler, you must configure the connection and view definition for your Slack App. When creating your handler, extend the dispatcher based on the type of operation you’re handling.

- Actions: `Slack.ActionDispatcher`
- Commands: `Slack.SlashCommandDispatcher`
- Events: `Slack.EventDispatcher`
- Shortcuts: `Slack.ShortcutDispatcher`

**tip:** To determine which classes and methods you need for your app, review the [permission scopes](https://developer.salesforce.com/docs/platform/salesforce-slack-sdk/build/scopes.md) your app requires to perform the tasks.

For more information, see [Handle Slack Actions](https://developer.salesforce.com/docs/platform/salesforce-slack-sdk/build/actions.md).

To make a call to Slack from an Apex trigger, use the [`@future` annotation](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_future.htm), queuable apex, or another [asynchronous method](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_async_overview.htm).
