> ## Documentation Index
> Fetch the complete documentation index at: https://developer.verilock.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Slack

> Post verification events and compliance alerts to Slack channels.

The Slack integration sends real-time notifications to your Slack workspace when verification events occur. Your compliance team can monitor approvals, rejections, AML matches, and blocked transactions without leaving Slack.

## Prerequisites

* A Slack workspace with admin permissions
* Verilock Business or Enterprise plan

## Setup

<Steps>
  <Step title="Create a Slack App">
    Go to [api.slack.com/apps](https://api.slack.com/apps) and click **Create New App > From scratch**. Name it `Verilock Alerts` and select your workspace.
  </Step>

  <Step title="Configure OAuth Scopes">
    Navigate to **OAuth & Permissions** and add the following Bot Token Scopes:

    | Scope                  | Purpose                                 |
    | ---------------------- | --------------------------------------- |
    | `chat:write`           | Post messages to channels               |
    | `channels:read`        | List public channels for selection      |
    | `chat:write.customize` | Customize bot name and icon per message |
  </Step>

  <Step title="Install to Workspace">
    Click **Install to Workspace** and authorize the app. Copy the **Bot User OAuth Token** (starts with `xoxb-`).
  </Step>

  <Step title="Invite the Bot">
    In your target Slack channel, type `/invite @Verilock Alerts` to add the bot.
  </Step>

  <Step title="Configure in Verilock">
    Go to **Dashboard > Settings > Integrations > Slack** and enter:

    * **Bot Token**: Your `xoxb-` token
    * **Channel**: Select the target channel
    * **Events**: Choose which events trigger notifications
  </Step>

  <Step title="Test Connection">
    Click **Send Test Message** to verify the integration. You should see a test notification in your Slack channel within seconds.
  </Step>
</Steps>

## Event Subscriptions

Select which events post to Slack from the dashboard:

| Event                 | Default |
| --------------------- | ------- |
| `session.approved`    | On      |
| `session.declined`    | On      |
| `aml.match_found`     | On      |
| `transaction.flagged` | On      |
| `transaction.blocked` | On      |
| `session.completed`   | Off     |
| `session.expired`     | Off     |

## Message Format

Verilock sends structured Slack messages using Block Kit:

```json theme={null}
{
  "channel": "C04XXXXXXXX",
  "text": "KYC Session Declined - ses_a1b2c3d4e5f6",
  "blocks": [
    {
      "type": "header",
      "text": {
        "type": "plain_text",
        "text": "Session Declined"
      }
    },
    {
      "type": "section",
      "fields": [
        { "type": "mrkdwn", "text": "*Session ID:*\nses_a1b2c3d4e5f6" },
        { "type": "mrkdwn", "text": "*Risk Score:*\n78 / 100" },
        { "type": "mrkdwn", "text": "*Reason:*\nDocument tampering detected" },
        { "type": "mrkdwn", "text": "*Applicant:*\njean@example.com" }
      ]
    },
    {
      "type": "actions",
      "elements": [
        {
          "type": "button",
          "text": { "type": "plain_text", "text": "View in Dashboard" },
          "url": "https://verilock.io/dashboard/sessions/ses_a1b2c3d4e5f6"
        }
      ]
    }
  ]
}
```

<Tip>
  Messages include a **View in Dashboard** button that links directly to the session or screening result for quick review.
</Tip>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Messages not appearing">
    Verify the bot has been invited to the channel. Check that the Bot Token is valid and has `chat:write` scope. Review failed deliveries in **Dashboard > Logs > Integrations**.
  </Accordion>

  <Accordion title="Rate limiting">
    Slack allows approximately 1 message per second per channel. If you process high volumes, consider routing low-priority events to a separate channel or disabling verbose events like `session.completed`.
  </Accordion>

  <Accordion title="Token revoked">
    If your workspace admin revokes the app, re-install it from the Slack App settings page and update the Bot Token in Verilock.
  </Accordion>
</AccordionGroup>
