# AI Slack Notifications

Get alerted to issues in real time with instant Slack notifications that include a full stack trace when a test fails. Quickly troubleshoot and rerun CI, without having to wait through time-consuming testing cycles. Effortlessly regain momentum by clicking "Suggest a Fix" to receive an AI-generated solution based on the advanced GPT model. Optimize your development workflow and reduce downtime with our cutting-edge capabilities.

## Install 📦 <a href="#install" id="install"></a>

To install the Redefine Integration for Slack, navigate to <https://redefinedev.slack.com/apps/A04QB70PD2B-redefinedev> and click on the "Open in Slack" button.

<figure><img src="https://47263957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuwbuslmLp28ROGViWkou%2Fuploads%2F3MyzyRi94s41wyw60R9e%2Fimage.png?alt=media&#x26;token=b17455b7-7e8c-4484-b279-4b076592fdb8" alt=""><figcaption><p>Slack Installation Page</p></figcaption></figure>

## Enable Slack Configuration ⚙️&#x20;

To enable AI Slack Notifications, you also need to configure Redefine tool to send the messages from the CI. Run the following command before starting Redefine in your CI workflow:

```bash
redefine config set slack_bot_enabled=true
```

## Subscribe ✍🏽 <a href="#install" id="install"></a>

Upon successful installation in your workspace, a subscription prompt will appear. Enter your email address and press the 'enter' key. You will then receive a verification email. Follow the instructions in the email to complete the subscription process, and you will be subscribed to the Redefine integration for Slack.

<figure><img src="https://47263957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuwbuslmLp28ROGViWkou%2Fuploads%2FGVHBjT22lqmM2SQ8Uwp8%2Fimage.png?alt=media&#x26;token=04aa7fcf-0861-41bd-bc85-db4b63cc1027" alt=""><figcaption><p>Subscription Prompt</p></figcaption></figure>

Developers who wish to subscribe can do so by executing one of the following commands:

1. `/redefine-subscribe` - Opens the subscription dialog.
2. `/redefine-invite` - This command sends a personal invitation to subscribe to each member in the channel. For private channels, make sure you've added Redefine's app to the channel first.

## Enjoy 🔔 <a href="#install" id="install"></a>

After subscribing, you will automatically receive notifications for any failures in your Redefine testing sessions as they occur within the Continuous Integration (CI) environment. Notifications include a stack trace, information about the commit, branch, and test, as well as the Redefine + OpenAI "Suggest a Fix" feature, which offers a potential solution to the specific failure.

<br>

<figure><img src="https://47263957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuwbuslmLp28ROGViWkou%2Fuploads%2FoJr57tadwCedeFH0LBbT%2Fslack_example.png?alt=media&#x26;token=d346ef90-5bbf-4b78-a829-cff41fe42d38" alt=""><figcaption></figcaption></figure>
