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
|
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" |
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
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 | string |
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 |
Node by node execution of the IVR during the call. Each node is prefixed by # and separated by comma.
Example Format
"#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 Format
[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 Format
{ "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 Format
[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 Format
[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 Format
[ {...}, {...}, {...} ]
|
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 Format
["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.
Example Format
[ {...}, {...}, {...} ]
|
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 Format
{
"nodeid": "#3",
"visitId": "1618572632763",
"file": "/202104/knk1qft116182341673632796659_7004138739_2021-4-16-17-0-49_QC.wav",
"time": "2021-04-16 17:00:49"
}
|
callStatus
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 |
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 |
For 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 #
For 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 |
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"
],
"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": [ ]
}