Skip to content

SwitchboardCode-First Contact Center Framework

Build and manage Amazon Connect Contact Centers with code

Quick Example

csharp
using Switchboard.Infrastructure;

var app = new SwitchboardApp();

// Create a new Connect instance
var callCenter = app.CreateCallCenter("MyCallCenter", "my-call-center");

// Add business hours
var businessHours = HoursOfOperation
    .Create("Business Hours")
    .WithTimeZone("America/New_York")
    .WithStandardBusinessHours()
    .Build(callCenter);

// Add queues
var salesQueue = Queue
    .Create("Sales")
    .SetDescription("Sales inquiries")
    .SetMaxContacts(50)
    .Build(callCenter, businessHours.HoursOfOperation.Name);

var supportQueue = Queue
    .Create("Support")
    .SetDescription("Support requests")
    .SetMaxContacts(50)
    .Build(callCenter, businessHours.HoursOfOperation.Name);

// Create a contact flow with IVR menu
Flow
    .Create("Main Menu")
    .SetType(FlowType.ContactFlow)
    .PlayPrompt("Welcome to our call center!")
    .GetCustomerInput(
        """
        To speak to sales, press 1.
        To speak to support, press 2.
        """,
        branch =>
            branch
                .OnDigit("1", sales => sales
                    .PlayPrompt("Transferring to sales...")
                    .TransferToQueue("Sales")
                    .Disconnect())
                .OnDigit("2", support => support
                    .PlayPrompt("Transferring to support...")
                    .TransferToQueue("Support")
                    .Disconnect())
                .OnDefault(menuDefault =>
                    menuDefault
                        .PlayPrompt("Invalid selection. Goodbye.")
                        .Disconnect())
                .OnTimeout(menuTimeout =>
                    menuTimeout
                        .PlayPrompt("No selection received. Goodbye.")
                        .Disconnect())
                .OnError(menuError =>
                    menuError
                        .PlayPrompt("An error occurred. Goodbye.")
                        .Disconnect()),
            menu => menu.TimeoutSeconds = 10,
            "main-menu")
    .Build(callCenter);

app.Synth();

Installation

bash
dotnet add package NickSoftware.Switchboard
npm install -g aws-cdk

Why I Built This

The Problem

Traditional Amazon Connect development is painful:

  • Massive JSON templates that are impossible to read or maintain
  • Manual ARN replacement every time you export/import a flow
  • Zero validation until deployment—errors only appear after pushing to AWS
  • No meaningful version control—diffing JSON files with generated IDs is useless
  • Hidden bugs that are hard to catch before they cause issues

I'm a developer. I wanted to write code, not wrestle with JSON.

The Solution: Code-First Contact Centers

With a code-first approach:

Code is readable and understandable—flows look like actual logic, not configuration soup ✅ Real collaboration—code reviews, pull requests, team development ✅ Self-documenting—the code speaks for itself about what gets created ✅ Fluent API—IntelliSense guides you through every configuration option ✅ Built on CDK—you still have full power to customize when needed ✅ Version control that works—meaningful diffs, rollback capability, audit trail

For Developers, By a Developer

Switchboard was built to solve my problems. Maybe you have the same ones:

  • You prefer writing code over clicking through consoles
  • You want type safety and IntelliSense support
  • You believe infrastructure should be version-controlled
  • You think bugs should be caught at compile-time, not runtime
  • You need to collaborate with your team effectively

If this resonates with you, Switchboard is for you.


Ready to stop wrestling with JSON and start writing code?

👉 Get Started in 5 Minutes


📚 Documentation

Getting Started

Building Resources

Advanced Topics

Architecture & Design

Preview release - Licensing terms TBD before 1.0