Push Report Webhook

Webhooks are important to integrate your CRM into Deepcall’s environment. Report webhook is one of them. You can add multiple webhooks in the panel to get reports on your CRM. You can set different webhooks based on call type, DID numbers, campaigns, etc. or can simply set one webhook for all.

Once a webhook is added in the panel, the system will verify and activate it. To be an active webhook it should be a valid URL and must respond as GODBLESSYOU.

Once it is active and verified, a webhook qualifies to receive reports on it. System will send reports in Json format. Attributes of this json format are as follows.

Data Format

Field Type Description
callId string

It is a unique id for each call.

callStatus integer

This is the status of the call.

cType string

Possible Values

  • IBD
  • OBD
  • CTC
  • QC
  • BRD
  • POOL
  • MASK
  • FLASH
DID string | null

DID Number

For IBD call only
campId integer | 0

Campaign id

  • for OBD value > 0
  • for QC, CTC value >= -1
  • for IBD value = 0

-1 campaign id stands for default campaign

ivrSTime "YYYY-MM-DD HH:MM:SS"

HH is in 24 hrs format

IVR Start Time

  • It is the time when system starts the process of calling
  • It will be the earliest time logged in the report. All the other time points will be either equal or greater than this.
ivrETime "YYYY-MM-DD HH:MM:SS"

HH is in 24 hrs format

IVR End Time

  • It is the time when system finishes the process related to this call
  • It will be the longest time logged in this report. All the other time points will be either equal or smaller than this.
ivrDuration integer

Difference between ivrETime and ivrSTime in seconds

userId string

User Id

cNumber string | null

Customer Number

  • Phone/Landline number in E164 format

Definition in case of,

  • IBD : the one who is calling
  • OBD, QC, POOL : the one on which system is calling, other than Agent Id
  • CTC : answered number of to parameter of CTC API if toType=number
masterNumCTC string | null
  • Answered number of from parameter of CTC API if toType=number
  • Phone/Landline number in E164 format
  • Only applicable if cType=CTC
masterAgent integer

It is possible that more than one agent is involved in a call. This parameter will hold the agent id whoever attends the call first

masterAgentNumber string | null

Phone/Landline number in of masterAgent in E164 format

masterGroupId integer

Id of the Agent Group for which masterAgent received the call

firstAttended string

It holds the category of the person who answered the call first. Possible values are,

  • customer
  • agent
  • from
  • NULL

In case of,

  • IBD : always customer
  • OBD, QC, CTC : as per settings/parameters

Null value means, nobody has answered the call.

firstAnswerTime "YYYY-MM-DD HH:MM:SS"

Answer time of firstAttended

From this point of time the call actually starts.

lastHangupTime "YYYY-MM-DD HH:MM:SS"

Hangup time of person who disconnected the call in the last

From this point of time the call ends.

lastFirstDuration integer

Duration between lastHangupTime and firstAnswerTime

This is actually the call duration.

This duration is in seconds

talkDuration integer

Total talk duration in the call. It is in seconds

custAnswerSTime "YYYY-MM-DD HH:MM:SS"

In case of,

  • OBD, QC : When customer answers the call
  • IBD : When we receives call from customer and Answer module of IVR is called
  • CTC : When one of the numbers in to parameter answers the call
custAnswerETime "YYYY-MM-DD HH:MM:SS"

When customer / caller / to number hangups the call

custAnswerDuration integer

It is the answer duration of customer/caller/ to number in seconds.

custAnswerDuration = custAnswerETime - custAnswerSTime

agentOnCallDuration integer

Total duration when agents are connected. It is possible that more than one agent is involved in the call. It is the sum of durations of all agents.

totalHoldDuration integer

Total hold duration during the call. It is in seconds.

forward boolean

If the call is being forwarded by an agent then the value of this field will be true otherwise false

Possible Values

  • true
  • false
ivrExecuteFlow string

INode by node execution of the IVR during the call. Each node is prefixed by # and separated by comma.

Example

"#2,#8,#9,HANGUP"

HangupBySourceDetected integer

It specifies that if the call is terminated by the caller or system.

Possible Values

  • 0 : customer/caller
  • 1 : system
ivrIdArr integer Array

It contains the IVR id of used during the call.

Example

[315]

totalCreditsUsed json

Details of the used credits.

It contains three attributes,

  • freeHit : sum of used free hits of the modules
  • paidHit : sum of the paid hits of the modules
  • amount : total amount used during this call

All the attributes are integers but amount is float

Example

{ "freeHit": 0, "paidHit": 0, "amount": 0 }

aH integer array

This field refers to Agent History. It contains ids of all the agents who have been called during the call whether they answer or not.

Example

[202,301,258]

aAnsH integer array

This field refers to Agent Answered History. It contains ids of all the agents who have answered the call.

Example

[202,301]

aHDetail json array

This field refers to Agent History Detail. It contains meta information about the aH field. aHDetail stores the data in the same order as aH.

For example if agent id 301 is on the 1st index of the aH then its meta information will also be on the 1st index of aHDetail.

Example

[ {...}, {...}, {...} ]

nH string array

This field refers to Number History. This field will be non-empty only in the case of CTC.

This field contains all the phone numbers which have been called during the call. It doesn’t matter whether the number is in from or to field.

Format of the phone/landline number will be E164

Example

["919000000000","919000000001"]

nHDetail json array

This field refers to Number History Detail. It contains meta information about the nH field. nHDetail stores the data in the same order as nH.

For example if 919000000000 is on the 1st index of the nH then its meta information will also be on the 1st index of nHDetail.

Format of the phone/landline number will be E164

Example

[ {...}, {...}, {...} ]

recordings json array

It contains information about the recordings in json format. For each recording there are following attributes,

  • nodeid : node id in string
  • visitId : visit id of the agent/number
  • file : path of the recording
  • time : time of recording

Example


{ 
  "nodeid": "#3", 
  "visitId": "1618572632763", 
  "file": "/filepath/49_QC.wav", 
  "time": "2021-04-16 17:00:49" 
} 
exitCode integer

This contains the reason of call end.

contactId string

unique id of the contact from contact list (only in case of campaign)

queueDuration integer

The queueDuration parameter refers to the total amount of time an entity spends in a queue before all calls are initiated (originated). This value is measured in seconds and provides critical insight into the waiting period before the system processes and begins the call initiation.

retry_count integer

The retry_count parameter represents the number of retry attempts made to successfully initiate a specific call. It is primarily used to track how many times the system has attempted to originate a call after the initial attempt failed or did not receive a response.

cliArr json Object

This JSON object contains details about caller IDs used during a call sequence between a customer and an agent. It is structured as follows

modules json Object

This JSON array contains objects that represent different modules executed during an IVR (Interactive Voice Response) flow. Each object provides detailed information about a specific module, its timing, and associated values. The data is arranged sequentially based on the order of IVR flow execution.

callDisposition json Object

This JSON array contains objects representing interactions or events related to an agent and their associated hierarchical disposition data. Each object records specific details, including the agent's identifier, the time of the event, and hierarchical levels of disposition.

api_para Object

The provided JSON structure represents the parameters submitted via an API to initiate a call or any related process.


callStatus

Value of callStatus can have slightly different meaning in the case of Click to Call (CTC). So here is a comparison list of description between CTC and general cases, i.e., cases when call type is Inbound, Campaign, Quick Call, etc.

Status Code Description (general) Description (CTC)
3 Both Answered Both Answered
4 Cust. Ans. - Agent Unans. To Ans. - From Unans.
5 Cust. Ans To Ans
6 Cust. Unans - Agent Ans. To Unans - From Ans.
7 Agent Unanswered From Unanswered
8 Cust. Unans. To Unans.
9 Both Unanswered Both Unanswered
10 Agent Ans. From Ans.
11 Rejected Call Rejected Call
12 Skipped Skipped
13 Agent Failed From Failed
14 Cust. Failed - Agent Ans. To Failed - From Ans.
15 Cust. Failed To Failed
16 Cust. Ans - Agent Failed To Ans - From Failed
17 Agent Busy From Busy
18 Cust. Ans - Agent Not Found To Ans. - From Not Found
19 Cust. Unans - Agent Busy To Unans. - From Busy
20 Cust. Hangup in Queue To Hangup in Queue
21 Cust. Hangup To Hangup

aHDetail

Attribute Type Description
CTC string | null

Possible Values

  • null
  • to
  • from
agentId integer

Id of the agent

groupId integer

Id of the group in which agent was present at the time of calling

status string

Possible Values

  • answered
  • failed
recording string

Path of the recording file

ping string

Possible Values

  • direct
  • forward
agentNumber string | E164

Destination number of the agent at the time of calling

visitId string

Unique visit id

nodeId string

Example

"#7"

totalRingDuration integer

Total ring duration in seconds

totalHoldDuration integer

Total hold duration in seconds

talkDuration integer

Total talk duration in seconds

talkSTime "YYYY-MM-DD HH:MM:SS"
talkETime "YYYY-MM-DD HH:MM:SS"
answerSTime "YYYY-MM-DD HH:MM:SS"
answerETime "YYYY-MM-DD HH:MM:SS"
answerDuration integer

Answer duration by agent in seconds

cli string | E164

Caller id in E164 format

retry integer

nHDetail

Attribute Type Description
CTC string | null

Possible Values

  • null
  • to
  • from
status string

Possible Values

  • answered
  • failed
recording string

Path of the recording file

ping string

Possible Values

  • direct
  • forward
number string | E164

Number passed during CTC API request

visitId string

Unique visit id

nodeId string | null

Node id prefixed with #

Example

"#7"

totalRingDuration integer

Total ring duration in seconds

totalHoldDuration integer

Total hold duration in seconds

talkDuration integer

Total talk duration in seconds

talkSTime "YYYY-MM-DD HH:MM:SS"
talkETime "YYYY-MM-DD HH:MM:SS"
answerSTime "YYYY-MM-DD HH:MM:SS"
answerETime "YYYY-MM-DD HH:MM:SS"
answerDuration integer

Answer duration by agent in seconds

cli string | E164

Caller id in E164 format

retry integer

Exit Code

Exit Code Description
1

Account Suspended

2

Agent Busy

3

Blocked DID

4

Caller : Busy

5

Caller : Invalid Number

6

Caller : Not Reachable

7

Caller : Switch Off

8

Caller Blacklisted

9

Caller Hangedup

10

Channel Limit

11

Contact List Issue

12

DID Not Found

13

Hangup From Live Action

14

Inactive Module

15

Invalid API Parameter

16

Invalid IVR Flow

17

IVR Configuration Issue

18

IVR Flow Finished

19

Lock Amount Not Found

20

Low Credit

21

Next Due Date Passed

22

No IVR Is Mapped

23

Omit Call

24

Operator Issue

25

Plan Not Found

26

SMS Response Issue

27

SMS Setting Invalid

28

System Issue

29

Unanswered

30

Call Skip

31

Agent not assigned to CLI

32

Trunk is down

33

Hold abandoned

34

Queue abandoned

35

Agent hangedup callers call (from callBox)

36

Forward queue abandoned

37

Talk abandoned


cliArr

Attribute Type Description
Structure Object

Structure:

{
    "136": [
        "9197828XXXXX",
        "9198828XXXXX"
    ],
    "customer": [
        "9190000XXXXX"
    ]
}
                

This JSON object contains details about caller IDs used during a call sequence between a customer and an agent.

Keys in the Object:

  • agentId: Numerical value representing the agent ID. Example: 136
  • customer: Exact text "customer" in string. This is present if the call type is IBD, OBD, or BRD (other than CTC).
  • Mobile number: Mobile number in E.164 format. This is present in case the call type is CTC.
Array Positions Array

The value of a key is an array of Caller IDs associated with the key (customer, agent, or number).

Array Positions:

  • The 0th position in the array specifies the Caller ID that will be displayed during the first call.
  • The 1st position in the array specifies the Caller ID that will be displayed after the first call, and so on.

modules

Attribute Type Description
Structure Array of Objects

Structure:

[
    {
        "node": "#2",
        "module": "ANSWER_THIS_CALL",
        "starttime": 1731505880399,
        "endtime": 1731505880399,
        "value": 1
    },
    {
        "node": "#4",
        "module": "ANNOUNCEMENT",
        "starttime": 1731505880399,
        "endtime": 1731505880410,
        "value": "This is test audio"
    }
]
                

This JSON array contains objects that represent different modules executed during an IVR (Interactive Voice Response) flow. Each object provides detailed information about a specific module, its timing, and associated values. The data is arranged sequentially based on the order of IVR flow execution.

Key Details of Each Object Object Properties
  • node: Represents the step or identifier of the module within the IVR flow. Each step is denoted by a unique number, such as "#2" or "#4". This helps define the order in which the modules are executed.
  • module: Specifies the type of IVR module being executed. For example:
    • "ANSWER_THIS_CALL": Indicates the call-answering module.
    • "ANNOUNCEMENT": Indicates a module where an announcement is played.
  • starttime and endtime: Represent the timestamps (in milliseconds) marking when the module started and ended execution. These times help track the duration of each module's activity.
  • value: Provides the data or action-specific value related to the module:
    • For "ANSWER_THIS_CALL", the value (1) could represent that the call was successfully answered.
    • For "ANNOUNCEMENT", the value contains the message ("This is test audio") played to the user.

callDisposition

Attribute Type Description
Structure Array of Objects

Structure:

[
    {
        "agentId": "ABC",
        "time": "15.11.2024 16:30:20",
        "level1": "title of level 1",
        "level2": "title of level 2",
        "level3": "title of level 3"
    }
]
                

This JSON array contains objects representing interactions or events related to an agent and their associated hierarchical disposition data. Each object records specific details, including the agent's identifier, the time of the event, and hierarchical levels of disposition.

Key Details of Each Field Object Properties
  • agentId: Represents the name of the agent involved in the event.
    • Example: "ABC" is the agent's ID.
  • time: Indicates the timestamp when the event occurred.
    • Format: "DD.MM.YYYY HH:MM:SS" (e.g., "15.11.2024 16:30:20").
  • level1: Represents the title or description of the first hierarchical level.
    • Example: "title of level 1" could denote a broad category or primary information.
  • level2: Represents the title or description of the second hierarchical level.
    • Example: "title of level 2" could provide more specific sub-category details.
  • level3: Represents the title or description of the third hierarchical level.
    • Example: "title of level 3" could provide even more granular details or a specific action.

api_para

Attribute Type Description
Structure Object

Structure:

{
    "mobile": "91930XXXXXX8",
    "param_1": "value_1",
    "param_2": "value_2",
    ...
    "param_n": "value_n"
}
                

This JSON object contains key-value pairs representing the parameters submitted via an API to initiate a call or related process. The structure is dynamic, with one mandatory field and optional custom fields.

Key Details of Each Field Object Properties
  • mobile:

    This field is required to identify the recipient of the process.

    • Format: Must be provided in international format (e.g., "91930XXXXXX8").
  • param_1, param_2, ..., param_n:

    Users can include any number of additional fields for their specific needs.

    • These fields are optional.
    • Their names and values are user-defined.
    • Example:
      "param_1": "value_1",
      "param_2": "value_2"
                                      
  • Dynamic Nature:

    The API accepts a flexible structure, enabling users to provide the data they need without predefined limitations.

  • Response Consistency:

    The system will return the same fields provided in the API request in the webhook response, ensuring that users receive all their custom fields back for further processing or tracking.

Sample Data
{
    "did": null, 
    "cType": "QC", 
    "campId": -1, 
    "ivrSTime": "2021-04-16 17:00:50", 
    "ivrETime": "2021-04-16 17:04:45", 
    "ivrDuration": 235, 
    "userId": "87164080", 
    "cNumber": "9190000XXXXX", 
    "masterNumCTC": null, 
    "masterAgent": 136, 
    "masterAgentNumber": "9197828XXXXX", 
    "masterGroupId": 0, 
    "talkDuration": 235, 
    "agentOnCallDuration": 247, 
    "callId": "knk1qft1161857267828372659", 
    "firstAttended": "agent", 
    "firstAnswerTime": "2021-04-16 17:00:38", 
    "lastHangupTime": "2021-04-16 17:04:45", 
    "lastFirstDuration": 247, 
    "custAnswerSTime": "2021-04-16 17:00:50", 
    "custAnswerETime": "2021-04-16 17:04:45", 
    "custAnswerDuration": 235, 
    "callStatus": 3, 
    "ivrExecuteFlow": "#2,#3,#1,HANGUP", 
    "HangupBySourceDetected": 0, 
    "forward": "false", 
    "totalHoldDuration": 0, 
    "totalCreditsUsed": {
        "freeHit": 0, 
        "paidHit": 0, 
        "amount": 0
    }, 
    "ivrIdArr": [
        176
    ], 
    "aAnsH": [
        136
    ], 
    "aH": [
        136
    ], 
    "nH": [ ], 
    "recordings": [
        {
            "nodeid": "#3", 
            "visitId": "1618572632763", 
            "file": "/202104/knk1qft1161857267828372659_97828XXXXX_2021-4-16-17-0-49_QC.wav", 
            "time": "2021-04-16 17:00:49"
        }
    ], 
    "cliArr": {
        "136": [
            "9197828XXXXX",
            "9198828XXXXX"
        ],
        "customer": [
            "9190000XXXXX"
        ]
    }, 
    "aHDetail": [
        {
            "CTC": null, 
            "agentId": 136, 
            "groupId": 0, 
            "status": "answered", 
            "recording": "/202104/knk1qft1161857267828372659_97828XXXXX_2021-4-16-17-0-49_QC.wav", 
            "ping": "direct", 
            "agentNumber": "9197828XXXXX", 
            "visitId": "1618572632763_0", 
            "nodeId": "#3", 
            "totalRingDuration": 4, 
            "totalHoldDuration": 0, 
            "talkDuration": 235, 
            "talkSTime": "2021-04-16 17:00:50", 
            "talkETime": "2021-04-16 17:04:45", 
            "answerSTime": "2021-04-16 17:00:38", 
            "answerETime": "2021-04-16 17:04:45", 
            "answerDuration": 247, 
            "cli": "917447133300", 
            "retry": 0
        }
    ], 
    "nHDetail": [ ],
    "modules": [
        {
            "node": "#2",
            "module": "ANSWER_THIS_CALL",
            "starttime": 1731505880399,
            "endtime": 1731505880399,
            "value": 1
        },
        {
            "node": "#4",
            "module": "ANNOUNCEMENT",
            "starttime": 1731505880399,
            "endtime": 1731505880410,
            "value": "This is test audio"
        }
    ],
    "callDisposition" : [
        {
            "agentId": "ABC",
            "time": "15.11.2024 16:30:20",
            "level1": "title of level 1",
            "level2": "title of level 2",
            "level3": "title of level 3"
        }
    ],
    "api_para":{
        "mobile": "91930XXXXXX8",
        "param_1": "value_1",
        "param_2": "value_2",
        "param_3": "value_3"
    },
    "queueDuration":0,
    "retry_count":1,



}
  
      
©2021-2024 DeepCall (Powered by Sarv.com). All rights reserved.