Call routing determines where conversations flow based on context, user input, and business logic. Effective routing ensures callers reach the right destination quickly, improving satisfaction and reducing handling time.
Routing Methods in Hamsa:
Router Nodes - Conditional logic-based routing
Transition Conditions - Flow between nodes based on rules
Natural Language - AI-powered intent routing
DTMF - Keypad-based menu navigation
Time-Based - Route by time, day, or date
Data-Driven - Route based on caller data or API responses
Caller: "I want to buy your product"→ Intent: "sales"→ Routes to: Sales_DepartmentCaller: "My account isn't working"→ Intent: "support"→ Routes to: Support_DepartmentCaller: "I have a question about my bill"→ Intent: "billing"→ Routes to: Billing_Department
Router: Priority_Router Conditions: # Emergency calls first - {{emergency_keyword}} == true → Emergency_Transfer # VIP customers second - {{customer_tier}} == "VIP" → VIP_Fast_Track # High-value issues third - {{issue_value}} > 10000 → Senior_Support # Everyone else - Always → Standard_QueueEmergency_Transfer: Type: Transfer Call Number: +1-800-EMERGENCY Message: "Transferring you immediately..."VIP_Fast_Track: Type: Conversation Message: "Welcome back, {{customer_name}}. A specialist will be with you in just a moment."Standard_Queue: Type: Conversation Message: "All representatives are currently assisting others. Please hold."
Route differently based on time, day, or date.Business Hours Routing:
Router: Hours_Router Conditions: # Weekend - {{current_weekday}} IN ["Saturday", "Sunday"] → Weekend_Message # Before business hours - {{current_time}} < "09:00" → After_Hours_Message # After business hours - {{current_time}} > "17:00" → After_Hours_Message # Lunch time (reduced staff) - {{current_time}} >= "12:00" AND {{current_time}} < "13:00" → Lunch_Queue # Business hours - Always → Business_Hours_TeamWeekend_Message: Message: "Our offices are closed on weekends. Press 1 to leave a voicemail. Press 2 for emergency support, which may incur additional charges. Press 3 to hear our business hours." Transitions: - DTMF: 1 → Voicemail - DTMF: 2 → Emergency_Support - DTMF: 3 → Business_Hours_Info → Weekend_Message
Holiday Routing:
Router: Holiday_Check Conditions: # Check if current date is a holiday - {{current_date}} == "2024-01-01" → Holiday_Message # New Year's - {{current_date}} == "2024-07-04" → Holiday_Message # July 4th - {{current_date}} == "2024-12-25" → Holiday_Message # Christmas # Normal day - Always → Hours_RouterHoliday_Message: Message: "We're closed today for the holiday. Our offices will reopen on {{next_business_day}}. For emergencies, press 1 now."
Timezone-Aware Routing:
Custom Variables: - caller_timezone: stringRouter: Timezone_Router Conditions: # East Coast hours (9 AM - 5 PM ET) - {{caller_timezone}} == "ET" AND {{current_time}} >= "09:00" AND {{current_time}} < "17:00" → East_Coast_Team # West Coast hours (9 AM - 5 PM PT) - {{caller_timezone}} == "PT" AND {{current_time}} >= "09:00" AND {{current_time}} < "17:00" → West_Coast_Team # After hours any timezone - Always → After_Hours_Support
Distribute calls based on queue length or agent availability.
# This requires integration with your contact center systemRouter: Load_Balancer Conditions: # Check queue sizes via API - {{sales_queue_length}} < {{support_queue_length}} AND {{intent}} == "general" → Sales_Team # Route general inquiries to less busy team # Route to specific queues normally - {{intent}} == "sales" → Sales_Team - {{intent}} == "support" → Support_TeamTool: Check_Queue_Sizes Type: API Call URL: https://api.yourcontactcenter.com/queues Returns: - sales_queue_length - support_queue_length - average_wait_time
Overflow Routing:
Router: Overflow_Check Conditions: # Primary team available - {{primary_queue_wait}} < 120 → # Less than 2 min wait Primary_Team # Overflow to backup team - {{primary_queue_wait}} >= 120 AND {{backup_team_available}} == true → Backup_Team # Offer callback - {{primary_queue_wait}} >= 300 → # 5+ min wait Callback_OfferCallback_Offer: Message: "All agents are busy. Current wait time is {{primary_queue_wait}} minutes. Press 1 to continue holding. Press 2 to request a callback."
Router: Proper_Order Conditions: # 1. Most specific conditions first - {{tier}} == "VIP" AND {{issue}} == "critical" → VIP_Critical # 2. Then specific but less critical - {{tier}} == "VIP" → VIP_Standard # 3. Then general conditions - {{issue}} == "critical" → Critical_Support # 4. Catch-all last - Always → General_Support
Entry: Verify_Identity Message: "For your privacy, please enter your date of birth as 8 digits. For example, January 15th, 1990 would be 01-15-1990." DTMF Input Capture: Variable: date_of_birth Digit Limit: 8Tool: Verify_Patient API: https://api.healthsystem.com/verify Parameters: dob: {{date_of_birth}} phone: {{user_number}} Returns: - patient_verified - patient_name - has_upcoming_appointmentsRouter: Verified_Router Conditions: # Not verified - {{patient_verified}} == false → Manual_Verification # Has upcoming appointment (likely calling about it) - {{has_upcoming_appointments}} == true → Upcoming_Appointment_Options # Verified, no upcoming appointments - Always → Main_MenuUpcoming_Appointment_Options: Message: "Hello {{patient_name}}. I see you have an appointment coming up. Are you calling about: Press 1 to confirm your appointment Press 2 to reschedule Press 3 to cancel Press 4 for something else"Main_Menu: Message: "How can I help you? Press 1 to schedule an appointment Press 2 for prescription refills Press 3 for test results Press 4 to speak with a nurse"