Function | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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_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_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_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_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. 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 attribute: If an attribute is specified, it means that the Select object has the form of a list of objects, therefore the value of 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,
| |||||||||||||||||||||||||||
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 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. onSelected: Method to be executed when the selection event occurs in a row of the table. 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, bColum, bOrder: These parameters are to sort a particular column in asc or desc way, it must be passed 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, 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_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 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_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_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_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_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_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_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_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_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_hangUp | (callback) Drops the current call. callback: Null or name of the function that is executed when returning the result.
| |||||||||||||||||||||||||||
UC_hangUp_async | Structure: () Drops the current call.
| |||||||||||||||||||||||||||
UC_hangUpMyCall | Ends the call only if the callerid passed by parameter is the same as the current call.
| |||||||||||||||||||||||||||
UC_hangUpMyCall_async |
| |||||||||||||||||||||||||||
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_sendSms | (phone, message) Sends an SMS. phone: Destination of the SMS. message: SMS text.
| |||||||||||||||||||||||||||
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_sendMailCampaignv2 UC_sendMailCampaignv2_async | Sends an email using the email account of the specified campaign.
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
| |||||||||||||||||||||||||||
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.
| ||||||||||||||||||||||||||||
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_getSystemCampaigns | (callback) Get the system campaigns in the callback in JSON format.
| |||||||||||||||||||||||||||
UC_getSystemCampaigns_async | Structure: () Get the system campaigns in the callback in JSON format.
| |||||||||||||||||||||||||||
UC_getMyAgentCampaigns | (callback) Get the agent's campaigns in the callback in JSON format.
| |||||||||||||||||||||||||||
UC_getMyAgentCampaigns_async | Structure: () Get the agent's campaigns in the callback in JSON format.
| |||||||||||||||||||||||||||
UC_getMySuperCampaigns | (callback) Gets the campaigns that I can see if I am a supervisor in the callback in JSON format.
| |||||||||||||||||||||||||||
UC_getMySuperCampaigns_async | Structure: () Gets the campaigns that I can see if I am a supervisor in the callback in JSON format.
| |||||||||||||||||||||||||||
UC_getAgentForCampaign | (campaign, callback) Gets the agents for a given campaign in the callback in JSON format.
| |||||||||||||||||||||||||||
UC_getAgentForCampaign_async | Structure: (campaign) Gets the agents for a given campaign in the callback in JSON format.
| |||||||||||||||||||||||||||
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_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_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:
html, excel, pdf, doc: These parameters are booleans that accept 1 or 0, in case the parameter is 1,
| |||||||||||||||||||||||||||
UC_closeForm | Closes the current form.
| |||||||||||||||||||||||||||
UC_getIframeQuantity | Returns number of forms opened by the agent.
| |||||||||||||||||||||||||||
UC_ShowXForm | Shows close button on tab,
| |||||||||||||||||||||||||||
UC_setChannelVariable | (variable, value, callback) Sets a variable in the call. variable: Name of the variable. value: Value. callback: Return.
| |||||||||||||||||||||||||||
UC_setChannelVariable_async | Structure: (variable, value) Sets a variable in the call. variable. value.
| |||||||||||||||||||||||||||
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_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: callback: It is a user-defined callback function that has the response of the method.
| |||||||||||||||||||||||||||
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_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_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_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_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:
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_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, callback: It is a user-defined callback function that has the response of the method.
| |||||||||||||||||||||||||||
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.
| |||||||||||||||||||||||||||
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).
| |||||||||||||||||||||||||||
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
| |||||||||||||||||||||||||||
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_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 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_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.
The default timeout is 10000 milliseconds. Example response:
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_ExecGet_async | UC_Exec
| |||||||||||||||||||||||||||
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_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_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_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_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_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_openForm | (name, ctiObj) Open a new form. name: Name of the form. ctiObj: Null or CTI object.
| |||||||||||||||||||||||||||
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.
| |||||||||||||||||||||||||||
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.
| |||||||||||||||||||||||||||
UC_Add_Blacklist_async | Adds a contact to the blacklist. Receive: Json object with the contact data to add to the blacklist,
| |||||||||||||||||||||||||||
UC_Remove_Blacklist | Removes a contact from the blacklist. Receive: Json object with the contact data to add to the blacklist, callback.
| |||||||||||||||||||||||||||
UC_Remove_Blacklist_async | Removes a contact from the blacklist. Receive: Json object with the contact data to add to the blacklist.
| |||||||||||||||||||||||||||
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:
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, 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.
Example:: UC_DispositionCall( 'CobrosPredictive<-', '099758071', 'ed5c2b3c-8ab5-4abd-b5f6-46621e82ec79', 'reschedule', '', '', 'd1', 'd2', | |||||||||||||||||||||||||||
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, <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> Example: UC_GenerateExampleCSV('ExampleEmailCamp;email;value1;value2;value3;NOACTION','btnBuscar'); | |||||||||||||||||||||||||||
UC_uploadEmailBase async | Function that uploads an email list in .csv format.
| |||||||||||||||||||||||||||
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)
| |||||||||||||||||||||||||||
UC_StopRecording | Structure (idMix) Terminates the monitor mix that was previously created with the function 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.
| |||||||||||||||||||||||||||
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:
|
...