Paul Bădărău

Twilio Flex for charities: building a coaching desk

Building a Twilio Flex contact centre for a children's charity: one configurable desk, multi-day conversations that survive timeouts, and synced Salesforce.

A large children's charity runs a free parenting support service where parents message a qualified coach by webchat or WhatsApp. I was one of the developers who built and maintained the Twilio Flex platform behind it, in a team that started with two developers and grew to four; in 2025/26, 3,984 parents received one-to-one coaching through it.

Because conversations run over days with parents stepping away and returning, the record of what was said matters long after the chat ends, so the desk behaves differently from a sales call centre.

Twilio Flex lets the desk follow the service

Flex is a programmable contact-centre platform, and the charity needed a desk shaped around how its coaches actually work: booked follow-up sessions, handovers between colleagues, links to local services, and case records in Salesforce. A generic ticket queue wouldn't have covered that. Flex gives you the building blocks (Studio for conversation flows, TaskRouter for routing, and Conversations for messages), while your team writes and maintains everything that adapts the desk to the service.

Build one desk, switch features per service

We built the coaches' desk as a single Flex plugin in React, organised into modules for task management, transfers, scheduled sessions, follow-ups, out-of-hours requests, saved replies, supervisor drop-ins, surveys, and reminders. Each service turns on only the modules it needs. When the charity later launched a second service on the same platform (a text and email helpline where coaches support young people aged 13 to 18), it ran on the same codebase with different features enabled; running separate plugins per service causes them to drift apart, forcing every fix to be made multiple times.

Route every message deliberately

Every incoming message passes through a Twilio Studio flow before a coach sees it. The flow records the request, reads what the parent entered before starting the chat, checks opening hours, and routes the conversation to the right TaskRouter queue, sending anything that raises concern to a safeguarding specialist. Outside opening hours, messages are logged as out-of-hours requests so a coach can pick them up when the service opens; for a parent writing at eleven at night, getting a clear promise that a coach will reply tomorrow matters.

Make conversations survive the platform

Twilio can delete a task at the platform level when a timeout hits, which would otherwise make a parenting conversation that paused for a day vanish from the coach's view. We handled that in the TaskRouter callbacks: when Twilio deletes a task, our server reopens the conversation, creates a new task on the same workflow, and routes it back to the coach who was handling it (or to the original queue if that coach is unavailable), keeping recreated tasks open for up to two weeks. The same callbacks track the original task identity across recreations, pause scheduled follow-ups while a chat is active, and snooze accepted tasks when a coach goes offline, all without the parent seeing any change.

Keep Salesforce and the chat in step

Every conversation has to land accurately in the charity's Salesforce case records, since staff rely on those notes long after the chat finishes, and much of our maintenance work went into chat history, data integrity, and sync reliability. A Node.js server sits between Flex, Twilio, and Salesforce, with Redis-backed workers handling transcripts, follow-ups, reminders, message syncing, and regular health checks on live conversations. Whenever either side changed or a sync failed, the recovery job had to restore the missing data without duplicating records, because a case record that disagrees with the chat creates real operational risk.

Budget for ongoing Flex development

Flex pays off when you treat it as software you own rather than an off-the-shelf tool: budget for an ongoing development team alongside the licence, design around multi-day conversations, build one configurable desk if you run more than one service, decide early where the record of truth lives, and handle Twilio's own lifecycle limits like task timeouts before they surprise a coach in live sessions.