Build an Automated Test Monitoring Integration for Slack

Learn how to use the Intelligems API to create your own proactive slack notification that shares the health of your tests.

Overview:

This guide explains how to leverage the Intelligems External API & Claude Code to build a proactive monitoring system that sends split test health updates directly to Slack.

By automating these notifications, your team can stay informed on experiment performance and quickly identify potential issues without needing to manually check the Intelligems dashboard.

circle-info

Note: Your computer needs to be actively online and connected to the internet in order for this alert to be sent. If you'd like this to run even if your computer is offline, consider using GitHub Actions instead.

circle-check

Prerequisite

  • Requires a Claude Account (Pro, Max, Teams, or Enterprise)

How To Create An Automated Test Monitoring Integration for Slack

Find & open the Terminal Application on your computer.

Install Claude Code into Terminal via Claude's instructions herearrow-up-right.

Step 2: Set Up Your Project

In Terminal, paste in the following & hit enter:

After the above runs, also paste in the below & hit enter:

Finally, after the above runs, paste in the below & hit enter:

Step 3: Get Your Intelligems API Key & Slack Webhook URL

Intelligems API Key:

To request access and receive your API key, contact our support teamarrow-up-right.

Slack Webhook URL:

  • Click "Create New App" β†’ "From scratch"

  • Name it "Intelligems Health Check" and select your workspace

  • In the left sidebar, click "Incoming Webhooks"

  • Toggle "Activate Incoming Webhooks" to On

  • Click "Add New Webhook to Workspace"

  • Select the channel where you want health checks posted

  • Copy the webhook URL

Step 4: Configure Environment Variables

Take the below code, update with your API key and Webhook URL, and then paste into Terminal. Press enter.

Step 5: Create Configuration File

The below code can be copied and pasted into Terminal.

Customizing Thresholds

In the above script, you can customize the numbers under # Health Check Thresholds to make the alerting more in tune with your business. Learn more below:

MIN_ORDERS_FOR_SIGNIFICANCE = 10

What it does: Sets the minimum number of total orders/conversions before the test has enough data.

If you change it:

  • Lower (e.g., 5): More lenient - will consider tests with fewer orders as having sufficient data.

  • Higher (e.g., 50): More strict - requires more conversions before considering results meaningful.

Example: If set to 10 and your test only has 7 total orders, Slack will show: "⚠️ Guardian detected some issues: Insufficient orders (7 orders)"

Recommendation: For price/shipping tests with lower conversion rates, you might want this lower. For high-volume content tests, keep it higher.


CONVERSION_DROP_ALERT_THRESHOLD = 0.20

What it does: Triggers an alert if the variant's conversion rate drops by this percentage compared to control.

If you change it:

  • Lower (e.g., 0.10): More sensitive - will alert on a 10% drop. Good if you want early warnings.

  • Higher (e.g., 0.30): Less sensitive - only alerts on 30%+ drops. Use if you're okay with bigger swings.

Example:

  • Control has 5% conversion rate

  • Variant has 3.5% conversion rate

  • Drop = (5% - 3.5%) / 5% = 30% drop

  • If threshold is 0.20 (20%), this triggers: "⚠️ Guardian detected some issues: Conversion rate dropped 30.0%"

Important: This is calculated as: (control - variant) / control


MIN_CONFIDENCE_LEVEL = 0.95

What it does: Sets the statistical confidence level required before considering results "significant."

If you change it:

  • Lower (e.g., 0.90 or 90%): Results will be marked as significant sooner, but with less certainty.

  • Higher (e.g., 0.99 or 99%): Requires stronger evidence before declaring significance, takes longer but more reliable.

Example: If set to 0.95 (95%) and your test shows 92% confidence, Slack will show:

"These results are not yet statistically significant... Guardian will continue monitoring for critical issues."

Once it reaches 95%+ confidence, it will show:

"βœ… Results are statistically significant at 95.3% confidence."

Industry standard: 95% (0.95) is typical for most A/B tests. Don't go below 90% unless you understand the risks.

Step 6: Create Main Health Check Script

Copy & paste the below code into Terminal. Press enter.

Step 7: Test the Script

Paste the below code into Terminal & press enter:

You should see an output like:

or

Step 8: Schedule Daily Execution

The below code will schedule the alert to fire everyday at 10AM (it uses the timezone of your device). If you don't want to customize the time, copy & paste this into Terminal before hitting enter. If you want to customize the time, continue reading below!

Customizing Alert

You can customize the time by updating the integer values under Hour and Minute.

Use 24-hour format:

  • 9 AM = <integer>9</integer>

  • 2 PM = <integer>14</integer>

  • 6 PM = <integer>18</integer>

For example, the below will fire at 9:30AM.

You did it!

Now you'll get a Slack notification like the below each day with a health check for your Intelligems Tests.

Last updated