CallTransfer

The CallTransfer action transfers an active call to a specific phone number. The AI Employee determines the transfer destination based on conversation context, business working hours, and configured phone number routing criteria. It supports routing to different numbers depending on time of day, department, or issue type.

Triggering event:

  • transfer_call_tool — Triggered when the AI Employee decides a call should be transferred to a human.

How it works

  1. The action checks whether call transfer is enabled for the project.
  2. It retrieves the current business working hours status.
  3. If custom transfer phone numbers are configured:
    • The action analyzes the conversation with a structured schema to select the most appropriate destination number.
    • It validates against working hours if applicable.
    • If the intent is unclear, it sends a clarification prompt back to the agent.
  4. If no custom phone numbers are configured (fallback mode):
    • During business hours: Routes to the working hours escalation number.
    • Outside business hours: Routes to the non-working hours escalation number.
    • Returns an error message if the appropriate number is not configured.
  5. If a destination number is determined, the action sends a transfer_call command to the active voice integration.
  6. If no number can be determined, the action sends an urgent message to the agent with a clarification instruction and logs the failure.

Configuration

Required attributes

AttributeDescription
project_attributes_setting_transfer_call_enabledSet to "True" to enable call transfers.
project_attributes_setting_voice_integration_serviceThe voice integration in use: "NEWO Voice Integration".

Phone number routing

AttributeDescription
project_attributes_setting_transfer_call_phone_numbersJSON object defining phone number routing criteria (department, issue type, etc.). If empty, the action falls back to working hours escalation numbers.
project_business_working_hour_escalation_phonePhone number to transfer to during business hours.
project_business_non_working_hour_escalation_phonePhone number to transfer to outside business hours.
project_representative_agent_voice_phone_country_codeCountry code for phone number formatting.
project_attributes_private_dynamic_phone_variablesFallback phone data for dynamic routing.

Working hours

AttributeDescription
project_business_time_zoneTime zone for working hours calculation.
project_attributes_setting_define_conversation_is_during_working_hours_enabledEnables working hours-based routing.
project_attributes_private_dynamic_schedule_working_hours_objectJSON object defining business working hours.
project_attributes_private_dynamic_schedule_working_daysWorking days of the week.
project_attributes_private_dynamic_schedule_working_hoursWorking hours per day.
project_attributes_private_dynamic_schedule_non_working_daysNon-working days (holidays, closures).

Transfer behavior

AttributeDescription
project_attributes_setting_voice_transfer_call_timeoutSeconds to wait for the transfer to connect. Default: 6.

Commands sent

The following command is issued:

SendCommand(
  commandIdn="transfer_call",
  integrationIdn="newo_voice",
  connectorIdn="newo_voice_connector",
  phoneNumber="+15551234567",
  waitForTransferSeconds="6"
)

Example 1 (Simple escalation)

Configure call transfer with a single escalation number for business hours:

project_attributes_setting_transfer_call_enabled = "True"
project_business_working_hour_escalation_phone = "+15551234567"
project_business_non_working_hour_escalation_phone = "+15559876543"

During business hours, calls transfer to +15551234567. Outside business hours, calls transfer to +15559876543.

Example 2 (Department-based routing)

Configure multiple transfer numbers based on department or issue type:

project_attributes_setting_transfer_call_phone_numbers = {
  "sales": {
    "phone_number": "+15551111111",
    "description": "Sales inquiries and new customer questions"
  },
  "support": {
    "phone_number": "+15552222222",
    "description": "Technical support and existing customer issues"
  },
  "billing": {
    "phone_number": "+15553333333",
    "description": "Billing questions and payment issues"
  }
}

The AI Employee analyzes the conversation to determine which department matches the caller's needs and routes to the appropriate number.