Skip to content

Flow Building Blocks Reference

This section provides comprehensive API documentation for each flow block available in Switchboard. Flow blocks are the core building units for creating Amazon Connect contact flows.

Block Categories

Interact

Blocks that interact with customers through prompts and input collection.

Check

Blocks that evaluate conditions and branch the flow accordingly.

Integrate

Blocks that integrate with external systems and other flows.

Set

Blocks that configure contact properties and behaviors.

Terminate

Blocks that end or transfer the contact flow.

Logic

Blocks that control flow execution logic.

  • Loop - Repeat a section of the flow
  • Wait - Pause flow execution

Common Patterns

Error Handling

Most blocks support error handling through .OnError():

csharp
.PlayPrompt("Welcome!")
    .OnError(error => error
        .PlayPrompt("Technical difficulties. Please try again.")
        .Disconnect())

Branch Continuation

Use .ThenContinue() to explicitly continue to the next action after a branch:

csharp
.GetCustomerInput("Press 1 for Sales, 2 for Support")
    .OnDigit("1", sales => sales
        .SetContactAttributes(attrs => attrs["Department"] = "Sales")
        .ThenContinue())  // Continue to next action after this branch
    .OnDigit("2", support => support
        .SetContactAttributes(attrs => attrs["Department"] = "Support")
        .ThenContinue())
.TransferToQueue("General")  // Both branches continue here

Join Points

Use .JoinPoint() and .ContinueAt() for complex flow convergence:

csharp
.PlayPrompt("Welcome!", "MainMenu")
.GetCustomerInput("Press 1 or 2")
    .OnDigit("1", one => one
        .PlayPrompt("You pressed 1")
        .ContinueAt("MainMenu"))  // Go back to main menu
    .OnDigit("2", two => two
        .TransferToQueue("Support"))

Quick Reference

BlockCategoryPurpose
PlayPrompt()InteractPlay audio/TTS message
GetCustomerInput()InteractCollect DTMF/voice input
StoreCustomerInput()InteractCapture encrypted input
CheckContactAttribute()CheckBranch on attribute values
CheckHoursOfOperation()CheckBranch on business hours
CheckStaffing()CheckBranch on agent availability
InvokeLambda()IntegrateCall Lambda function
SetContactAttributes()SetUpdate contact attributes
SetLoggingBehavior()SetConfigure logging
Loop()LogicRepeat flow section
Wait()LogicPause execution
Disconnect()TerminateEnd contact
TransferToQueue()TerminateTransfer to queue
TransferToFlow()TerminateTransfer to flow

Preview release - Licensing terms TBD before 1.0