
Les variables de contexte sont disponibles dans les API’s
- Dans l’API Monitoring
Dans l’API Monitoring, nous observons que ce point de terminaison
« https://sfrrec00-sfrvalid.sfrtestglobalcc.com/MonitoringAPI/api/tenants/sfrrec00-sfrvalid/Queues »
renvoie le contenu des données suivantes :
Cf. exemple :
-------------------------------------
{
"values": [
{
"sessionID": 23442,
"dataBagInfo": [
{
"key": "motifContact",
"value": "réclamation",
"agentsPermission": 1,
"supervisorPermissions": true
}
],
"contactInformation": null,
"enqueueDate": "2023-10-20T14:10:40.303",
"serviceID": 9,
"contact": "+33623950487",
"mediaType": 4201,
"serviceName": "inbound001-aen",
"canDo": null,
"subject": null,
"threadID": 0,
"timeInQueue": "00:00:18"
},
{
"sessionID": 23428,
"dataBagInfo": [
{
"key": "motifContact",
"value": "vide",
"agentsPermission": 1,
"supervisorPermissions": true
}
],
"contactInformation": null,
"enqueueDate": "2023-10-17T08:23:10",
"serviceID": 9,
"contact": "abderrahim.ennakori@sfr.com",
"mediaType": 4204,
"serviceName": "inbound001-aen",
"canDo": null,
"subject": "test 001",
"threadID": 0,
"timeInQueue": "3.05:47:48"
},
{
"sessionID": 23429,
"dataBagInfo": [
{
"key": "motifContact",
"value": "vide",
"agentsPermission": 1,
"supervisorPermissions": true
}
],
"contactInformation": null,
"enqueueDate": "2023-10-17T08:23:10",
"serviceID": 9,
"contact": "abderrahim.ennakori@sfr.com",
"mediaType": 4204,
"serviceName": "inbound001-aen",
"canDo": null,
"subject": "test 001",
"threadID": 0,
"timeInQueue": "3.05:47:48"
}
],
"@count": 3,
"@pageIndex": 0,
"@pageSize": 15,
"@previousPage": null,
"@nextPage": "...."
}
-------------------------------------
- Dans le SDK One Agent
Sur oneAgentWeb SDK, la nouvelle version intègre deux nouvelles méthodes (updateAdditionalInfo + getAdditionalInfo). Le contexte est aussi disponible sur certains événements, on peut le récupérer et l’utiliser sur CallOffering.
Cf. exemple :
-------------------------------------
api.onCallOffering = function(event){
var context = event.Session.Context;
showInfo('onCallOffering', context);
}
function showInfo(source, context){
console.log("showInfo start from: " + source )
if(context == null) { console.log("showInfo start context: null"); return; }
console.log("showInfo start context: " + context.toString());
document.getElementById('databagDiv').innerHTML = '';
if (context.length > 0) {
let str = '';
str += "<h5>Databag List</h5>";
str += "<table class='table-striped'>";
str += "<thead><tr><th scope='col'>Key</th><th scope='col'>Value</th><th scope='col'>AgentVisibility</th><th scope='col'>SupVisibility</th></tr></thead><tbody>";
context.forEach((ctx) => {
str += "<tr>";
str += "<td>" + ctx['Key'] + "</td>";
str += "<td>" + ctx['Value'] + "</td>";
str += "<td>" + ctx['AgentsPermission'] + "</td>";
str += "<td>" + ctx['SupervisorPermissions'] + "</td>";
str += "</tr>";
});
str += "</tbody></table>";
document.getElementById('databagDiv').innerHTML = str;
}
}
-------------------------------------
Global Contact Center