Slack channels

The Slack integration allows you to manage which channels Thena can access and monitor. Channels are organized into two categories:

These are public channels in your Slack workspace that Thena can see but hasn’t been added to yet. You can:

  • View all accessible public channels
  • Add Thena to channels directly
  • Configure channel settings before adding
  • Filter channels by name or purpose

Channel listing is paginated with 20 channels per page. Use the pagination controls to navigate through all available channels.

For private channels, the Thena Slack app must be manually added via Slack. Due to Slack API limitations, Thena cannot automatically access or join private channels.

Channel types

Ticket creation settings

Configure how tickets are created from Slack messages and conversations.

Conversation grouping window

Group messages within a specified time window (in minutes) to create a single ticket. This helps consolidate related messages into a single ticket rather than creating multiple tickets for an ongoing conversation.

Default: 2 minutes

The conversation grouping window helps maintain context and reduce ticket fragmentation while ensuring separate issues are tracked independently. You can adjust the window duration based on your team’s needs.

Automatic ticket creation

When enabled, Thena automatically creates tickets for new conversations in configured channels. This ensures no customer inquiry goes untracked.

Slash commands

Enable the /ticket command in your Slack workspace. This allows team members to manually create tickets using a structured command interface.

@Thena tag

Allow creating tickets by tagging @Thena in messages. When enabled, team members can create tickets by mentioning @Thena in a message or thread.

Forms

Optionally require users to fill out predefined forms when creating tickets. This ensures consistent information gathering for different types of requests.

  • Multiple forms can be selected and their order can be specified
  • When multiple forms are selected, users will see a dropdown menu to choose the appropriate form
  • Forms will be presented in the specified order in the dropdown menu
  • This allows for different types of requests to be handled with their specific information requirements

Slack groups configuration

Map Slack user groups to Thena sub-teams to enable automatic ticket routing when a Slack group is tagged in a message. When a user mentions a Slack group (e.g., @engineering) in the initial message that creates a ticket, the ticket will be automatically assigned to the corresponding Thena sub-team.

Note:

  • Slack group routing only works when the group is mentioned in the initial message that creates the ticket. Mentioning a Slack group in subsequent thread messages will not change the ticket assignment.
  • If a Slack group is mentioned in the initial message, the ticket will be assigned to the mapped sub-team regardless of other routing rules, taking priority over platform routing logic.

You can:

  • Get all available Slack user groups in your workspace
  • Map Slack groups to Thena sub-teams
  • Get existing mappings between Slack groups and sub-teams

Refer to the API endpoints section for details on managing Slack group mappings.

Notifications and triage

Configure how ticket notifications are distributed across your Slack channels through default triage channels and conditional routing rules.

Default triage channels

Default triage channels receive notifications for all new tickets unless overridden by triage rules. You can configure multiple default channels where:

  • New ticket alerts are sent automatically
  • Team members can triage tickets by assigning them to appropriate handlers
  • Ticket details like urgency, priority, and request information are readily available

Refer to the API endpoints section for managing triage rules and channels.

Triage rules

Triage rules allow you to route specific tickets to different channels based on ticket properties. Each rule consists of:

  1. Rule name: A descriptive name for the rule
  2. Status: Enabled or disabled
  3. Conditions: Criteria that trigger the rule
  4. Target channels: Channels that receive notifications when conditions are met

Condition structure

Each condition has four components:

  1. Category: Select either:

    • Ticket: For ticket-related properties
    • Account: For account-related properties
  2. Field: Available fields depend on the selected category

    • Ticket fields: priority, urgency, type, etc.
    • Account fields: health, status, tier, etc.
    • Custom fields: Any custom fields defined for tickets or accounts are also available
  3. Operator: Select from the following comparison operators:

    • Equals: Exact match
    • In list: Value exists in a list
    • Greater than or equal: Value is greater than or equal to
    • Less than or equal: Value is less than or equal to
    • Matches regex: Value matches a regular expression pattern
    • Starts with: Value begins with a specific string
    • Ends with: Value ends with a specific string
    • Contains: Value contains a specific string
  4. Value: The exact value to match against. Format should match the operator type (e.g., comma-separated values for ‘In list’, regex pattern for ‘Matches regex’)

Multiple conditions

You can combine multiple conditions using:

  • AND conditions: All conditions must be true
  • OR conditions: Any condition can be true

If a triage rule matches, notifications are sent ONLY to the target channels specified in that rule, not to the default channels. To include default channels, add them explicitly as target channels in your rule.

Rule evaluation

When multiple rules are configured:

  1. All rules are evaluated
  2. If multiple rules match the conditions, the notification will be sent to the target channels of all matching rules
  3. This allows you to set up multiple routing rules that can work together to ensure the right teams are notified

Examples

Refer to the API endpoints section for details on creating and managing triage rules through our API.

AI features

Configure AI-powered features to enhance ticket creation and management. Each feature uses customizable prompts that you can tailor to your business needs.

AI models

Select from our supported AI models to power your automation:

  • Grok-2: XS AI flagship conversational model
  • Claude 3.7 Sonnet: Anthropic’s advanced reasoning model with state-of-the-art capabilities

Some models support deep thinking mode for more thorough analysis. This option will be available in the model settings if supported.

AI features

Ticket detection

Automatically identifies when a conversation requires a support ticket.

Default prompt:

Analyze the following conversation and determine if it requires a support ticket. Consider factors like: explicit requests for help, reported issues, or questions that need tracking.

Title generation

Creates concise, informative ticket titles following a standardized format.

Default prompt:

TITLE_GENERATION:
Generate a precise, informative title for this support ticket using the format: 
"[Type] [Product] - [Core Issue]" 

NOTE: Wrap the title and product around in angular brackets like this: <title> <product> Core issue with no brackets

Where:
- [Type] is one of: Bug, Feature, Question, Security, Performance, Other
- [Product] identifies the specific product component
- [Core Issue] summarizes the key problem or request in 5-9 words

Example good titles:
- "Bug: API Authentication - Token refresh fails after password change"
- "Feature: Analytics Dashboard - Add export to CSV functionality"
- "Question: Webhook Integration - Payload format documentation"

Keep total length under 70 characters. Prioritize clarity and specificity.

Description generation

Creates structured, comprehensive ticket descriptions.

Default prompt:

Create a comprehensive support ticket description structured in the following format:

## Overview
[Concise 1-2 sentence summary of the core issue]

## Environment
- Product version: [Extract if mentioned]
- Browser/OS/Device: [Extract if mentioned]
- Account information: [Customer ID or account type if provided]
- Date first observed: [When the issue started]

## Technical Details
[Include specific error messages, API responses, status codes, or behavior anomalies. Quote exact error text when available.]

## Reproduction Steps
1. [Clear, numbered steps to reproduce the issue]
2. [Use placeholders if steps are not explicitly stated]
3. [Include expected vs. actual outcomes]

## Customer Impact
[Describe severity, business impact, affected users, and any workarounds attempted]

## Customer Expectation
[Clearly state what resolution the customer is seeking]

## Attachments
[List any logs, screenshots, or other files mentioned in the conversation]

Format using markdown for readability. Prioritize accuracy over completeness - use "Not specified" rather than assuming details not provided in the conversation.

Sentiment analysis

Evaluates the tone and emotional context of conversations.

Default prompt:

Analyze the tone and sentiment of this conversation. Consider factors like: urgency, frustration level, satisfaction, and overall mood.

Urgency detection

Assesses the priority level of support requests.

Default prompt:

Analyze the following support conversation to determine the urgency level of the customer's issue. 
Consider factors like business impact, time sensitivity, number of affected users, and severity of the problem.
Return a JSON response with the following fields:
{
  "urgency": string, // The detected urgency level
  "confidence": number, // Your confidence in this assessment (0-1)
  "businessImpact": "low|medium|high", // How much this impacts the customer's business operations
  "timeSensitivity": "low|medium|high", // How time-sensitive this issue is
  "affectedUsersCount": number|"unknown", // Estimated number of users affected
  "severityLevel": "low|medium|high" // The overall severity of the issue
}
If specific urgency levels are provided in the prompt, use one of those. Otherwise, use "low", "medium", or "high".

Custom fields auto-fill

Extracts relevant information to populate custom ticket fields.

Default prompt:

Extract relevant information to populate custom ticket fields. Look for: environment details, affected systems, steps to reproduce, and any specific requirements.

Customizing prompts

All default prompts can be customized to better match your organization’s needs:

  1. View the current prompt for any AI feature
  2. Edit the prompt to include specific requirements or formatting
  3. Save changes to update the AI behavior

Prompt changes will affect all future ticket processing. Test changes thoroughly before applying them to production environments.


API endpoints

These APIs are part of the Slack app in the Apps Framework and require:

  • Authentication using the API Key specific to your Slack app installation (not the platform’s auth token)
  • Base URL from the API references section, which varies by environment (development, staging, production)

Team settings

Get team settings

Get the current ticket creation settings for a team.

Path: /v1/slack/settings/teams/{teamId}
Method: GET

Headers:

{
  "x-auth-token": "YOUR_SLACK_APP_API_KEY",
  "x-slack-id": "YOUR_SLACK_WORKSPACE_ID"
}

Response:

{
  "aiModel": "grok-2",
  "requireForm": false,
  "aiMaxTokens": 1000,
  "aiTemperature": 0.5,
  "slashCommands": true,
  "ticketCommand": true,
  "automaticTickets": true,
  "conversationWindow": 30,
  "thenaBotTaggingEnabled": true,
  "aiEnableExtendedThinking": false,
  "createdAt": "2025-02-28T13:58:03.091Z",
  "updatedAt": "2025-02-28T13:58:03.091Z",
  "platformTeamId": "TRRSALL1S3"
}
Response object
object

Update team settings

Path: /v1/slack/settings/teams/{teamId}
Method: PUT

Update the configuration settings for a specific Slack team.

Request body
object

Headers:

{
  "x-auth-token": "YOUR_AUTH_TOKEN",
  "x-slack-id": "YOUR_SLACK_WORKSPACE_ID",
  "content-type": "application/json"
}

Example Request:

curl 'https://thena-slack.thena.tools/v1/slack/settings/teams/TRRSALL1S3' \
  -X 'PUT' \
  -H 'content-type: application/json' \
  -H 'x-auth-token: YOUR_AUTH_TOKEN' \
  -H 'x-slack-id: T05SWT4V29H' \
  --data-raw '{
    "aiModel": "grok-2",
    "requireForm": false,
    "aiMaxTokens": 1000,
    "aiTemperature": 0.5,
    "slashCommands": true,
    "ticketCommand": true,
    "automaticTickets": true,
    "conversationWindow": 2,
    "thenaBotTaggingEnabled": true,
    "aiEnableExtendedThinking": false
  }'

Response:

{
  "success": true
}

Triage rules

List triage rules

Path: /v1/slack/triage/{teamId}
Method: GET

Retrieve all triage rules configured for your workspace.

Headers:

{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID"
}

Response:

{
    "ok": true,
    "data": [
        {
            "id": "10",
            "isEnabled": true,
            "isDefault": true,
            "triageRules": null,
            "createdAt": "2025-03-09T09:58:35.162Z",
            "updatedAt": "2025-03-09T09:58:35.162Z",
            "deletedAt": null,
            "triageChannels": [
                {
                    "id": "307",
                    "name": "prod-triage-platform",
                    "channelId": "C08FMAH5S68",
                    "channelType": "triage_channel",
                    "isArchived": false,
                    "isPrivate": false
                }
            ]
        }
    ]
}

Create triage rule

Path: /v1/slack/triage/{teamId}
Method: POST

Create a new triage rule with specified conditions and target channels.

Headers:

{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID",
    "Content-Type": "application/json"
}

Request body:

{
    "isDefault": false,
    "triageRules": {
        "AND": [
            {
                "category": "ticket",
                "field": "priority.name",
                "operator": "equals",
                "value": "Urgent"
            },
            {
                "category": "ticket",
                "field": "status.name",
                "operator": "equals",
                "value": "Open"
            }
        ],
        "OR": []
    },
    "channelIds": ["C08EYRV9D5L"]
}

Update triage rule

Path: /v1/slack/triage/{ruleId}
Method: PATCH

Update an existing triage rule. The request body follows the same format as the create endpoint.

Headers:

{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID",
    "Content-Type": "application/json"
}

Delete triage rule

Path: /v1/slack/triage/{ruleId}
Method: DELETE

Delete an existing triage rule.

Headers:

{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID"
}

Slack groups

List Slack groups

Path: /v1/slack/settings/teams/{teamId}/groups
Method: GET

Retrieve all available Slack user groups in your workspace.

Headers:

{
    "content-type": "application/json",
    "x-workspace-id": "YOUR_WORKSPACE_ID",
    "x-source-key": "YOUR_SOURCE_KEY"
}

Response:

{
    "data": [
        {
            "id": "2",
            "slackGroupId": "S06FMU9Q605",
            "slackHandle": "engineering",
            "description": "Engineering team",
            "isExternal": false,
            "usersCount": 1,
            "users": ["U05TL0FENRE"],
            "createdAt": "2025-02-28T13:57:51.783Z",
            "updatedAt": "2025-02-28T13:57:51.783Z",
            "deletedAt": null,
            "slackDeletedAt": null
        }
    ],
    "ok": true
}

List mapped groups

Path: /v1/slack/settings/teams/{teamId}/groups/mapped
Method: GET

Retrieve all Slack groups that are currently mapped to Thena sub-teams.

Headers:

{
    "content-type": "application/json",
    "x-workspace-id": "YOUR_WORKSPACE_ID",
    "x-source-key": "YOUR_SOURCE_KEY"
}

Map Slack group to sub-team

Path: /v1/slack/settings/teams/{teamId}/groups
Method: PATCH

Create a mapping between a Slack user group and a Thena sub-team.

Headers:

{
    "content-type": "application/json",
    "x-workspace-id": "YOUR_WORKSPACE_ID",
    "x-source-key": "YOUR_SOURCE_KEY"
}

Request body:

{
    "slackSubGroupId": "2",
    "platformSubGroupId": "TXX0OHHM7M"
}

Response:

{
    "ok": true
}

Channel management

List channels

Get a list of available or configured channels in your Slack workspace.

Path: /v1/slack/channel
Method: GET

Query parameters:

Query parameters
object

Headers:

{
  "x-auth-token": "YOUR_SLACK_APP_API_KEY",
  "x-slack-id": "YOUR_SLACK_WORKSPACE_ID"
}

Response:

{
  "data": [
    {
      "id": "307",
      "name": "prod-triage-platform",
      "channelId": "C08FMAH5S68",
      "slackCreatedAt": "1740752435",
      "isBotActive": false,
      "isBotJoined": false,
      "channelType": "not_setup",
      "isArchived": false,
      "isPrivate": false,
      "isShared": false,
      "sharedTeamIds": null,
      "guestAreCustomers": false,
      "platformDump": {
        "accounts": []
      },
      "createdAt": "2025-02-28T14:20:37.262Z",
      "updatedAt": "2025-02-28T14:20:37.262Z",
      "slackDeletedAt": null,
      "lastBotLeftAt": null,
      "deletedAt": null,
      "teamId": "T05SWT4V29H",
      "teams": []
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 128,
    "totalPages": 7
  }
}
Response object
object

Map channels

Configure channel type and team mapping for one or more Slack channels.

Path: /v1/slack/teams/map-channels
Method: POST

Request body:

{
  "teamId": "string",
  "channelIds": ["string"],
  "channelType": "customer_channel" | "internal_helpdesk" | "triage_channel" | "automation_channel"
}
Request body
object

Headers:

{
  "x-auth-token": "YOUR_SLACK_APP_API_KEY",
  "x-slack-id": "YOUR_SLACK_WORKSPACE_ID",
  "content-type": "application/json"
}

The channel type specified in the request should match one of the channel types described in the Channel types section above.

AI features

List all prompts

Path: /v1/prompts
Method: GET

Retrieve all AI prompts configured for your organization.

Headers:

{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID"
}

Get prompt by ID

Path: /v1/prompts/{promptId}
Method: GET

Retrieve a specific prompt configuration.

Headers:

{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID"
}

Create prompt

Path: /v1/prompts
Method: POST

Create a new set of AI prompts.

Headers:

{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID"
}

Request body:

{
    "name": "Customer Service Prompts",
    "prompts": {
        "ticket_detection": "Analyze the following conversation...",
        "sentiment_analysis": "Analyze the sentiment of the following...",
        "urgency_detection": "Analyze the following support conversation...",
        "custom_fields": "Extract key information..."
    },
    "platformTeamId": "YOUR_TEAM_ID"
}

Update prompt

Path: /v1/prompts/{promptId}
Method: PUT

Update an existing prompt configuration.

Headers:

{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID"
}

Request body:

{
    "name": "Updated Customer Service Prompts",
    "prompts": {
        "ticket_detection": "Updated prompt content...",
        "sentiment_analysis": "Updated sentiment analysis...",
        "urgency_detection": "Updated urgency detection...",
        "custom_fields": "Updated custom fields..."
    },
    "isEnabled": true
}

Delete prompt

Path: /v1/prompts/{promptId}
Method: DELETE

Soft delete a prompt configuration.

Headers:

{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID"
}