getIVRList
To retreive the IVR list and pass the call to the IVR so it can send the information to the client trough the IVR and then give back control to the agent.
nuxibaIntegration.getIVRList();
Evento onIVRList
Returns the IVR list to pass the script id that will be played to the client.
/**
* @description Regresa la lista de IVR
* @event onIVRList
* @param {Array} IVRList Lista de IVR configurados [{name:String, id:int}]
* @example [{ name: "Banamex", id: 3 }, { name: "Bancomer", id: 2 }]
* @see getIVRList
* @tutorial IVR
*/
function onIVRList(IVRList) {
console.log("onIVRList ", IVRList);
printToConsole("onIVRList");
document.getElementById("IVRList").innerHTML = "";
let tempIVRList = document.getElementById("IVRList");
for (i = 0; i < IVRList.length; i++) {
let option = document.createElement("option");
option.text = IVRList[i].id + "=" + IVRList[i].name;
option.value = IVRList[i].id;
tempIVRList.add(option);
}
}
idleStart
To start comunication between the agent and the client, this method returns the event: onIdleStart
Event onIdleStart
Returns that the IVR block started
/**
* @description IVR starts on the client side
* @event onIdleStart
* @param {int} IVRId IVR block
* @see idleStart
* @tutorial IVR
*/
function onIdleStart(IVRId) {
console.log("onIdleStart ", IVRId);
printToConsole("onIdleStart: " + IVRId);
}
Event onIdleEnd
Returns the digits that the client press to the IVR for the integrations to use them.
/**
* @description Termina IVR con el cliente
* @event onIdleEnd
* @param {string} IVRInput Dígitos marcados por el cliente en el IVR
* @tutorial IVR
*/
function onIdleEnd(IVRInput) {
console.log("onIdleEnd ", IVRInput);
printToConsole("onIdleEnd: " + IVRInput);
}