Skip to content

Configuration Reference

This reference documents configuration options for Switchboard resources.

Stack Configuration

StackProps

Standard AWS CDK stack properties.

csharp
new StackProps
{
    Env = new Amazon.CDK.Environment
    {
        Account = "123456789012",
        Region = "us-east-1"
    },
    Description = "My contact center infrastructure",
    Tags = new Dictionary<string, string>
    {
        ["Environment"] = "Production",
        ["Project"] = "ContactCenter"
    }
}

Properties:

  • Env - AWS environment (account + region)
  • Description - Stack description
  • Tags - Resource tags
  • StackName - Override stack name
  • TerminationProtection - Enable deletion protection

Queue Configuration

QueueBuilder Options

csharp
var queue = new QueueBuilder()
    .SetName("CustomerService")           // Required
    .SetDescription("Main support queue") // Optional
    .SetMaxContacts(100)                  // Optional (default: no limit)
    .SetOutboundCallerId("Acme", "+1...") // Optional
    .AddTag("Department", "Support")      // Optional
    .Build();

Configuration:

PropertyTypeRequiredDefaultDescription
NamestringYes-Queue name
DescriptionstringNonullQueue description
MaxContactsintNonullMax contacts in queue
OutboundCallerIdNamestringNonullOutbound caller name
OutboundCallerIdNumberstringNonullOutbound caller number
TagsDictionaryNoemptyResource tags

Routing Profile Configuration

RoutingProfileBuilder Options

csharp
var profile = new RoutingProfileBuilder()
    .SetName("AgentProfile")                          // Required
    .SetDescription("General agent profile")          // Optional
    .SetDefaultOutboundQueue("OutboundQueue")        // Optional
    .AddMediaConcurrency(ChannelType.Voice, 1)       // Required (at least one)
    .AddQueue("QueueName", ChannelType.Voice, 1)     // Required (at least one)
    .Build();

Configuration:

PropertyTypeRequiredDefaultDescription
NamestringYes-Profile name
DescriptionstringNonullProfile description
DefaultOutboundQueueIdstringNonullDefault outbound queue
MediaConcurrenciesListYes-Channel concurrency configs
QueueConfigsListYes-Queue associations
TagsDictionaryNoemptyResource tags

Media Concurrency Configuration

csharp
.AddMediaConcurrency(ChannelType.Voice, 1)
.AddMediaConcurrency(ChannelType.Chat, 3)
.AddMediaConcurrency(ChannelType.Task, 5)

Parameters:

  • channel - ChannelType (Voice, Chat, Task)
  • concurrency - Number of simultaneous contacts (must be > 0)

Channel Types:

  • ChannelType.Voice - Phone calls
  • ChannelType.Chat - Text chat
  • ChannelType.Task - Async tasks

Queue Configuration

csharp
.AddQueue("QueueName", ChannelType.Voice, priority: 1, delay: 0)

Parameters:

  • queueId - Queue name or ARN
  • channel - Channel type for this queue
  • priority - Priority (1 = highest, higher numbers = lower priority)
  • delay - Delay in seconds before routing (default: 0)

Hours of Operation Configuration

Hours Configuration

csharp
var hours = new HoursOfOperation
{
    Name = "BusinessHours",                   // Required
    Description = "M-F 9-5",                 // Optional
    TimeZone = "America/New_York"            // Required
};

hours.AddDayConfig(new HoursOfOperationConfig
{
    Day = DayOfWeek.Monday,                  // Required
    StartTime = new TimeRange { Hours = 9, Minutes = 0 },  // Required
    EndTime = new TimeRange { Hours = 17, Minutes = 0 }    // Required
});

Hours Properties:

PropertyTypeRequiredDefaultDescription
NamestringYes-Hours schedule name
DescriptionstringNonullSchedule description
TimeZonestringYes-IANA timezone identifier
ConfigListYes-Day configurations
TagsDictionaryNoemptyResource tags

Day Configuration

PropertyTypeRequiredDescription
DayDayOfWeekYesDay of week
StartTimeTimeRangeYesOpening time
EndTimeTimeRangeYesClosing time

TimeRange:

  • Hours - Hour (0-23)
  • Minutes - Minute (0-59)

Common Timezones

RegionIANA Identifier
US EasternAmerica/New_York
US CentralAmerica/Chicago
US MountainAmerica/Denver
US PacificAmerica/Los_Angeles
UTCUTC
LondonEurope/London
TokyoAsia/Tokyo
SydneyAustralia/Sydney

Flow Configuration

FlowBuilder Options

csharp
var flow = new FlowBuilder()
    .SetName("MainFlow")                        // Required
    .SetDescription("Main menu flow")           // Optional
    .SetType(FlowType.ContactFlow)             // Optional (default: ContactFlow)
    .AddTag("Department", "Sales")             // Optional
    .PlayPrompt("Welcome")                     // Add actions...
    .Build();

Flow Properties:

PropertyTypeRequiredDefaultDescription
NamestringYes-Flow name
DescriptionstringNonullFlow description
TypeFlowTypeNoContactFlowFlow type
ContentstringYes-Flow JSON (generated)
TagsDictionaryNoemptyResource tags

Flow Types

FlowTypeAWS ValuePurpose
ContactFlowCONTACT_FLOWStandard inbound flow
CustomerQueueFlowCUSTOMER_QUEUEQueue wait music
CustomerHoldFlowCUSTOMER_HOLDHold music
CustomerWhisperFlowCUSTOMER_WHISPERPre-connect customer message
AgentWhisperFlowAGENT_WHISPERPre-connect agent message
AgentHoldFlowAGENT_HOLDAgent hold music
OutboundWhisperFlowOUTBOUND_WHISPEROutbound call whisper
AgentTransferFlowAGENT_TRANSFERAgent transfer flow
QueueTransferFlowQUEUE_TRANSFERQueue transfer flow

Action Configuration

GetCustomerInput Configuration

csharp
.GetCustomerInput("Enter your account number", input =>
{
    input.MaxDigits = 10;          // Max digits (default: 1)
    input.TimeoutSeconds = 10;     // Timeout (default: 5)
    input.EncryptInput = true;     // Encrypt (default: false)
})

InvokeLambda Configuration

csharp
.InvokeLambda("FunctionName", lambda =>
{
    lambda.TimeoutSeconds = 8;     // Lambda timeout (default: 3)
})

Branch Configuration

csharp
.Branch(branch =>
{
    branch.Case("1", "action-id");                            // Simple case
    branch.When("expr", "action-id", ComparisonOperator.Equals); // Complex condition
    branch.Otherwise("default-action");                        // Fallback
})

Tags

Tags are key-value pairs for organizing and tracking resources.

Adding Tags

csharp
// Queue tags
var queue = new QueueBuilder()
    .SetName("Support")
    .AddTag("Department", "CustomerService")
    .AddTag("CostCenter", "CC-1234")
    .AddTag("Environment", "Production")
    .Build();

// Flow tags
var flow = new FlowBuilder()
    .SetName("MainFlow")
    .AddTag("FlowType", "Menu")
    .AddTag("Version", "2.0")
    .Build();

// Stack tags
new StackProps
{
    Tags = new Dictionary<string, string>
    {
        ["Project"] = "ContactCenter",
        ["Owner"] = "TeamA"
    }
}

Best Practices

  1. Use Consistent Keys: Department, Environment, CostCenter
  2. Tag All Resources: Apply tags to stacks and resources
  3. Use for Cost Tracking: Tag by cost center or project
  4. Use for Organization: Tag by team, owner, or purpose

Environment Variables

Use environment variables for configuration:

csharp
new StackProps
{
    Env = new Amazon.CDK.Environment
    {
        Account = Environment.GetEnvironmentVariable("CDK_DEFAULT_ACCOUNT"),
        Region = Environment.GetEnvironmentVariable("CDK_DEFAULT_REGION") ?? "us-east-1"
    }
}

Common Environment Variables:

  • CDK_DEFAULT_ACCOUNT - AWS account ID
  • CDK_DEFAULT_REGION - AWS region
  • AWS_PROFILE - AWS credentials profile

Best Practices

1. Use Descriptive Names

csharp
// Good
.SetName("CustomerSupportBusinessHours")

// Avoid
.SetName("Hours1")

2. Add Descriptions

csharp
// Good
.SetDescription("Main customer support queue for general inquiries")

// Avoid leaving descriptions empty

3. Set Appropriate Limits

csharp
// Consider your team size
.SetMaxContacts(100) // For 20 agents

// Not
.SetMaxContacts(10000) // Unrealistic for small team

4. Use Meaningful Tags

csharp
// Good - Organized tags
.AddTag("Department", "Sales")
.AddTag("Tier", "VIP")
.AddTag("CostCenter", "CC-SALES-001")

// Avoid - Unclear tags
.AddTag("Tag1", "Value1")

5. Validate Configuration

csharp
// Validate before adding to stack
queue.Validate();
hours.Validate();
profile.Validate();
flow.Validate();

Preview release - Licensing terms TBD before 1.0