Call Disposition
When a call is ended in uContact, a disposition can be added to identify how the call concluded, allowing for reporting or creating actions based on the disposition.
All data enclosed in "{{ }}" are values that will be replaced with the client's own data and/or the corresponding instance.
HTTP Request
Method | Resource |
POST | Integra/resources/api/DispositionCall |
Request Header
Key | Value |
Content-Type | application/x-www-form-urlencoded |
Authorization | Basic {{Token}} |
Request Body
Parameter | Type | Required | Description |
campaign |
Text | Yes | Name of the campaign |
agent |
Text | Yes | Agent's username |
callerid |
Text | Yes | Phone number of the contact |
guid |
Text | Yes | Unique call identifier |
l1 |
Text | Yes | Level 1 disposition |
l2 |
Text | Yes | Level 2 disposition (Can be empty) |
l3 |
Text | Yes | Level 3 disposition (Can be empty) |
d1 |
Text | Yes | Extra data to save (Can be empty) |
d2 |
Text | Yes | Extra data to save (Can be empty) |
comment |
Text | Yes | Comment for the disposition (Can be empty) |
schedule |
Text | Yes | Date and time to schedule the call in the format AAAA-MM-DD HH:MI:SS (Can be empty) |
camptoreschedule |
Text | Yes | Dialer to schedule the call (Can be empty) |
tag |
Text | Yes | Text for disposition tag or empty (Can be empty) |
Code Examples
You can copy the following code examples and replace the "{{variable}}" with the correct data.
HTTP
POST /Integra/resources/api/DispositionCall HTTP/1.1
Host: {{Instancia}}.ucontactcloud.com
Content-Type: application/x-www-form-urlencoded
Authorization: Basic {{Token}}
Content-Length: 173
campaign=campana-%3E&agent=Vcisneros&callerid=1234567890&guid=f9b7ada3-a4e5-4795-834d-aa1c1a37ee57&l1=Tipificacion1&l2=&l3=&d2=&d2=&comment=&schedule=&camptoreschedule=&tag=
cURL
curl --location --request POST 'https://{{Instancia}}.ucontactcloud.com/Integra/resources/api/DispositionCall' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic {{Token}}' \
--data-urlencode 'campaign=campana->' \
--data-urlencode 'agent=Vcisneros' \
--data-urlencode 'callerid=1234567890' \
--data-urlencode 'guid=f9b7ada3-a4e5-4795-834d-aa1c1a37ee57' \
--data-urlencode 'l1=Tipificacion1' \
--data-urlencode 'l2=' \
--data-urlencode 'l3=' \
--data-urlencode 'd2=' \
--data-urlencode 'd2=' \
--data-urlencode 'comment=' \
--data-urlencode 'schedule=' \
--data-urlencode 'camptoreschedule=' \
--data-urlencode 'tag='
JavaScript
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
myHeaders.append("Authorization", "Basic {{Token}}");
var urlencoded = new URLSearchParams();
urlencoded.append("campaign", "campana->");
urlencoded.append("agent", "Vcisneros");
urlencoded.append("callerid", "1234567890");
urlencoded.append("guid", "f9b7ada3-a4e5-4795-834d-aa1c1a37ee57");
urlencoded.append("l1", "Tipificacion1");
urlencoded.append("l2", "");
urlencoded.append("l3", "");
urlencoded.append("d2", "");
urlencoded.append("d2", "");
urlencoded.append("comment", "");
urlencoded.append("schedule", "");
urlencoded.append("camptoreschedule", "");
urlencoded.append("tag", "");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://{{Instancia}}.ucontactcloud.com/Integra/resources/api/DispositionCall", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
JQuery
var settings = {
"url": "https://{{Instancia}}.ucontactcloud.com/Integra/resources/api/DispositionCall",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Basic {{Token}}"
},
"data": {
"campaign": "campana->",
"agent": "Vcisneros",
"callerid": "1234567890",
"guid": "f9b7ada3-a4e5-4795-834d-aa1c1a37ee57",
"l1": "Tipificacion1",
"l2": "",
"l3": "",
"d2": "",
"d2": "",
"comment": "",
"schedule": "",
"camptoreschedule": "",
"tag": ""
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
C#
var client = new RestClient("https://{{Instancia}}.ucontactcloud.com/Integra/resources/api/DispositionCall");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddHeader("Authorization", "Basic {{Token}}");
request.AddParameter("campaign", "campana->");
request.AddParameter("agent", "Vcisneros");
request.AddParameter("callerid", "1234567890");
request.AddParameter("guid", "f9b7ada3-a4e5-4795-834d-aa1c1a37ee57");
request.AddParameter("l1", "Tipificacion1");
request.AddParameter("l2", "");
request.AddParameter("l3", "");
request.AddParameter("d2", "");
request.AddParameter("d2", "");
request.AddParameter("comment", "");
request.AddParameter("schedule", "");
request.AddParameter("camptoreschedule", "");
request.AddParameter("tag", "");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "campaign=campana->&agent=Vcisneros&callerid=1234567890&guid=f9b7ada3-a4e5-4795-834d-aa1c1a37ee57&l1=Tipificacion1&l2=&l3=&d2=&d2=&comment=&schedule=&camptoreschedule=&tag=");
Request request = new Request.Builder()
.url("https://{{Instancia}}.ucontactcloud.com/Integra/resources/api/DispositionCall")
.method("POST", body)
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.addHeader("Authorization", "Basic {{Token}}")
.build();
Response response = client.newCall(request).execute();
Python
import http.client
conn = http.client.HTTPSConnection("{{Instancia}}.ucontactcloud.com")
payload = 'campaign=campana-%3E&agent=Vcisneros&callerid=1234567890&guid=f9b7ada3-a4e5-4795-834d-aa1c1a37ee57&l1=Tipificacion1&l2=&l3=&d2=&d2=&comment=&schedule=&camptoreschedule=&tag='
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Basic {{Token}}'
}
conn.request("POST", "/Integra/resources/api/DispositionCall", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HTTP Response
Successful Response
"OK"
Error Response
"0"