POST
/
telephony
/
callReceived
curl --request POST \
  --url https://demo.enneo.ai/api/mind/telephony/callReceived \
  --header 'Content-Type: application/json' \
  --data '{
  "routing": "none",
  "contractId": 123456,
  "customerId": 789012,
  "phone": "+491234567890",
  "transcript": [
    {
      "speaker": "bot",
      "message": "Hello, my name is AI Assistant. How can I help you today?",
      "timestamp": "2024-01-23T14:32:11Z"
    }
  ],
  "userId": 42,
  "channelId": "call_123abc456",
  "callerName": "John Smith",
  "direction": "in",
  "subchannelId": 5,
  "externalTicketId": "ext-123",
  "status": "open",
  "triggerAiProcessing": true
}'
{
  "success": true,
  "ticketId": 2142,
  "contractId": null,
  "customerId": null,
  "ioResponse": "None, as routing is not external",
  "queueId": 123
}

Authorizations

connect.sid
string
cookie
required

Cookie-based authentication

Body

application/json
routing
enum<string>

Determines how this call should be routed to an agent. Possible values are 'none', 'external', and 'native'.

  • none: Call is not routed, creates a new ticket in status closed, does not run AI agents.
  • external: Call should be routed, but routing engine is external. Enneo processes the ticket via its AI, and either connects to a specified agent (property 'userId' must be provided) or expects a later connection through a subsequent /agentConnected call.
  • native: Call should be routed using Enneo as the call routing engine. Returns a ticketId that can be polled to query agent availability.
Available options:
none,
external,
native
Example:

"none"

contractId
integer | null

Optional contract id, if provided will be used for customer identification

Example:

123456

customerId
integer | null

Optional customer id, if provided will be used for customer identification

Example:

789012

phone
string | null

Optional phone number, if provided will be used for customer identification

Example:

"+491234567890"

transcript
object[]

Array of previous bot transcript entries

A single entry in a conversation transcript

userId
integer | null

Optional id of user that should be associated with the call. If that user has a browser window of enneo open, user will be redirected to the newly created ticket. Same effect as a subsequent /telephony/agentConnected API call. Requires property 'routing' to be set to 'external' or 'none'.

Example:

42

channelId
string | null

Optional unique identifier of a third party system of this call. If provided, then it can be used as reference for any future updates to this call flow

Example:

"call_123abc456"

callerName
string | null

Optional name of the caller. Used for the fromName field of the ticket.

Example:

"John Smith"

direction
enum<string> | null

Direction of the call. Defaults to 'in' if not provided.

Available options:
in,
out
Example:

"in"

subchannelId
integer | null

Optional Enneo subchannel ID to associate with the ticket. Usually the ID of the call line as defined in the Enneo settings

Example:

5

externalTicketId
string | null

Optional external ticket ID to associate with the ticket

Example:

"ext-123"

status
enum<string> | null

Status to set for the ticket. Defaults to 'closed' for routing 'none', 'open' for routing 'external' or 'native'.

Available options:
open,
closed,
pending
Example:

"open"

triggerAiProcessing
boolean | null

Whether to trigger AI processing. Defaults to false for routing 'none', true for routing 'external' or 'native'.

Example:

true

Response

200
application/json
Successful operation
success
boolean
Example:

true

ticketId
integer

ID of the newly created enneo ticket

Example:

2142

contractId
integer | null

Contract ID associated with the call, if any

Example:

null

customerId
integer | null

Customer ID associated with the call, if any

Example:

null

ioResponse
string

Response from IO system when routing is external, otherwise 'None'

Example:

"None, as routing is not external"

queueId
integer

Unique ID of the queue the call was assigned to (only returned if routing is 'native')

Example:

123