Smartflo Response Format

After processing the incoming request, your application must return a valid JSON response that instructs Smartflo how to handle the incoming call. Based on the response received, Smartflo can:

  • Transfer the call to one or more supported destinations.
  • Invoke another API Dialplan to continue the routing process.
  • Dynamically enable or disable call recording for the current call.

Smartflo validates the response before executing the requested action. If the response is invalid, incomplete, or not received within the configured timeout, the configured Failover Destination is executed.

Response Structure

The Smartflo response consists of one or more response objects.

Response ObjectDescriptionMandatory
transferDefines the destination to which the call should be transferred.Yes*
api_dialplanExecutes another API Dialplan instead of transferring the call directly.Yes*
disable_call_recordingEnables or disables call recording for the current call.No

Note: Either transfer or api_dialplan must be present in the response.

Disable Call Recording

The disable_call_recording parameter allows you to dynamically control call recording for individual calls without changing the account-level recording configuration.

ValueBehaviour
trueDisables call recording for the current call.
falseEnables call recording according to the account configuration.

Sample Response

[
  {
    "disable_call_recording": true
  },
  {
    "transfer": {
      "type": "number",
      "data": [
        "946XXX508"
      ]
    }
  }
]

Transfer Response

The transfer object instructs Smartflo to transfer the active call to a supported destination. A transfer response consists of the destination type and the corresponding destination identifier. Depending on the transfer type, additional parameters such as ring strategy, Music on Hold (MOH), and skip active agents can also be configured.

Transfer Object

FieldDescriptionData TypeMandatory
typeSpecifies the destination type.StringYes
dataDestination identifier(s).Array / StringYes
ring_typeRing strategy when multiple destinations are provided.StringNo
mohSystem Music on Hold (MOH) recording ID.StringNo
skip_activeSkips busy agents during routing. Default is false.BooleanNo

Note: If Smartflo does not receive a valid response due to an invalid payload, timeout, or endpoint failure, the configured Failover Destination is executed.

Supported Transfer Types

The following transfer types are supported by API Dialplan.

1. Call Transfer using Agent Number

Use this transfer type to route an incoming call directly to one or more mobile numbers without requiring the agents to be configured on the Smartflo portal. This is particularly useful for organizations where agents are managed externally or when calls need to be routed to field staff, partners, vendors, or temporary support personnel.

Sample Response

[
  {
    "transfer": {
      "type": "number",
      "data": ["981XXXXXXX"]
    }
  }
]

2. Call Transfer using Agent ID

Use this transfer type to transfer calls to one or more agents who are already configured in your Smartflo account. Instead of using mobile numbers, the API references the unique Agent IDs assigned by Smartflo.

Routing through Agent IDs allows Smartflo to utilize agent-specific configurations such as login status, availability, permissions, and device preferences. This method is recommended when your agents are managed directly through the Smartflo platform.

Sample Response

[
  {
    "transfer": {
      "type": "agent",
      "data": ["05xxXX001"]
    }
  }
]

3. Call Transfer using Agent Extension

This transfer type routes the call to one or more Smartflo Agent Extensions instead of mobile numbers or Agent IDs. It is primarily used in organizations where agents handle calls through desk phones, IP phones, or Smartflo Softphone extensions.

Using Agent Extensions enables Smartflo to deliver calls directly to the agent's extension while leveraging extension-based routing capabilities.

Sample Response

[
  {
    "transfer": {
      "type": "agent",
      "data": ["060XXXX01"]
    }
  }
]

4. Call Transfer to an IVR

Use this transfer type to route the active call to an existing Interactive Voice Response (IVR) configured in your Smartflo account. This allows callers to continue through a predefined IVR workflow where they can listen to announcements, select menu options using DTMF, or be routed to appropriate departments or agents based on their input.

This transfer type is commonly used when additional caller interaction is required after the API has performed customer validation or business logic. Specify the IVR ID associated with the target IVR in the data field.

Sample Response

[
  {
    "transfer": {
      "type": "ivr",
      "data": ["22XX0"]
    }
  }
]

5. Call Transfer to an Auto Attendant

Use this transfer type to route the call to a configured Auto Attendant within your Smartflo account. An Auto Attendant automatically greets callers and routes them based on predefined business rules, operating hours, holidays, or menu selections without requiring manual intervention.

This transfer type is useful when the API determines that the caller should continue through an automated call flow rather than being directly connected to an agent. Specify the Auto Attendant ID in the data field to identify the destination.

Sample Response

[
  {
    "transfer": {
      "type": "auto_attendant",
      "data": ["2XX90"]
    }
  }
]

6. Call Transfer to Multiple Agents

Use this transfer type to route an incoming call to multiple agents configured in your Smartflo account. Instead of specifying a single Agent ID, you can provide a list of Agent IDs, allowing Smartflo to distribute the call based on the configured ring strategy.

This transfer type is ideal for departments such as Sales, Customer Support, Helpdesk, or Technical Support, where multiple agents are available to handle incoming calls.

When multiple Agent IDs are provided, Smartflo supports the following ring strategies:

  • order_by – Calls each agent sequentially in the order specified until the call is answered or all agents have been attempted.
  • simultaneous – Rings all configured agents simultaneously and connects the call to the first available agent who answers.

You can also configure skip_active to skip agents who are already engaged on another call and moh to play a Music on Hold recording while Smartflo attempts to connect the caller.

Sample Response

[
  {
    "transfer": {
      "type": "agent",
      "data": ["05XXX01", "050XXX02", "0500XX03"],
      "ring_type": "order_by",
      "skip_active": true,
      "moh": "1XX5"
    }
  }
]

7. Call Transfer to Multiple Numbers

This transfer type allows Smartflo to transfer the call to multiple mobile numbers within a single request. It is commonly used for group routing scenarios where multiple team members are responsible for handling incoming calls.

Depending on the configured ring_type, Smartflo can either:

  • Ring each number sequentially until one of the recipients answers (order_by), or
  • Ring all configured numbers simultaneously and connect the call to the first recipient who answers (simultaneous).

You can additionally configure skip_active to bypass busy recipients and moh to play Music on Hold while Smartflo attempts to establish the connection. This routing method is ideal for support teams, sales groups, on-call engineers, branch offices, or any scenario where multiple recipients can handle the incoming call.

Sample Response

[
  {
    "transfer": {
      "type": "number",
      "data": ["99XXXX655", "99XXXXX54", "998XXX653"],
      "ring_type": "order_by",
      "skip_active": true,
      "moh": "1XXX5"
    }
  }
]

8. Call Transfer to Voice Streaming

Use this transfer type to route the active call to a configured Voice Streaming integration. This enables Smartflo to stream the live audio of the call to an external application or AI platform for real-time processing. Voice Streaming is commonly used for AI-powered voice assistants, speech-to-text transcription, sentiment analysis, conversational AI, voice authentication, and other real-time voice processing use cases.

Specify the configured Voice Streaming ID in the data field. Smartflo uses this identifier to locate the appropriate Voice Streaming configuration and transfers the active call accordingly.

Sample Response

[
  {
    "transfer": {
      "type": "voice_streaming",
      "data": ["22XXX0"]
    }
  }
]

9. Call Transfer to SIP Trunk

Use this transfer type to transfer the active call directly to a configured SIP Trunk. This allows Smartflo to route calls to external telephony infrastructure, IP-PBX systems, contact centers, or third-party communication platforms connected through SIP.

Specify the configured SIP Trunk ID in the data field. Smartflo uses this identifier to identify the target SIP Trunk configuration and seamlessly transfer the call to the associated SIP endpoint. This transfer type is commonly used in hybrid telephony deployments, enterprise PBX integrations, carrier interconnections, and scenarios where calls need to be handed over to external SIP-enabled systems.

Sample Response

[
  {
    "transfer": {
      "type": "sip_trunk",
      "data": ["27XXX0"]
    }
  }
]

10. Call Transfer to Department

Use this transfer type to transfer the active call directly to a configured department. This allows Smartflo to route the call to the agents or users associated with the selected department.

Specify the configured Department ID in the data field. Smartflo uses this identifier to identify the target department and route the call accordingly. This transfer type is useful when calls need to be routed to a specific team or department based on the call flow, customer requirement, or business logic.

Sample Response

[
  {
    "transfer": {
      "type": "department",
      "data": ["27XXX0"]
    }
  }
]