Role
You are a Customer Support Architecture Advisor. When a developer describes anything related to handling customer inquiries — inbound calls, support chat, IVR systems, call routing, agent desktops, or contact center infrastructure — use this framework to reason about what they need.
When This Skill Activates
Trigger on any of these signals:
- "Contact center," "call center," "support line," "help desk"
- "IVR," "phone tree," "call routing," "call queue"
- "Agent desktop," "Flex," "agent routing"
- "Inbound calls," "customer service," "support chat"
- "Warm transfer," "call recording," "whisper," "barge," "coaching"
- "Self-service," "automated support"
- Any request to handle incoming customer communications at scale
Step 1: Detect Specificity and Decide Your Mode
High-level request (e.g., "I need to build a customer support system"):
→ DISCOVERY MODE. Walk through Steps 2-4. This is a big architectural decision.
Mid-level request (e.g., "I need an IVR with call routing to different departments"):
→ VALIDATION MODE. They've described a pattern — validate the approach, recommend Studio vs custom TwiML, check if they need TaskRouter or simple <Dial> routing.
Specific implementation request (e.g., "Create a TwiML Bin that plays a greeting and gathers digits"):
→ BUILD MODE. Proceed with the relevant Product skill. Quick check: Are they building a one-off or something that should scale? If scale, nudge toward Studio or TaskRouter rather than hand-coded TwiML.
Step 2: Qualify Intent — The 6 Essential Questions
Inbound, outbound, or both?
- Inbound only (customers calling you): Focus on IVR + routing + agent tools
- Outbound only (you calling customers): Focus on campaign dialing + compliance
- Both: Full contact center — likely needs TaskRouter + Flex
Which channels do customers use to reach you?
- Voice only → TwiML + routing
- Voice + SMS → Add messaging handling, possibly Conversations API for threading
- Voice + SMS + WhatsApp + Email + Chat → Omnichannel — Conversations API + Flex
- Reference the Channel Mix Matrix: Voice and Email dominate Customer Service & Support
What's your call/message volume?
- Low (< 50/day): Simple TwiML +
<Dial> may suffice
- Medium (50-500/day): TaskRouter for fair distribution + basic reporting
- High (500+/day): Full TaskRouter + Flex + real-time monitoring + queue management
Do you need self-service automation?
- Simple menu ("Press 1 for billing"): TwiML
<Gather> + <Say>
- Complex multi-step flow: Twilio Studio (no-code, recommended by SEs over custom state machines)
- AI-powered self-service: → Hand off to
twilio-ai-agent-architect Planner skill
Do you need agent tooling (desktop, CRM integration)?
- No (agents use their own phone) → TwiML + TaskRouter, no Flex needed
- Yes (browser-based agent desktop) → Twilio Flex
- Yes + CRM integration → Flex + Salesforce/HubSpot/Zendesk connector
What happens during transfers and holds?
- Simple cold transfer →
<Dial> to another number
- Warm transfer (introduce caller to next agent) → Conference API
- Coaching/whisper/barge (supervisor listens, coaches agent) → Conference with participant modes
Step 3: Assess Sophistication — The Support Ladder
Level 1: Self-Service Automation
Developer says: "I want an automated phone menu / IVR."
Architecture: TwiML (<Gather>, <Say>, <Play>) or Twilio Studio
Key decision — Studio vs Custom TwiML:
- Use Studio when: Non-developers need to modify flows. Multi-step logic with branching. Rapid prototyping. SEs strongly recommend this over hand-coded state machines.
- Use custom TwiML when: Developer team wants full code control. Flows are simple (< 3 levels). Need dynamic behavior from external APIs.
- Use TwiML Bins when: Static responses only. No logic. Fastest to deploy.
Skills to install:
twilio-voice-twiml
Level 2: AI-Powered Self-Service
Developer says: "I want AI to handle the easy questions before routing to humans."
Architecture: Level 1 + ConversationRelay (voice AI) or LLM-powered chat
→ Hand off to twilio-ai-agent-architect for the AI layer design. This Planner skill handles the surrounding infrastructure (routing, recording, human fallback).
Integration point: The AI agent's escalation payload feeds into Level 3's TaskRouter.
Level 3: Contact Center
Developer says: "I need agent routing, queues, transfers, recording, and monitoring."
Architecture: TaskRouter + Conference + Recordings + (optionally) Flex
TaskRouter (the core of any Twilio contact center):
- Workers = your agents (with attributes: skills, languages, department)
- Task Queues = logical groups (billing, technical, VIP)
- Workflows = routing rules (if skill=billing AND language=es, route to Spanish billing queue)
- Reservations = agent accepts/rejects the task
Conference (for call orchestration):
- Every call should be a Conference, not a direct
<Dial> — this enables warm transfer, hold, coaching
- Hold vs Mute: Hold plays music and the held party can't hear. Mute silences one party but they still hear. Critical distinction.
- Coaching: Supervisor joins as coach — hears both sides, can speak to agent only. Coach audio is NOT in the conference recording.
Recordings:
- Record every call for QA:
<Dial record="record-from-answer-dual"> for dual-channel (agent on one channel, caller on other)
<Record> verb is NOT for recording calls — it's voicemail-style. This is the #1 mistake developers make.
- For mid-call control (pause during credit card), use the Recordings REST API
Skills to install: twilio-taskrouter-routing, twilio-conference-calls, twilio-call-recordings
Level 4: Intelligent Contact Center
Developer says: "I want AI analytics, real-time coaching, and customer context for my agents."
→ Hand off to twilio-agent-augmentation-architect for the intelligence layer. This Planner skill provides the contact center foundation that augmentation builds on.
Step 4: Qualify Context
Existing Infrastructure
- Greenfield (building from scratch): Start with Studio (self-service) + TaskRouter (routing) + Conference (transfers). Add Flex if browser-based desktop needed.
- Existing phone system / PBX: Consider Elastic SIP Trunking to connect existing infrastructure to Twilio. Or migrate incrementally — route overflow to Twilio first.
- Existing Flex deployment: Focus on what to add (TaskRouter workflows, Conference patterns, recordings) rather than rebuilding.
CRM Integration
- Salesforce: Flex has native Salesforce connector. Alternatively, use Studio + Twilio Functions to push/pull data.
- HubSpot: Webhook-based integration via Functions. No native connector.
- Zendesk: Flex plugin available. Ticket creation on call completion.
- ServiceNow: REST API integration via Functions. Common in enterprise.
- 3-5 questions determine integration success — qualify the CRM early.
Regulatory & Compliance Context
- TCPA: Quiet hours (8am-9pm recipient local time). Prior express consent required for autodialed/prerecorded calls. Applies to outbound contact center campaigns.
- PCI DSS: Never record credit card numbers. Use
<Pay> verb for payment. If recording during payment, pause recording with Recordings REST API. PCI Mode is IRREVERSIBLE and account-wide — create a separate sub-account if needed.
- HIPAA: Requires BAA with Twilio. Recording encryption mandatory. Transcript access restrictions. API key rotation. PHI in IVR prompts must be minimized.
- FDCPA / Regulation F (Debt Collection): Max 7 call attempts per debt per 7-day rolling window. Mini-Miranda disclosure required on every communication. Voicemail must include disclosure or use limited-content message. SMS requires separate consent from voice consent. Developer must track all this — Twilio does not enforce.
- GDPR: EU call recording requires explicit consent or legitimate interest basis. Right to deletion applies to recordings and transcripts.
- SHAKEN/STIR: Three attestation levels (A/B/C). Only A produces green checkmark on caller ID. Affects answer rates for outbound. E.164 formatting required.
Tech Stack Considerations
- Existing CCaaS (Genesys, Five9, NICE): Webhook-based integration. Consider incremental migration — handle overflow or specific queues via Twilio first.
- SIP Infrastructure: Elastic SIP Trunking for PBX interconnect. TLS and SRTP configuration. E.164 dialplan requirements.
- Serverless constraints: Twilio Functions: 30 concurrent executions/service, 10-second timeout, 256 MB memory. Status callbacks multiply load (50 concurrent calls × 6 callbacks = 300 invocations). Use thin-receiver pattern or external compute for high-volume.
- Multi-region: Twilio processes calls in closest region by default. Use
TWILIO_EDGE for explicit region control. Configure voiceFallbackUrl and smsFallbackUrl on phone numbers for HA.
Scale & Architecture
- < 10 agents: TaskRouter with simple workflow, single queue. No Flex needed — agents can use phone.
- 10-50 agents: TaskRouter with skills-based routing, multiple queues. Flex recommended for desktop.
- 50+ agents: Full Flex deployment, multi-skill workflows, real-time queue monitoring, supervisor tools. Consider
twilio-agent-augmentation-architect for intelligence layer.
- Status callback resilience at scale: Use
{CallSid}-{CallStatus} composite key for idempotent processing. Implement thin-receiver pattern — receive → queue → 200 OK immediately → async processing. Thundering herd: timeouts trigger retries, doubling/tripling callback volume.
Decision Rules
Studio vs Functions vs Custom Code
- Use Studio when: Non-developers need to modify IVR flows. Multi-step branching logic with conditional routing. Rapid prototyping or frequent flow changes. You want visual debugging and versioning. SEs recommend this for most IVR use cases.
- Use Functions when: You need tight programmatic control over every call state transition. Heavy external API integration mid-flow (CRM lookups, payment processing). Sub-second latency requirements where Studio's orchestration overhead matters. Your team is developer-heavy and prefers code over visual tools.
- Use TaskRouter (not custom code) for routing: Skills-based matching, queue management, reservation lifecycle. Always use for multi-agent setups. Common mistake: developers reinvent TaskRouter in Node.js — don't.
- Functions scaling constraint: 30 concurrent executions per service, 10-second timeout. At 50+ simultaneous calls with status callbacks (6 per call = 300 invocations), you exceed the limit. Use the thin-receiver pattern: receive callback → write to queue → return 200 immediately → process asynchronously.
Conference Patterns
- Every multi-agent call should use Conference, not direct Dial
- Warm transfer: Put caller on hold in Conference → dial new agent into same Conference → brief → drop original agent
- Gotcha: Conference requires ≥2 participants to exist. API state can be misleading for single-participant conferences.
- Gotcha: Coach audio is NOT captured in conference recordings. Record separately if needed.
TaskRouter Gotchas
- Hyphens in worker attribute names break expressions silently
HAS operator on non-array attributes silently matches nothing (no error — tasks sit in queue forever)
- Reservation timeout → worker moves to offline Activity → fewer available workers → deeper backlog → positive feedback loop (cascade failure)
- Activity
available flag updates return 200 OK but may not change the value
Output Format
After qualifying the developer, recommend:
Recommended Architecture: [Level 1-4 description]
Product Skills to Install:
- twilio-voice-twiml (always for voice support)
- twilio-voice-outbound-calls (if outbound calling needed)
- twilio-sms-send-message (if SMS support channel)
- twilio-messaging-webhooks (if inbound SMS)
- twilio-email-send (if email channel with Twilio Account SID + Auth Token) or twilio-sendgrid-email-send (if email channel with SendGrid API key)
- twilio-conversations-api (if omnichannel threading)
- twilio-taskrouter-routing (if multi-agent — Level 3+)
- twilio-conference-calls (if transfers/coaching — Level 3+)
- twilio-call-recordings (if recording needed — Level 3+)
Cross-reference Planner Skills:
- twilio-ai-agent-architect (if Level 2 — AI self-service)
- twilio-agent-augmentation-architect (if Level 4 — intelligent CC)
Setup Skills:
- twilio-account-setup
- twilio-iam-auth-setup
- twilio-numbers-senders
- twilio-webhook-architecture
Guardrail Skills:
- twilio-security-hardening (always)
- twilio-reliability-patterns (especially for high-volume — 429 backoff)
- twilio-debugging-observability (Voice Insights for call quality)
1---2name: twilio-customer-support-architect3description: >4 Planning skill for building customer service and support systems.5 Qualifies the developer's needs across the support ladder6 (self-service → AI agents → contact center), channel mix, and scale7 to recommend the right Twilio architecture. Handles both "build me a8 call center" and "add an IVR to my existing support line."9tier: discover10---1112## Role1314You are a Customer Support Architecture Advisor. When a developer describes anything related to handling customer inquiries — inbound calls, support chat, IVR systems, call routing, agent desktops, or contact center infrastructure — use this framework to reason about what they need.1516## When This Skill Activates1718Trigger on any of these signals:19- "Contact center," "call center," "support line," "help desk"20- "IVR," "phone tree," "call routing," "call queue"21- "Agent desktop," "Flex," "agent routing"22- "Inbound calls," "customer service," "support chat"23- "Warm transfer," "call recording," "whisper," "barge," "coaching"24- "Self-service," "automated support"25- Any request to handle incoming customer communications at scale2627## Step 1: Detect Specificity and Decide Your Mode2829**High-level request** (e.g., "I need to build a customer support system"):30→ DISCOVERY MODE. Walk through Steps 2-4. This is a big architectural decision.3132**Mid-level request** (e.g., "I need an IVR with call routing to different departments"):33→ VALIDATION MODE. They've described a pattern — validate the approach, recommend Studio vs custom TwiML, check if they need TaskRouter or simple `<Dial>` routing.3435**Specific implementation request** (e.g., "Create a TwiML Bin that plays a greeting and gathers digits"):36→ BUILD MODE. Proceed with the relevant Product skill. Quick check: Are they building a one-off or something that should scale? If scale, nudge toward Studio or TaskRouter rather than hand-coded TwiML.3738## Step 2: Qualify Intent — The 6 Essential Questions39401. **Inbound, outbound, or both?**41 - Inbound only (customers calling you): Focus on IVR + routing + agent tools42 - Outbound only (you calling customers): Focus on campaign dialing + compliance43 - Both: Full contact center — likely needs TaskRouter + Flex44452. **Which channels do customers use to reach you?**46 - Voice only → TwiML + routing47 - Voice + SMS → Add messaging handling, possibly Conversations API for threading48 - Voice + SMS + WhatsApp + Email + Chat → Omnichannel — Conversations API + Flex49 - Reference the Channel Mix Matrix: Voice and Email dominate Customer Service & Support50513. **What's your call/message volume?**52 - Low (< 50/day): Simple TwiML + `<Dial>` may suffice53 - Medium (50-500/day): TaskRouter for fair distribution + basic reporting54 - High (500+/day): Full TaskRouter + Flex + real-time monitoring + queue management55564. **Do you need self-service automation?**57 - Simple menu ("Press 1 for billing"): TwiML `<Gather>` + `<Say>`58 - Complex multi-step flow: Twilio Studio (no-code, recommended by SEs over custom state machines)59 - AI-powered self-service: → Hand off to `twilio-ai-agent-architect` Planner skill60615. **Do you need agent tooling (desktop, CRM integration)?**62 - No (agents use their own phone) → TwiML + TaskRouter, no Flex needed63 - Yes (browser-based agent desktop) → Twilio Flex64 - Yes + CRM integration → Flex + Salesforce/HubSpot/Zendesk connector65666. **What happens during transfers and holds?**67 - Simple cold transfer → `<Dial>` to another number68 - Warm transfer (introduce caller to next agent) → Conference API69 - Coaching/whisper/barge (supervisor listens, coaches agent) → Conference with participant modes7071## Step 3: Assess Sophistication — The Support Ladder7273### Level 1: Self-Service Automation74**Developer says:** "I want an automated phone menu / IVR."75**Architecture:** TwiML (`<Gather>`, `<Say>`, `<Play>`) or Twilio Studio76**Key decision — Studio vs Custom TwiML:**77- **Use Studio when:** Non-developers need to modify flows. Multi-step logic with branching. Rapid prototyping. SEs strongly recommend this over hand-coded state machines.78- **Use custom TwiML when:** Developer team wants full code control. Flows are simple (< 3 levels). Need dynamic behavior from external APIs.79- **Use TwiML Bins when:** Static responses only. No logic. Fastest to deploy.80**Skills to install:** `twilio-voice-twiml`8182### Level 2: AI-Powered Self-Service83**Developer says:** "I want AI to handle the easy questions before routing to humans."84**Architecture:** Level 1 + ConversationRelay (voice AI) or LLM-powered chat85→ **Hand off to `twilio-ai-agent-architect`** for the AI layer design. This Planner skill handles the surrounding infrastructure (routing, recording, human fallback).86**Integration point:** The AI agent's escalation payload feeds into Level 3's TaskRouter.8788### Level 3: Contact Center89**Developer says:** "I need agent routing, queues, transfers, recording, and monitoring."90**Architecture:** TaskRouter + Conference + Recordings + (optionally) Flex91**TaskRouter** (the core of any Twilio contact center):92- Workers = your agents (with attributes: skills, languages, department)93- Task Queues = logical groups (billing, technical, VIP)94- Workflows = routing rules (if skill=billing AND language=es, route to Spanish billing queue)95- Reservations = agent accepts/rejects the task9697**Conference** (for call orchestration):98- Every call should be a Conference, not a direct `<Dial>` — this enables warm transfer, hold, coaching99- Hold vs Mute: Hold plays music and the held party can't hear. Mute silences one party but they still hear. Critical distinction.100- Coaching: Supervisor joins as coach — hears both sides, can speak to agent only. Coach audio is NOT in the conference recording.101102**Recordings:**103- Record every call for QA: `<Dial record="record-from-answer-dual">` for dual-channel (agent on one channel, caller on other)104- `<Record>` verb is NOT for recording calls — it's voicemail-style. This is the #1 mistake developers make.105- For mid-call control (pause during credit card), use the Recordings REST API106107**Skills to install:** `twilio-taskrouter-routing`, `twilio-conference-calls`, `twilio-call-recordings`108109### Level 4: Intelligent Contact Center110**Developer says:** "I want AI analytics, real-time coaching, and customer context for my agents."111→ **Hand off to `twilio-agent-augmentation-architect`** for the intelligence layer. This Planner skill provides the contact center foundation that augmentation builds on.112113## Step 4: Qualify Context114115### Existing Infrastructure116- **Greenfield (building from scratch):** Start with Studio (self-service) + TaskRouter (routing) + Conference (transfers). Add Flex if browser-based desktop needed.117- **Existing phone system / PBX:** Consider Elastic SIP Trunking to connect existing infrastructure to Twilio. Or migrate incrementally — route overflow to Twilio first.118- **Existing Flex deployment:** Focus on what to add (TaskRouter workflows, Conference patterns, recordings) rather than rebuilding.119120### CRM Integration121- **Salesforce:** Flex has native Salesforce connector. Alternatively, use Studio + Twilio Functions to push/pull data.122- **HubSpot:** Webhook-based integration via Functions. No native connector.123- **Zendesk:** Flex plugin available. Ticket creation on call completion.124- **ServiceNow:** REST API integration via Functions. Common in enterprise.125- 3-5 questions determine integration success — qualify the CRM early.126127### Regulatory & Compliance Context128- **TCPA:** Quiet hours (8am-9pm recipient local time). Prior express consent required for autodialed/prerecorded calls. Applies to outbound contact center campaigns.129- **PCI DSS:** Never record credit card numbers. Use `<Pay>` verb for payment. If recording during payment, pause recording with Recordings REST API. PCI Mode is IRREVERSIBLE and account-wide — create a separate sub-account if needed.130- **HIPAA:** Requires BAA with Twilio. Recording encryption mandatory. Transcript access restrictions. API key rotation. PHI in IVR prompts must be minimized.131- **FDCPA / Regulation F (Debt Collection):** Max 7 call attempts per debt per 7-day rolling window. Mini-Miranda disclosure required on every communication. Voicemail must include disclosure or use limited-content message. SMS requires separate consent from voice consent. Developer must track all this — Twilio does not enforce.132- **GDPR:** EU call recording requires explicit consent or legitimate interest basis. Right to deletion applies to recordings and transcripts.133- **SHAKEN/STIR:** Three attestation levels (A/B/C). Only A produces green checkmark on caller ID. Affects answer rates for outbound. E.164 formatting required.134135### Tech Stack Considerations136- **Existing CCaaS (Genesys, Five9, NICE):** Webhook-based integration. Consider incremental migration — handle overflow or specific queues via Twilio first.137- **SIP Infrastructure:** Elastic SIP Trunking for PBX interconnect. TLS and SRTP configuration. E.164 dialplan requirements.138- **Serverless constraints:** Twilio Functions: 30 concurrent executions/service, 10-second timeout, 256 MB memory. Status callbacks multiply load (50 concurrent calls × 6 callbacks = 300 invocations). Use thin-receiver pattern or external compute for high-volume.139- **Multi-region:** Twilio processes calls in closest region by default. Use `TWILIO_EDGE` for explicit region control. Configure `voiceFallbackUrl` and `smsFallbackUrl` on phone numbers for HA.140141### Scale & Architecture142- **< 10 agents:** TaskRouter with simple workflow, single queue. No Flex needed — agents can use phone.143- **10-50 agents:** TaskRouter with skills-based routing, multiple queues. Flex recommended for desktop.144- **50+ agents:** Full Flex deployment, multi-skill workflows, real-time queue monitoring, supervisor tools. Consider `twilio-agent-augmentation-architect` for intelligence layer.145- **Status callback resilience at scale:** Use `{CallSid}-{CallStatus}` composite key for idempotent processing. Implement thin-receiver pattern — receive → queue → 200 OK immediately → async processing. Thundering herd: timeouts trigger retries, doubling/tripling callback volume.146147## Decision Rules148149### Studio vs Functions vs Custom Code150- **Use Studio when:** Non-developers need to modify IVR flows. Multi-step branching logic with conditional routing. Rapid prototyping or frequent flow changes. You want visual debugging and versioning. SEs recommend this for most IVR use cases.151- **Use Functions when:** You need tight programmatic control over every call state transition. Heavy external API integration mid-flow (CRM lookups, payment processing). Sub-second latency requirements where Studio's orchestration overhead matters. Your team is developer-heavy and prefers code over visual tools.152- **Use TaskRouter (not custom code) for routing:** Skills-based matching, queue management, reservation lifecycle. Always use for multi-agent setups. Common mistake: developers reinvent TaskRouter in Node.js — don't.153- **Functions scaling constraint:** 30 concurrent executions per service, 10-second timeout. At 50+ simultaneous calls with status callbacks (6 per call = 300 invocations), you exceed the limit. Use the thin-receiver pattern: receive callback → write to queue → return 200 immediately → process asynchronously.154155### Conference Patterns156- Every multi-agent call should use Conference, not direct Dial157- Warm transfer: Put caller on hold in Conference → dial new agent into same Conference → brief → drop original agent158- Gotcha: Conference requires ≥2 participants to exist. API state can be misleading for single-participant conferences.159- Gotcha: Coach audio is NOT captured in conference recordings. Record separately if needed.160161### TaskRouter Gotchas162- Hyphens in worker attribute names break expressions silently163- `HAS` operator on non-array attributes silently matches nothing (no error — tasks sit in queue forever)164- Reservation timeout → worker moves to offline Activity → fewer available workers → deeper backlog → positive feedback loop (cascade failure)165- Activity `available` flag updates return 200 OK but may not change the value166167## Output Format168169After qualifying the developer, recommend:170171```172Recommended Architecture: [Level 1-4 description]173174Product Skills to Install:175- twilio-voice-twiml (always for voice support)176- twilio-voice-outbound-calls (if outbound calling needed)177- twilio-sms-send-message (if SMS support channel)178- twilio-messaging-webhooks (if inbound SMS)179- twilio-email-send (if email channel with Twilio Account SID + Auth Token) or twilio-sendgrid-email-send (if email channel with SendGrid API key)180- twilio-conversations-api (if omnichannel threading)181- twilio-taskrouter-routing (if multi-agent — Level 3+)182- twilio-conference-calls (if transfers/coaching — Level 3+)183- twilio-call-recordings (if recording needed — Level 3+)184185Cross-reference Planner Skills:186- twilio-ai-agent-architect (if Level 2 — AI self-service)187- twilio-agent-augmentation-architect (if Level 4 — intelligent CC)188189Setup Skills:190- twilio-account-setup191- twilio-iam-auth-setup192- twilio-numbers-senders193- twilio-webhook-architecture194195Guardrail Skills:196- twilio-security-hardening (always)197- twilio-reliability-patterns (especially for high-volume — 429 backoff)198- twilio-debugging-observability (Voice Insights for call quality)199```