---
title: "Smart routing event"
method: POST
path: "smart_routing"
tags: ["webhook"]
---

# Smart routing event

`POST smart_routing` (webhook)

The Smart routing webhook event is a little more tricky because the webhook requires a response from you within two seconds. When the webhook lands on your <em>endpoint</em>, your endpoint must communicate the response object below.  We advise you to consult the description of each attribute, which are all mandatory.
This event can apply to an IVR.

To certify that the request was sent by Ringover, the `x-ringover-webhook-signature` header must be a JWT signed with the webhook key you can find in the IVR redirection step scenario configuration, using algorithm HS512.

## Payload

- WebhookRequestSmartRouting
  - `event` string
  - `resource` string
  - `timestamp` number
  - `data` object
    - `call_id` integer
    - `direction` 'inbound' | 'outbound'
    - `from_number` string
    - `to_number` string

## Acknowledgement `200`

Successful operation

- WebhookResponseSmartRouting
  - `name` string, required
  - `dispatch` 'random' | 'topdown' | 'ringall', required — The method of dispatch used.
  - `strategy` 'history_lastcalled' | 'history_mostcalled' | 'history_longestcalled' | 'min_duration_called' | 'min_nb_calls' | 'global_most_available' | 'ivr_most_available' | 'most_available' | 'global_most_available_with_snooze' | 'ivr_most_available_with_snooze' | 'most_available_with_snooze' | 'crm', nullable — Machine learning dispatch strategy based on historical patterns
  - `strategy_interval` 'DAY' | 'WEEK' | 'MONTH', nullable — Should be defined if strategy is not null
  - `strategy_select` 'ORDER' | 'ORDER_ONLY' | 'UNIQUE', nullable — Should be defined if strategy is not null
  - `max_attempts` integer, required — The number of times the agent loop will be executed.
  - `start_delay` integer, required — The delay before the first ring.
  - `priority` integer — The priority in the scenario queue. A higher value means a higher priority.
  - `is_stay_not_connected` boolean, required — If the agent is disconnected:<br /> '0': Skip that agent and move on to the next one.<br /> '1': Wait for the agent to log on and send them the call.
  - `is_stay_in_call` boolean, required — If the agent already has a call in progress:<br /> '0': Skip that agent and move on to the next one.<br /> '1': Wait for the agent to finish and send them the call.
  - `is_stay_planned_snoozed` boolean, required — If outside of the agent’s scheduled hours:<br /> '0': Skip that agent and move on to the next one.<br /> '1': Puts the caller on hold until the agent enters their scheduled hours then calls them.
  - `is_stay_snoozed` boolean, required — If the agent is in snooze:<br /> '0': Skip that agent and move on to the next one.<br /> '1': Puts the caller on hold until the agent's snooze period ends, then calls them.
  - `ring_overlap` integer, required — Delay (in seconds) before starting to ring the next agent in the list, while keeping the previous agents ringing. This creates an overlap where several agents can ring simultaneously. Value must be between 1 and 120 (recommended: minimum 5).
  - `groups` object[]
    - `ring_duration` integer — Ringing duration (in seconds).
    - `is_caller_id` boolean — Which number should we display to the agent?<br /> '0': The IVR's number.<br /> '1': The caller's number.
    - `is_head_line` boolean — What should we do if this external agent is already in call?<br /> '0': Wait for his call to end.<br /> '1': Force the call (he will receive a dual call).
    - `ring_delay` integer — Waiting time before ringing (in seconds).
    - `is_pre_answer` boolean — Does the agent need to confirm that they accept the call? '0': option deactivated, no confirmation needed<br /> 1 (default value): option activated, the agent needs to accept the call before taking it.
    - `order` integer — Position in the queue of agents.
    - `id` integer — Group identifier.
  - `agents` union[], required
    - union
      - AgentExternal
        - `agent_type` string — Agent type and identification means.<br /> ⚠️ This field is used to explain how to use this object, BUT not need to put it.
        - `ring_duration` integer — Ringing duration (in seconds).
        - `ring_delay` integer — Waiting time before ringing (in seconds).
        - `order` integer — Position in the queue of agents.
        - `number` integer, required — Agent's phone number (international format).
        - `is_pre_answer` boolean — Does the agent need to confirm that they accept the call? '0': option deactivated, no confirmation needed<br /> 1 (default value): option activated, the agent needs to accept the call before taking it.
        - `is_caller_id` boolean — Which number should we display to the agent?<br /> '0': The IVR's number.<br /> '1': The caller's number.
        - `is_head_line` boolean — What should we do if this external agent is already in call?<br /> '0': Wait for his call to end.<br /> '1': Force the call (he will receive a dual call).
      - AgentInternalIdentifiedByNumber
        - `agent_type` string — Agent type and identification means.<br /> ⚠️ This field is used to explain how to use this object, BUT not need to put it.
        - `ring_duration` integer — Ringing duration (in seconds).
        - `ring_delay` integer — Waiting time before ringing (in seconds).
        - `order` integer — Position in the queue of agents.
        - `number` integer, required — Agent's phone number, in international format.
      - AgentInternalIdentifiedByUserid
        - `agent_type` string — Agent type and identification means.<br /> ⚠️ This field is used to explain how to use this object, BUT not need to put it.
        - `ring_duration` integer — Ringing duration (in seconds).
        - `ring_delay` integer — Waiting time before ringing (in seconds).
        - `order` integer — Position in the queue of agents.
        - `user_id` integer, required — Agent's unique identifier.
      - AgentInternalIdentifiedByEmail
        - `agent_type` string — Agent type and identification means.<br /> ⚠️ This field is used to explain how to use this object, BUT not need to put it.
        - `ring_duration` integer — Ringing duration (in seconds).
        - `ring_delay` integer — Waiting time before ringing (in seconds).
        - `order` integer — Position in the queue of agents.
        - `email` string, required — Agent's email.

## Other responses

- `default` — Other response code are ignored

---

[API](https://skmtc.net/ringover/apis/ringover-public-api.md) · [All operations](https://skmtc.net/ringover/apis/ringover-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ringover/ringover-public-api/revisions/9da73dd2f99e/schema)
