customerio-advanced-troubleshooting
Apply Customer.io advanced debugging techniques. Use when diagnosing complex issues, investigating delivery problems, or debugging integration failures. Trigger with phrases like "debug customer.io", "customer.io investigation", "customer.io troubleshoot", "customer.io incident".
Install
mkdir -p .claude/skills/customerio-advanced-troubleshooting && curl -L -o skill.zip "https://mcp.directory/api/skills/download/8436" && unzip -o skill.zip -d .claude/skills/customerio-advanced-troubleshooting && rm skill.zipInstalls to .claude/skills/customerio-advanced-troubleshooting
About this skill
Customer.io Advanced Troubleshooting
Overview
Advanced debugging techniques for complex Customer.io issues: systematic investigation framework, API debug client, user profile analysis, campaign/broadcast debugging, network diagnostics, and incident response runbooks.
Prerequisites
- Access to Customer.io dashboard (admin recommended)
- Application logs access
curlfor API testing
Troubleshooting Framework
For every issue, answer these five questions first:
- What is the expected vs actual behavior?
- When did the issue start? (Check deploy history, CIO status page)
- Who is affected — one user, a segment, or everyone?
- Where in the pipeline — API call, delivery, or rendering?
- How often — every time, intermittent, or one-time?
Instructions
Step 1: API Debug Client
// lib/customerio-debug.ts
import { TrackClient, APIClient, RegionUS } from "customerio-node";
export class DebugCioClient {
private track: TrackClient;
constructor() {
this.track = new TrackClient(
process.env.CUSTOMERIO_SITE_ID!,
process.env.CUSTOMERIO_TRACK_API_KEY!,
{ region: RegionUS }
);
}
async debugIdentify(userId: string, attrs: Record<string, any>) {
console.log(`\n--- Debug: identify("${userId}") ---`);
console.log("Attributes:", JSON.stringify(attrs, null, 2));
const start = Date.now();
try {
await this.track.identify(userId, attrs);
const latency = Date.now() - start;
console.log(`Result: SUCCESS (${latency}ms)`);
return { success: true, latency };
} catch (err: any) {
const latency = Date.now() - start;
console.log(`Result: FAILED (${latency}ms)`);
console.log(`Status: ${err.statusCode}`);
console.log(`Message: ${err.message}`);
console.log(`Body: ${JSON.stringify(err.body ?? err.response)}`);
return { success: false, latency, statusCode: err.statusCode, message: err.message };
}
}
async debugTrack(userId: string, name: string, data?: any) {
console.log(`\n--- Debug: track("${userId}", "${name}") ---`);
console.log("Data:", JSON.stringify(data, null, 2));
const start = Date.now();
try {
await this.track.track(userId, { name, data });
const latency = Date.now() - start;
console.log(`Result: SUCCESS (${latency}ms)`);
return { success: true, latency };
} catch (err: any) {
const latency = Date.now() - start;
console.log(`Result: FAILED (${latency}ms)`);
console.log(`Status: ${err.statusCode}`);
console.log(`Message: ${err.message}`);
return { success: false, latency, statusCode: err.statusCode };
}
}
}
Step 2: User Investigation Script
#!/usr/bin/env bash
set -euo pipefail
# scripts/investigate-user.sh <user-id>
USER_ID="${1:?Usage: investigate-user.sh <user-id>}"
SITE_ID="${CUSTOMERIO_SITE_ID:?Missing CUSTOMERIO_SITE_ID}"
API_KEY="${CUSTOMERIO_TRACK_API_KEY:?Missing CUSTOMERIO_TRACK_API_KEY}"
echo "=== Investigating User: ${USER_ID} ==="
echo ""
# 1. Check if user exists (try to identify with minimal data)
echo "--- API Connectivity Test ---"
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
-u "${SITE_ID}:${API_KEY}" \
-X PUT "https://track.customer.io/api/v1/customers/${USER_ID}" \
-H "Content-Type: application/json" \
-d '{"_debug_check":"true"}')
echo "Track API for user: HTTP ${HTTP_CODE}"
echo ""
echo "--- Dashboard Checklist ---"
echo "Check the following in Customer.io dashboard:"
echo "1. People > Search '${USER_ID}'"
echo " - Does profile exist?"
echo " - Does it have an email attribute?"
echo " - Is there a 'Suppressed' badge?"
echo ""
echo "2. Activity tab:"
echo " - Are events being received?"
echo " - Any bounce/complaint events?"
echo " - Last identify timestamp correct?"
echo ""
echo "3. Segments tab:"
echo " - Which segments does user belong to?"
echo " - Does segment match campaign audience?"
echo ""
echo "4. Campaigns > Find relevant campaign:"
echo " - Is campaign status Active?"
echo " - Does trigger event match?"
echo " - Check 'Messages' tab for delivery attempts"
Step 3: Campaign Debugging
Common campaign issues and their investigation path:
| Symptom | Check First | Then Check |
|---|---|---|
| Campaign not triggering | Event name match (case-sensitive) | Campaign status (Active?) |
| User not matched | Segment conditions | User attributes match segment? |
| Email not delivered | User has email attribute | Bounce/suppression status |
| Liquid template broken | message_data has all required fields | Preview with real data in dashboard |
| Wrong email content | Correct campaign version is Active | Template variables populated |
| Delayed sends | Campaign "Wait" steps | Queue backlog in Customer.io |
// Programmatic campaign debug
async function debugCampaignTrigger(
userId: string,
eventName: string,
eventData: Record<string, any>
) {
const debug = new DebugCioClient();
console.log("=== Campaign Trigger Debug ===\n");
// 1. Can we identify the user?
const identifyResult = await debug.debugIdentify(userId, {
_debug_campaign_check: true,
});
if (!identifyResult.success) {
console.log("\nBLOCKER: Cannot identify user. Fix auth first.");
return;
}
// 2. Can we track the event?
const trackResult = await debug.debugTrack(userId, eventName, eventData);
if (!trackResult.success) {
console.log("\nBLOCKER: Cannot track event. Check error above.");
return;
}
console.log("\n=== API Side OK ===");
console.log("If campaign still not triggering, check in dashboard:");
console.log(`1. Event name: "${eventName}" (must match exactly, case-sensitive)`);
console.log("2. Campaign status: must be Active (not Draft/Paused)");
console.log("3. Campaign audience: user must match segment/filter");
console.log("4. Campaign frequency: check if user already received");
console.log("5. Suppression: check if user is suppressed");
}
Step 4: Network Diagnostics
#!/usr/bin/env bash
set -euo pipefail
# scripts/cio-network-diag.sh
echo "=== Customer.io Network Diagnostics ==="
echo ""
# DNS resolution
echo "--- DNS Resolution ---"
for host in track.customer.io api.customer.io status.customer.io; do
IP=$(dig +short "$host" 2>/dev/null | head -1)
echo "${host}: ${IP:-FAILED}"
done
echo ""
# TLS check
echo "--- TLS Certificate ---"
echo | openssl s_client -connect track.customer.io:443 -servername track.customer.io 2>/dev/null \
| openssl x509 -noout -subject -issuer -dates 2>/dev/null \
|| echo "TLS check failed"
echo ""
# Latency test
echo "--- Latency (5 samples) ---"
for i in $(seq 1 5); do
LATENCY=$(curl -s -o /dev/null -w "%{time_total}" "https://track.customer.io")
echo "Request ${i}: ${LATENCY}s"
done
echo ""
# Status page
echo "--- Platform Status ---"
curl -s "https://status.customer.io/api/v2/status.json" \
| python3 -c "import sys,json; d=json.load(sys.stdin); print(f'Status: {d[\"status\"][\"description\"]}')" \
2>/dev/null || echo "Could not fetch status"
Step 5: Incident Response Runbooks
P1 — Complete outage (all API calls failing):
- Check https://status.customer.io — is Customer.io down?
- If CIO is up: check your credentials (rotate if compromised)
- Enable circuit breaker to stop retries hitting a dead endpoint
- Switch to fallback queue (events stored in Redis/Kafka)
- Notify affected teams
- When restored: drain fallback queue, verify event delivery
P2 — High error rate (>5% failures):
- Check error breakdown: which status codes?
- If 429: reduce concurrency, check rate limiter config
- If 5xx: check CIO status page, enable backoff
- If 401: credentials may have been rotated — check secrets manager
- Monitor error rate — escalate to P1 if not recovering
P3 — Delivery issues (messages not arriving):
- Verify user has
emailattribute (People > user profile) - Check suppression status (Suppressed badge)
- Check bounce history (Activity tab > filter bounces)
- Verify sending domain (Settings > Sending Domains)
- Check campaign is Active, trigger event matches
- Review spam folder and email headers
P4 — Webhook processing failures:
- Verify webhook endpoint is publicly accessible
- Check signature verification (secret matches dashboard?)
- Review webhook event logs for parsing errors
- Check queue health if using async processing
- Verify Customer.io IP allowlist if using firewall
Diagnostic Commands
# Quick API health check
curl -s -u "$CUSTOMERIO_SITE_ID:$CUSTOMERIO_TRACK_API_KEY" \
-X PUT "https://track.customer.io/api/v1/customers/health-check" \
-H "Content-Type: application/json" \
-d '{"_diag":true}' \
-w "\nHTTP: %{http_code} Time: %{time_total}s\n"
# Check App API
curl -s -H "Authorization: Bearer $CUSTOMERIO_APP_API_KEY" \
"https://api.customer.io/v1/campaigns" \
-w "\nHTTP: %{http_code}\n" | head -5
# Platform status
curl -s "https://status.customer.io/api/v2/status.json" | python3 -m json.tool
Error Handling
| Issue | Solution |
|---|---|
| Intermittent 5xx | Transient — retry with backoff handles it |
| Consistent 401 after deploy | Credentials changed — check env vars and secrets |
| User receiving duplicate messages | Event deduplication or campaign frequency cap |
| Webhook events stop arriving | Check endpoint health, CIO IP allowlist, SSL cert validity |
Resources
- Customer.io Status Page
- Customer.io Community
- Reporting Webhooks Reference
- Troubleshooting Deliverability
Next Steps
After troubleshooting, proceed to customerio-reliability-patterns for fault tolerance.
More by jeremylongshore
View all skills by jeremylongshore →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
pdf-to-markdown
aliceisjustplaying
Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.
Related MCP Servers
Browse all serversLeverage structured decision making and advanced problem solving techniques for step-by-step analysis and adaptive strat
Frida enables dynamic instrumentation and debugging for mobile and desktop apps, offering advanced process management an
Recraft AI is an ai image generator for creating, editing, and upscaling raster or vector images with advanced artificia
Magic-API is an advanced API documentation platform for managing, debugging, and exploring your swagger API and openapi
Explore Sequential Story for advanced problem solving techniques and methodologies using narrative or Python-based struc
Supercharge Android Studio workflows with AI-driven SVG conversion, live logcat, and advanced mobile dev tools for smart
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.