Execute Customer.io production deployment checklist.
Use when preparing for production launch, reviewing
integration quality, or performing pre-launch audits.
Trigger with phrases like "customer.io production", "customer.io checklist",
"deploy customer.io", "customer.io go-live".
// Set up these alerts in your monitoring system:
const ALERT_THRESHOLDS = {
// API health
api_error_rate: 0.01, // Alert if > 1% of API calls fail
api_p99_latency_ms: 5000, // Alert if p99 > 5 seconds
// Delivery health
bounce_rate: 0.05, // Alert if > 5% bounce rate
complaint_rate: 0.001, // Alert if > 0.1% spam complaints
delivery_rate: 0.95, // Alert if < 95% delivery rate
// Operational health
queue_depth: 10000, // Alert if event queue > 10K pending
webhook_error_rate: 0.05, // Alert if > 5% webhook processing failures
};
6. Smoke Test Script
#!/usr/bin/env bash
set -euo pipefail
echo "=== Customer.io Production Smoke Test ==="
# Test 1: Track API connectivity
TRACK_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-u "${CUSTOMERIO_SITE_ID}:${CUSTOMERIO_TRACK_API_KEY}" \
-X PUT "https://track.customer.io/api/v1/customers/smoke-test-$(date +%s)" \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","_smoke_test":true}')
if [ "$TRACK_STATUS" = "200" ]; then
echo "[PASS] Track API: HTTP 200"
else
echo "[FAIL] Track API: HTTP ${TRACK_STATUS}"
exit 1
fi
# Test 2: App API connectivity
APP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: Bearer ${CUSTOMERIO_APP_API_KEY}" \
"https://api.customer.io/v1/campaigns")
if [ "$APP_STATUS" = "200" ]; then
echo "[PASS] App API: HTTP 200"
else
echo "[FAIL] App API: HTTP ${APP_STATUS}"
exit 1
fi
echo ""
echo "All smoke tests passed"
7. Staged Rollout Plan
Time
Action
Rollback Trigger
T-24h
Final staging test pass
Any test failure
T-12h
Production smoke tests
Smoke test failure
T-1h
Enable for internal team (feature flag)
Error reports
T-0
Enable for 10% of users
Error rate > 1%
T+1h
Increase to 50%
Error rate > 1% or bounce rate > 5%
T+2h
100% traffic
Same thresholds
T+24h
Post-launch review
N/A
// Feature flag integration for staged rollout
function shouldUseCio(userId: string, rolloutPercent: number): boolean {
// Deterministic — same user always gets same result
const hash = createHash("md5").update(userId).digest("hex");
const bucket = parseInt(hash.substring(0, 8), 16) % 100;
return bucket < rolloutPercent;
}
Rollback Procedure
Set feature flag to 0% (immediate — no deploy needed)
Pause all active campaigns in Customer.io dashboard
Investigate logs and error reports
Fix issue, test in staging
Resume staged rollout from 10%
Error Handling
Issue
Solution
Smoke test fails in production
Verify production credentials (different from staging)