Set Blocks
Set blocks configure contact properties, behaviors, and retrieve metrics.
Blocks in this Category
- SetContactAttributes - Set or update contact attributes
- SetLoggingBehavior - Enable or disable flow logging
- SetRecordingBehavior - Control call recording
- SetWhisperFlow - Configure whisper flows for agents
- SetQueueMetrics - Retrieve queue statistics
- SetCallback - Configure callback settings
Overview
Set blocks allow you to:
- Store customer data - Account info, preferences, selections
- Configure behaviors - Logging, recording, whispers
- Prepare for routing - Set working queue, callback number
- Gather metrics - Queue status, wait times
Common Patterns
Storing Customer Information
csharp
Flow.Create("Customer Setup")
.InvokeLambda("GetCustomerInfo")
.OnSuccess(s => s.SetContactAttributes(attrs =>
{
attrs["CustomerName"] = Attributes.External("Name");
attrs["AccountId"] = Attributes.External("AccountId");
attrs["CustomerTier"] = Attributes.External("Tier");
}))
.OnError(e => e.PlayPrompt("Welcome!"))
.PlayPrompt($"Welcome, {Attributes.Contact("CustomerName")}!")
.TransferToQueue("Support");Enabling Features
csharp
Flow.Create("Configured Flow")
.SetLoggingBehavior(true)
.SetRecordingBehavior(true)
.SetWhisperFlow("AgentWhisper")
.PlayPrompt("Your call may be recorded.")
.TransferToQueue("Support");Queue Selection
csharp
Flow.Create("Queue Selection")
.GetCustomerInput("Press 1 for Sales, 2 for Support.")
.OnDigit("1", s => s.SetWorkingQueue("Sales"))
.OnDigit("2", s => s.SetWorkingQueue("Support"))
.OnDefault(d => d.SetWorkingQueue("General"))
.TransferToQueue("$.Attributes.SelectedQueue"); // Dynamic transferAttribute Types
| Type | Description | Persistence |
|---|---|---|
| Contact Attributes | User-defined values | Persist for contact duration |
| Flow Attributes | Temporary variables | Only in current flow |
| Segment Attributes | Complex nested values | For analytics/reporting |
See Also
- Attributes Reference - Attribute types and access patterns