Integra Framework

FunctionDescription

UC_exec

(sqlquery,dsn,callback)

Runs an SQL query on the Base (INSERT, UPDATE, DELETE), it may or may not have a callback.

sqlquery: INSERT UPDATE or DELETE.

dsn: Data source name, empty for the Default Base CCREPO.

callback: Null or name of the function that is executed when returning the result.

value: If the value is true the function will return the value of the base, otherwise, it will return OK or ERROR

UC_exec
UC_exec("INSERT INTO ccrepo.DC_Telefono VALUES ('" + nombreAgente+ "','" + 
$("#phone").val() + "','" + fecha + "') ON DUPLICATE KEY UPDATE proximo_contacto = '" + 
fecha + "'","",respsaveproxcontacto, true);

UC_exec_async

Structure: (sqlquery,dsn)

Runs an SQL query on the Base (INSERT, UPDATE, DELETE), it may or may not have a callback.

sqlquery: INSERT UPDATE or DELETE.

dsn: Data source name, empty for the Default Base CCREPO.

value: If the value is true the function will return the value of the base, otherwise it will return OK or ERROR

UC_exec_async
let response = await UC_exec("INSERT INTO ccrepo.DC_Telefono VALUES ('" + nombreAgente+ "','" + $("#telefono").val() + "','" + fecha + "') ON DUPLICATE KEY UPDATE proximo_contacto = '" + fecha + "'","", true);
return response;

UC_Save

(object,table,dsn,callback)

Saves an object from a specific table in the Database.

object: Javascript object to save (equal to the destination table).

table: Name of the destination table.

dsn: Data source name, empty for the Default Base CCREPO.

callback: Null or name of the function that is executed when returning the result.


UC_Save
UC_Save(ArrayOfVentas[i], 'DC_Venta', '', callbackGuardarVenta);

UC_Save_async

Structure: (object,table,dsn)

Saves an object from a specific table in the Database.

object: Javascript object to save (equal to the destination table).

table: Name of the destination table.

dsn: Data source name, empty for the Default Base CCREPO.

UC_Save
let response = await UC_Save(ArrayOfVentas[i], 'DC_Venta', '');
return response;


UC_fullSelect

(solochosen, idSelect, objetoSelect, chosen, atributo, parse)

It is responsible for filling the comboBox or listBox with data from the query.

solochosen: If this parameter is 0, it is in charge of initializing the chosen one with the objects that we pass to it in the Select object.
If this parameter is 1, it assumes that the html of the select already contains the data with which we want to initialize the chosen one and all it does is a trigger to the .chosen () function, which initializes the chosen one.

idSelect: Id of the select in the html that corresponds to our combo box.

ObjectSelect: It is a list of values ​​or a list of objects:

Eg list of values: ["ACOMP-BLESS ->", "campañaParaTestBeto <-"]

Eg list objects:

[{"departamento":"ARTIGAS"},{"departamento":"CANELONES"}]


chosen: If this attribute is 1, the .chosen () function is applied that initializes the combo box, if it is 0 the HTML of the select is loaded
with the options of the Select object but the .chosen () function is not applied, that is, it is not initialized.

attribute: If an attribute is specified, it means that the Select object has the form of a list of objects, therefore the value of
our combo will have the value of the attribute of the object that we specify.
In our example of a list of objects, we would pass the attribute 'department'.

parse: If this attribute is 1, the JSON.parse function is applied to the Select object since it is assumed that it is being passed in the form of a string,
if this attribute is 0, the JSON.parse function is not applied and the Select object is assumed to be an array of values ​​or an array of objects.

solochosenchosenresult
10ListBox using HTML values.
00ListBox usingSelect object values.
01ComboBox usingSelect object values.
11ComboBox using HTML values.
UC_fullSelect
UC_fullSelect(0,"campañasCódigos",campañas,1,null,1);

UC_fullTable

(idTabla, datosParaLlenar, stringDatos, onSelected, scroll, dataFormat, bColum, bOrder, bfilter, pagination, multipleSelect, onDeSelected)

It is responsible for filling a certain table.

idTabla: The id of the <table> tag in our html.

dataParaLlenar: It is the list of objects in string format that are used to load the table. It is important to note that it has to be in
string format since the method takes care of parsing it.

Ex: [{"id": 1, "document": "", "names": "Casanova Barreiro Rossana Haydee", "department": "" ...

stringDatos: These are the attributes of the object that we want to show in the columns of our table.
The attributes are written separated by commas.

onSelected: Method to be executed when the selection event occurs in a row of the table.
This method accepts a parameter, which returns the object that corresponds to the selected row:

Eg: function metodoOnSelectedSample(resp){

//Resp has the object in string format like the one we passed in the example
}

scroll: It is the height in pixels that the table will take. Ex: '100px'

dataFormat: If the data to fill has dates to order, the format of the date will be passed to it so that it can be ordered,
example: 'DD / MM / YYYY'

bColum, bOrder: These parameters are to sort a particular column in asc or desc way, it must be passed
How to integer the column and the order as a string, by default if these parameters are not passed, it will sort
by the first descending column.

If you want to sort the second column in descending order: 1, "desc".

pagination: boolean. true for automatic table paging from frontend. In case of putting a number,
Ex: 50 will be shown per page the amount set

multipleSelect: null or 1 as an integer for multiple selection of rows.

onDeSelected: null or function (a) to get the value of the selected row as a return.

UC_fullTable
UC_fullTable("tablaCodigo",JSON.stringify(codigosHistorico),'Codigo,Detalle,Callerid,Documento,Resultado',
selectCodigo,"300px","DD/MM/YYYY",0,"asc",false);

UC_addPagination

(idTabla)

Add pagination to a table.

This method adds two buttons, a 'previous' and a 'next' button that serves as pagination for the table.

It is important to note that only the buttons are added in the html, it is the user who then has to define
the click events of these buttons. The button ids are: previous_Table_id, next_Table_id.

Using javascript the user should add the event on click of these two buttons as follows:

$('#idTabla_anterior').click(function(){...});


idTabla: ID in the HTML of the table.

UC_addPagination
UC_addPagination('tablaBusquedaBaseVentas');

UC_update

(json, tablename, column, dsn, callback)

Update object data, put the value and update column.

obj: Object with the new data to update.

tablename: Name of the table to update.

column: Name of the column for which the update is going to be carried out, usually the ID of the table.

dsn: Data source name, empty for the Default Base CCREPO.

callback: Null or name of the function that is executed when returning the result.

UC_update
UC_update(objetoRefActual, "DC_Referido", "idref", "", respUpdateReferido);

UC_update_async

Structure: (json, tablename, column, dsn)

Update object data, put the value, and update column.

obj: Object with the new data to update.

tablename: Name of the table to update.

column: Name of the column for which the Update is going to be carried out, usually the ID of the table.

dsn: Data source name, empty for the Default Base CCREPO.

UC_update
let response = await UC_update_async(objetoRefActual, "DC_Referido", "idref", "");
return response;

UC_delete

(tablename, column, value, valuetype, dsn, callback)

An object is deleted by value and column.

tablename: Name of the table to update.

column: Name of the column for which the delete is to be performed, usually the ID of the table.

value: Value of the column for which the delete is going to be done.

valuetype: Data type of the column to be deleted: int, string.

dsn: Data source name, empty for the Default Base CCREPO.

callback: Null or name of the function that is executed when returning the result.

UC_delete
UC_delete('DC_Producto', 'id', productoseleccionado.id, 'int', '', callbackEliminar);

UC_delete_async

Structure: (tablename, column, value, valuetype, dsn)

An object is deleted by value and column.

tablename: Name of the table to update.

column: Name of the column for which the delete is to be performed, usually the ID of the table.

value: Value of the column for which the delete is going to be done.

valuetype: Data type of the column to be deleted: int, string.

dsn: Data source name, empty for the Default Base CCREPO.

UC_delete
let response = await UC_delete('DC_Producto', 'id', productoseleccionado.id, 'int', '');
return response;

UC_get

(sqlquery, dsn, callback)

Get the data from the database by passing an SQL SELECT query.

sqlquery: SELECT sql

dsn: Data source name, empty for the Default Base CCREPO.

callback: Null or name of the function that is executed when returning the result.

UC_get
UC_get("SELECT * FROM DC_Param order by id asc","",callbackInitDocumento);

UC_get_async

Structure: (sqlquery, dsn)

Get the data from the database by passing an SQL SELECT query.

sqlquery: SELECT sql

dsn: Data source name, empty for the Default Base CCREPO.

UC_get
let response = await UC_get_async("SELECT * FROM DC_Param order by id asc","");
return response;

UC_makeCall

(campaign, source, destination, callback)

Makes a call.

campaign: Campaign for which you are going to make the call.

source: DID by which the call is going to be taken.

destination: Destination number of the call.

callback: Null or name of the function that is executed when returning the result.

verifyWrapup: If true then it validates if the agent is in wrapup before calling, otherwise it does not validate it.

UC_makeCall
UC_makeCall(campaign, source, destination, callback, verifyWrapup);

UC_makeCall_async

Structure: (campaign, source, destination)

Makes a call.

campaign: Campaign for which you are going to make the call.

source: DID by which the call is going to be taken.

destination: Destination number of the call.

verifyWrapup: If true then it validates if the agent is in wrapup before calling, otherwise it does not validate it.

UC_makeCall
let response = await UC_makeCall(campaign, source, destination, verifyWrapup);
return response;

UC_hangUp

(callback)

Drops the current call.

callback: Null or name of the function that is executed when returning the result.

UC_hangUp
UC_hangUp(callback);

UC_hangUp_async

Structure: ()

Drops the current call.

UC_hangUp
let response = await UC_hangUp();
UC_hangUpMyCall

Ends the call only if the callerid passed by parameter is the same as the current call.

  • callerid
  • callback
UC_hangUpMyCall_async
  • callerid

UC_pause

(boolean)

It is responsible for pausing or unpausing the agent.

Do not pause the agent in case he is on a break.

boolean: true or false

function: call function

UC_Pause
UC_Pause(true, function(resp){});

UC_sendSms

(phone, message)

Sends an SMS.

phone: Destination of the SMS.

message: SMS text.

UC_sendSms
 UC_sendSms(099234560,"Hey!");

UC_sendMail

(fromname, to, subject, body,callback)

Sends an Email with the system account

fromname: Name of the sender.

to: Recipient email.

subject: Subject of the mail.

body: Email text can be HTML.

UC_sendMail
UC_sendMail(clienteseleccionado.campana, $('#txtEmailGestion').val(), $('#txtDatoGestion').val(), $('#txtComentarios').val(),callbackSendMail);

UC_sendMailCampaignv2

UC_sendMailCampaignv2_async

Sends an email using the email account of the specified campaign.

{
	"campaign": "Email",
	"to": "adress@ucontactcloud.com",
	"cc":"example@example.com",
	"cco":"example@example.com,example2@example2.com",
	"subject": "Subject",
	"body": "This is an email body can be HTML",
    "attachments": ["020212/738hbjk-h73894algo.jgp", "020212/738hbjk-h73894algo.jgp"],
    "reports":["<generated_report_guid>.pdf"],
	"schedule": {
		"title": "Date title",
		"organizer": "Myself",
		"from": "2018-08-24 00:00:00",
		"to": "2018-08-24 01:00:00"
	},
	"template": "templateName",
	"variables": {
		"var1":"value",
		"var2":"value2"
	}
}

The cc, bcc, template, and variables fields are optional.

The variables will be replaced before sending the mail. The template will only be sent if the body is empty or unspecified.

Attachments are optional, it will be a list of strings obtained with the function UC_addAttachment (file, id)

With the `reports` property you can send email attachments, previously generated reports. It will be a guid list of reports generated with their extension.

Hello $ {name} this is an example of a template to be able to replace the variables, greetings $ {greetings}

It will be replaced by:

Hello Santiago, this is an example of a template to be able to replace the variables, greetings, Cari

await UC_sendMailCampaignv2_async({
	campaign: "Email",
    to: "testabc@gmail.com",
    subject: "Subject",
    body: "Hey",
    attachments: [
		"20190513/92c59937-194a-4ef0-a183-9f55d551eb94.Captura%20de%20pantalla%202019-02-23%20a%20la%28s%29%2018.25.28.png", 
		"20190513/24817ad7-efc5-4277-8995-d64ee6e988a5.foton%20de%27cereat.jpg"
	]
})

UC_addAttachment(file, id)

Uploads any type of file to the server.

file: File object javascript.

id (optional): used to identify the file in the response

Response: ["20190513 / a6d9f3c6-9574-44ca-8b6f-ec02e2c977d1.filename.txt", "1234"]

The first string is the path of the file on the server.

The second is the submitted ID.

Example:

await UC_addAttachment(new File(["test1234filecontent"], "filename.txt", {type: "text/plain", lastModified: new Date()}))



This method sends a message using the Hey now API. The name of a previously configured Hey now provider is needed.

{
	"clientId": "598112321323",
	"message": "Hello",
	"providerName": "HeyNowProviderName"
}
let obj = {
	"clientId": "598112321323",
	"message": "Hello",
	"providerName": "HeyNowProviderName"
}

await UC_sendHeyNowMessage_async(obj)

UC_getAgents

(callback)

Gets the agents in the callback in JSON format.

UC_getAgents_async

Structure: ()

Gets the agents in the callback in JSON format.

UC_getAgents
let response = await UC_getAgents();
return response;

UC_getSystemCampaigns

(callback)

Get the system campaigns in the callback in JSON format.

UC_getSystemCampaigns
UC_getSystemCampaigns(setComboCampaigns);

UC_getSystemCampaigns_async

Structure: ()

Get the system campaigns in the callback in JSON format.

UC_getSystemCampaigns
let response = await UC_getSystemCampaigns();
return response;

UC_getMyAgentCampaigns

(callback)

Get the agent's campaigns in the callback in JSON format.

UC_getMyAgentCampaigns
UC_getMyAgentCampaigns(respGetAgentCampaigns);

UC_getMyAgentCampaigns_async

Structure: ()

Get the agent's campaigns in the callback in JSON format.

UC_getMyAgentCampaigns
let response = await UC_getMyAgentCampaigns();
return response;

UC_getMySuperCampaigns

(callback)

Gets the campaigns that I can see if I am a supervisor in the callback in JSON format.

UC_getMySuperCampaigns
 UC_getMySuperCampaigns(callback);

UC_getMySuperCampaigns_async

Structure: ()

Gets the campaigns that I can see if I am a supervisor in the callback in JSON format.

UC_getMySuperCampaigns
let response = await UC_getMySuperCampaigns();
return response;

UC_getAgentForCampaign

(campaign, callback)

Gets the agents for a given campaign in the callback in JSON format.

UC_getAgentForCampaign
 UC_getAgentForCampaign(campaign,callback);

UC_getAgentForCampaign_async

Structure: (campaign)

Gets the agents for a given campaign in the callback in JSON format.

UC_getAgentForCampaign
let response = await UC_getAgentForCampaign(campaign);
return response;

UC_subirArchivoCSV

(file, tabla, sentence, callback)

It is responsible for uploading a CSV file to a specific table in the database.

file: Obtained from an upload.

table: Name of the destination table.

sentence: Changes required (see MYSQL LOAD IN FILE syntax).

callback: Return of the raise.

UC_subirArchivoCSV
UC_subirArchivoCSV(archivo, "DC_Telefono","IGNORE 1 LINES (agente,telefono)\n",respUploadCodigoCSV);

UC_subirArchivoCSV_async

Structure: (file, tabla, sentence)

It is responsible for uploading a CSV file to a specific table in the database.

file: Obtained from an upload.

table: Name of the destination table.

sentence: Changes required (see MYSQL LOAD IN FILE syntax).

UC_subirArchivoCSV
let response = await UC_subirArchivoCSV(archivo, "DC_Telefono","IGNORE 1 LINES (agente,telefono)\n");
return response;

UC_generateReport

(jsonReport, html, excel, pdf, doc)

It is responsible for generating and downloading a report in Excel, PDF, DOC, TXT, CVS format.

jsonReport: It is the report object in the following format:

Object Report
{"name": "Total Breaks", // report name
"file": "TimesPauseBreakePorAgente.jrxml", // name of the jrxml file
"description": "Total Breaks", // report description
"dsn": "Repo", // data source name
"parameters": "INITIAL_DATE = Timestamp = 2015-11-03 00: 00: 00; FINAL_DATE = Timestamp = 2015-11-03 3: 59: 59; REPORT_LOCALE = Locale = es; AGENT = Agent = 'Admin' ,, 'Agent1', 'Agent10', 'Agent11', ",
// They are the parameters with which the report is executed, these vary according to the report.
"grouped": "Agents", // group under which the report is found
"language": "es", // language in which the report is going to be returned
"license": "CCS"}

html, excel, pdf, doc: These parameters are booleans that accept 1 or 0, in case the parameter is 1,
It will be downloaded in that format, if it is 0, this type of file is not taken into account for the download.
(excel at 2 is csv) (doc at 2 is txt).

UC_generateReport
UC_generateReport(objetoReporte,0,2,0,0);

UC_closeForm

Closes the current form.

UC_closeForm
UC_closeForm();

UC_getIframeQuantity

Returns number of forms opened by the agent.

UC_closeForm
UC_getIframeQuantity();

UC_ShowXForm

Shows close button on tab,

UC_ShowXForm
UC_ShowXForm(); 

UC_setChannelVariable

(variable, value, callback)

Sets a variable in the call.

variable: Name of the variable.

value: Value.

callback: Return.

UC_setChannelVariable
UC_setChannelVariable('name','John',null);

UC_setChannelVariable_async

Structure: (variable, value)

Sets a variable in the call.

variable.

value.

UC_setChannelVariable
let response = await UC_setChannelVariable('name','John');
return response;

UC_TagRecord

(guid, data) 

Tag in a recording to later search in data in recordings.

guid: ID of the call obtained from the CTI object.

data: Text with which to mark.

UC_TagRecord
 UC_TagRecord(guid,"data");

UC_respool

(objetoRespool, callback)

The respool occurs when a call could not be completed, for example when a dialer links an agent with a client but this was not the person to be contacted, so it is possible to put him back on the dialer.

objectRespool: Object obtained from UC_DialerObject, this can be changed accordingly to do the respool, example:
change of main num for the first alternative, etc.

callback: It is a user-defined callback function that has the response of the method.

UC_respool
 UC_respool(objetoRespool, callback);


UC_respool_async

Structure: (objetoRespool)

The respool occurs when a call could not be completed, for example when a dialer links an agent with a client but this was not the person to be contacted, so it is possible to put him back on the dialer.

ObjectRespool: Object obtained from UC_DialerObject, this can be changed as appropriate to do the respool, example change the main number for the first alternative, etc.

UC_respool
let response = await UC_respool(objetoRespool);
return response;


UC_DoRespool

(cti, alternative)

Respool a call by specifying if you want to alternate between alternative numbers or not.

cti: CTI parsed

alternative: It can be passed empty, that indicates that it does not contemplate the alternatives, or it passes the alternatives to take into account.

UC_DoRespool
 UC_DoRespool(cti, alternative);

UC_DialerObject

(dialer)

Returns an object of type calls_spool to be able to respool or set up a DialerSchedule.

dialer: It is the string that arrives in dialer in CTI.

UC_DialerObject
UC_DialerObject(CTI.Dialer);

UC_replaceAll

(str, find, replace)

Replaces all occurrences of a character in a String.

str: Original String.

find: What character to look for.

replace: By which character to replace.

Returns the changed String.

UC_replaceAll
 UC_replaceAll("Hello","world","how are you?");

UC_generateNamedReport

(jsonReport, html, excel, pdf, doc, name)

It is responsible for generating and downloading a report in excel, pdf, doc or cvs format, and it will also be given a specific name.

jsonReport: It is the report object in the following format:

Object Report
{"name": "Total Breaks", // report name
"file": "TimesPauseBreakePorAgente.jrxml", // name of the jrxml file
"description": "Total Breaks", // report description
"dsn": "Repo", // data source name
"parameters": "INITIAL_DATE = Timestamp = 2015-11-03 00: 00: 00; FINAL_DATE = Timestamp = 2015-11-03 23: 59: 59; REPORT_LOCALE = Locale = es; AGENT = Agent = 'Admin' ,, 'Agent1', 'Agent10', 'Agent11', ",
// They are the parameters with which the report is executed, these vary according to the report.
"grouped": "Agents", // group under which the report is found
"language": "es", // language in which the report is going to be returned
"license": "CCS"}

html, excel, pdf, doc: These parameters are Booleans that accept 1 or 0, in the event that the parameter is 1, it will be downloaded in this format, if it is 0, this type of file is not taken into account for the download. (excel at 2 is csv) (doc at 2 is txt).

name: Name of the file to download.

UC_generateNamedReport
UC_generateNamedReport(objetoReporte,0,2,0,0,"nombreReport");

UC_DialerSchedule

(callDate, objectDialer, callback)

It is in charge of scheduling a call to occur on a certain date under an established campaign and to a specified destination.

callDate: Date on which the call is scheduled.

objetDialer: Object returned from calling UC_DialerObject with the CTI String Dialer,
this object is changed as required by schedule.

callback: It is a user-defined callback function that has the response of the method.

UC_DialerSchedule
UC_DialerSchedule(objetoScheudle, callbackDialerSchedule);


UC_DialerSchedule_async

Structure: (callDate, objectDialer)

It is responsible for scheduling a call to occur on a specific date under an established campaign and to a specified destination.

callDate: Date on which the call is scheduled.

objetDialer: Object returned from calling UC_DialerObject with the CTI String Dialer, this object is changed as required by schedule.

UC_DialerSchedule
let response = await UC_DialerSchedule(date, objetoScheudle);
return response;

notification

(title, message, icon, type)

Shows messages to the user.

title: It receives a string that it will use as the title of the notification.

message: It receives a string that it will use as the notification message.

icon: Get a string with the fontawesome class for the notification.

Possible icons: "fa fa-times" (error), "fa fa-check" (action carried out successfully), "fa fa-warning" (alert).

type: It receives a string that defines the type of notification that affects its color.

-types possible: "danger" (error when performing the operation), "success" (action performed successfully), "warning" (alert).

notification
notification("Error","You must enter name","fa fa-times","danger");

UC_audit

(audit)

Audit the actions performed by the user.

Receives a string (audit) that is recorded in the action column of the ccrepo.auditory table
along with the user that is using the system and its respective IP.

UC_audit
UC_audit('El usuario se logueo con exito');

UC_goToTab

(idTabPane)

Changes to the tab that is passed by parameter.

idTabPane: Receives a string that must be the id of the tab-pane that we want to show.

UC_goToTab
UC_goToTab("Ventas");

UC_generateGraphic

(idContainer, data, type, title, colors, size)

Generates graphs.

idContainer: Receives a string that must be the ID of the container where we want to show the graph.

data: Receives an array with the data to display in the graph.

type: Receives a string that defines the type of graph to display, if the graph is only linear, receives
this parameter as "null" (pie, donut, bars, null).

title: Receive a string as a title only for donut-type graphs, otherwise use null.

colors: Receives an array of strings with colors in hexadecimal (['#2334','#45454']).

size: Receives a string with the value in pixels for the size of the graph ('240px') null takes the size of the container.

UC_generateGraphic
var arrayDatos= [['data1', 30],['data2', 120]];
UC_generateGraphic("idContenedor",arrayDatos,"pie",null,null);
 
var arrayDatosLineas=[
	 ['data1', 30, 200, 100, 400, 150, 250],
	 ['data2', 50, 20, 10, 40, 15, 25]
];
UC_generateGraphic("idContenedor",arrayDatosLineas,null,null,null);
UC_Http_proxy

Only the URL and method fields are required.

Method can be: GET, POST, PUT, DELETE.

The body has to be a string, and so it will be sent in the request.

UC_generateGraphic
await UC_Http_proxy({
	url: 'https://api-mirror.herokuapp.com/', 
	method: 'POST', 
	headers:{'authorization': 'header1'}, 
	body: '{}', 
	type: 'application/json',
	timeout: 10000
})

The default timeout is 10000 milliseconds.

Example response:

UC_generateGraphic
{
	body: "the body response",
	code: "200", //401, 504 etc
	headers: {
		content-type: ['application/json'],
		server: ['gunicorn/19.7.1']
	}
}

In the event that the type is `application/x-www-form-urlencoded`, the following can be done to avoid concatenating strings and to be able to send it in the body instead of JSON.stringify

UC_generateGraphic
var form = new FormData();
form.append('name', 'Augusto');
form.append('ci', '1234123-1');
var urlEncoded = new URLSearchParams(form).toString();

//urlEncoded will have the following value
//cliente=Augusto&ci=1234123-1
UC_ExecGet_async

UC_Exec

UC_generateGraphic
await UC_ExecGet_async({url: 'https://google.com.uy', headers: {'Authorization': '1234'}})
et_async

UC_ExecPost

(url, data, callback)

Executes a POST webService, from our domain.

url: Pass the URL of the web service.

data: If the web service expects parameters, you must pass them in the data.

callback: Return.

headers: Array of headers (not required).

UC_ExecPost
 UC_ExecPost(url, data, callback, [{header: 'Name', value: 'value'}]);

UC_ExecPost_async

Structure: (url, data)

Executes a POST webService, from our domain.

url: Pass the URL of the web service.

data: If the web service expects parameters, you must pass them in the data.

headers: Array of headers (not required)

UC_ExecPost_async
let response = await await UC_ExecPost_async('https://5dc2cc541666f6001477f514.mockapi.io/post/test', '{"data": "data to be sended"}', [{header: 'Name', value: 'value'}]);
return response;

UC_ExecPostSOAP

(url, body, callback, headers)

Executes a SOAP action from a webservice.

url: URL of the SOAP action, with the name included.

body: XML of the SOAP request.

calback: return.

headers: Array of headers for the query.

UC_ExecPostSOAP
var xml = '<?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">   <soap12:Body>     <ObtengoDatos_HomeBanking_DOC xmlns="http://www.italcred.com">       <DOC>2905977</DOC>     </ObtengoDatos_HomeBanking_DOC>   </soap12:Body> </soap12:Envelope>';

UC_ExecPostSOAP(http://serverip/ws_integra_beta/servicio.asmx?op=ObtengoDatos_Disponible, xml, function(xmlResponse){
	// xmlResponse	
},[{header: "Autorization", value: "Basic 748o748974837489237489"}, {header: "Custom-header", value: "Value header"}]);

UC_ExecPostSOAP_async

Structure: (url, body, headers)

Executes a SOAP action from a webservice.

url: URL of the SOAP action, with the name included.

body: XML of the SOAP request.

headers: Array of headers for the query.

UC_ExecPostSOAP_async
var xml = '<?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">   <soap12:Body>     <ObtengoDatos_HomeBanking_DOC xmlns="http://www.italcred.com">       <DOC>2905977</DOC>     </ObtengoDatos_HomeBanking_DOC>   </soap12:Body> </soap12:Envelope>';

let response = await UC_ExecPostSOAP_async("http://serverip/ws_integra_beta/servicio.asmx?op=ObtengoDatos_Disponible", xml, [{header: "Autorization", value: "Basic 748o748974837489237489"}, {header: "Custom-header", value: "Value header"}]);
return response;

UC_GM_LoadActions

(measure, actions, callback)

It executes the gamification WebService that credits points to the agent.

measure: Name of the performance measure.

actions: Number of actions to credit (multiplies with the measure).

callback: Return.

UC_GM_LoadActions
UC_GM_LoadActions("nombreMedida", 100, callback);

UC_GM_LoadActions_async

Structure: (measure, actions)

It executes the gamification WebService that credits points to the agent.

measure: Name of the performance measure.

actions: Number of actions to credit (multiplies with the measure).

UC_GM_LoadActions
let response = await UC_GM_LoadActions("nombreMedida", 100);
return response;

UC_openForm

(name, ctiObj)

Open a new form.

name: Name of the form.

ctiObj: Null or CTI object.

UC_openForm("FormName",null)

UC_Encrypt

text: Text to encrypt

It encrypts the text it receives as a parameter and returns an object. The object can be saved to decrypt later or get the value to store in a base, for example.

let test = UC_Encrypt('text to encrypt or whatever')
console.log(test.toString()) // result is: "+VZ5lGWZ0DAONrcnP3MkEFGfpgP/LSPqhUDU4aXfY6U="
 
//Decrypt
UC_Decrypt('+VZ5lGWZ0DAONrcnP3MkEFGfpgP/LSPqhUDU4aXfY6U=')
UC_Decrypt(test)
//this expressions will give you the same result: "text to encrypt or whatever"

UD_Decrypt

text: Text to decrypt

Decrypts the text or object I receive by parameter and returns a string with the result.

UC_Add_Blacklist

Adds a contact to the blacklist.

Receive: Json object with the contact data to add to the blacklist, callback.

let my_object = {"name":'name', "campaign":"hello", "username": "username", "phone": "phonenumber", "company": "Integra", "job_title": "Developer", "name": "name", "expire_date": "2023-12-05"}
UC_Add_Blacklist(my_object, callback)

UC_Add_Blacklist_async

Adds a contact to the blacklist.

Receive: Json object with the contact data to add to the blacklist,

let my_object = {"name":'name', "campaign":"hello", "username": "username", "phone": "phonenumber", "company": "Integra", "job_title": "Developer", "name": "name", "expire_date": "2023-12-05"}
UC_Add_Blacklist_async(my_object)

UC_Remove_Blacklist

Removes a contact from the blacklist.

Receive: Json object with the contact data to add to the blacklist, callback.

let my_object = {"name":'name', "campaign":"hello", "username": "username", "phone": "phonenumber", "company": "Integra", "job_title": "Developer", "name": "name"}
UC_Remove_Blacklist(my_object, callback)

UC_Remove_Blacklist_async

Removes a contact from the blacklist.

Receive: Json object with the contact data to add to the blacklist.

let my_object = {"name":'name', "campaign":"hello", "username": "username", "phone": "phonenumber", "company": "Integra", "job_title": "Developer", "name": "name"}
UC_Remove_Blacklist_async(my_object)

UC_RemoveContactDialer

UC_RemoveContactDialer_async

Deletes a contact for a campaign dialer.

Receive: Campaign and number.

If * is the value of the campaign, the system will delete the contact for all campaigns.

Example:

UC_RemoveContactDialer('campaign', '36472974932')

UC_RemoveContactDialer('*', '36472974932')

UC_RemoveContactScheduler

UC_RemoveContactScheduler_async

Deletes a contact for the scheduler of a campaign.

Receive: Campaign and number.

If * is the value of the campaign, the system will delete the contact for all campaigns.

Example:

UC_RemoveContactScheduler('campaign', '36472974932')

UC_RemoveContactScheduler('*', '36472974932')

UC_UploadBase

Raise base to call spool.

campaign: Campaign name.

name: List name.

list: Array[] of objects{}

callback (optional): function that receives the result of the operation as a response.

ArrayList example:

var list=[{campaign:"Tests<-",destination:"099111111",data:"variable1=val1:variable2=val2",alternatives:"099222222:099333333",priority:"9999",agent:"Agente1"},{campaign:"Pruebas<-",destination:"213123",data:"variable1=val1",alternatives:"213213:123123",priority:"1233"}]Ejemplo de uso:

UC_UploadBase("Campaign←","ListName",arrayList,CallbackFunction)

UC_DispositionCall

Type dialer calls.

Save the management, tag the call with l1 | l2 | l3, performs the actions that correspond to each classification,
credits the gamification points to the agent.

The actions may be: Respool, RespoolAlternative, Reschedule, Blacklist and NoAction.

Function parameters:

campaign: Campaign to which the call belongs.

callerid: Customer contact number.

agent: Agent who answered the call.

Guid: Unique Caller ID.

l1: Level 1 typing.

l2: Level 2 typing.

l3: Level 3 typing.

d1: Additional data 1.

d2: Additional data 2.

comment: Typing comments.

schedule: Date used to reschedule if applicable.

actionAmount (Optional, by default 1): Value by which it is multiplied if there is a typing measure for Gamification.

UC_DispositionCall( 'campaign', 'callerid', 'guid', 'l1', 'l2', 'l3', 'd1', 'd2', 'comment', moment().format('YYYY-MM-DD HH:mm:ss'), "2",(r) => console.log(r))

Example::

UC_DispositionCall( 'CobrosPredictive<-', '099758071', 'ed5c2b3c-8ab5-4abd-b5f6-46621e82ec79', 'reschedule', '', '', 'd1', 'd2',
'comment', moment().format('YYYY-MM-DD HH:mm:ss'), "2",(r) => console.log(r))

UC_GenerateExampleCSV

Function that downloads a csv file, it is used for files that account for the format of the csv file upload.

textToWrite: Text that you want to give as an example in the csv file.

idbtnCSV: Button identifier. It must be written between '', example 'idButton'.

The button we are calling in the function has to be of type <a>, since the <a> tag allows the href which is what is used in the function,
not so the <button>. Example of a button with the <a> tag:

<a id="btnBuscar" class="btn btn-primary" style="width: 100%;height: 100%;color:white;padding:0px;background-color: rgba(0, 0, 0, 0.3);" name="btnBuscar">

       <span data-fa="fa"></span>
       <span class="btnText">Buscar</span>
</a>

Example:

UC_GenerateExampleCSV('ExampleEmailCamp;email;value1;value2;value3;NOACTION','btnBuscar');

UC_uploadEmailBase async

Function that uploads an email list in .csv format.

Ejemplo
let uploadResponse= await UC_uploadEmailBase("NombreDeDiscador","Asunto",archivoTipoFile,"NombreDeArchivo");
UC_MuteRecording

Structure (value)

It is responsible for muting or unmuting, depending on the value passed by parameter, the recording.

Value: 0 or 1, with 1 it is muted and with 0 it is unmuted.

UC_StartRecording

Structure (full_path, callback)


Start a new monitor mix on the channel, in addition to the main one.


Callback: Contains the id of the mixmonitor that you want to pause.


Full_path: Location and name of the .gms file to be created by the mix monitor.

UC_StopRecording

Structure (idMix)


Terminates the monitor mix that was previously created with the function UC_StartRecording.


idMix: obtaines from the response of UC_StartRecording.

UC_getCurrentCallInfo

Get the status of the current call from the portal phone. If there is no call, the isInCall property will be false.

Ejemplo
{
	"isInCall":true,
	"startDate":"2019-11-21T19:46:38.833Z",
	"callerIdNum":"12343434",
	"inbound":false,
	"guid":"7dbaab4e-4d10-460f-a5e6-787c49351006",
	"campaign":"Hola->"
}
parent.quitWrapUp()
Function in charge of ending the wrap up time of the agent.
UC_ExecScript_async

Run a command on the application server.

command: Command as it would be executed in the console.

Example:

Ejemplo
let value = await UC_ExecPythonScript_async('python /etc/IntegraServer/scripts/test.py');