Integra Framework v5
Function | Description | Example | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
UC_exec | (sqlquery,dsn,callback) Executes SQL query on the database (INSERT, UPDATE, DELETE), can or cannot have a callback. sqlquery: INSERT UPDATE or DELETE. dsn: Name of the data source, empty uses CCREPO Database. callback: Null or name of the function to execute on completion. | ||||||||||||||||
UC_Save | (object,table,dsn,callback) Saves an object of a table in the database. object: Javascript object to save (identical to destination table). table: Name of the destination table. dsn: Name of the data source, empty uses CCREPO Database. callback: Null or name of the function to execute on completion. | ||||||||||||||||
UC_fullSelect | (solochosen,idSelect,objetoSelect, chosen,atributo,parse) Fills a comboBox or listBox with data from a query. solochosen: If this parameter is 0 initialize the chosen with the objects passed in objetoSelect. If 1 use the html values and initlize with .chosen(). idSelect: Id of the html (out comboBox). objetoSelect: List of values or objects: Example values: ["ACOMP-BLESS->","campanaParaTestBeto<-"] Example objects: [{"departamento":"ARTIGAS"},{"departamento":"CANELONES"}] chosen: If 1 the function .chosen() is applied initialize the comboBox,if 0 loads the html of the select with options of objetoSelect but doesnt apply .chosen(), does not initialize. attribute: If specified an attibute means that the objetoSelect has the form of a list of objects so the values displayed on our control is the content of the name of that attribute. Example 'departamento' to fill with ARTIGAS, CANELONES. parse: If 1 JSON.parse is applied to objetoSelect asumes is passed as a String, if 0 assumes that in an array of values or array of objects.
| ||||||||||||||||
UC_fullTable | (idTabla,datosParaLlenar, stringDatos,onSelected,scroll,dataFormat,bColum,bOrder,bfilter) Puts all the data into the table. idTabla: Id of the tag <table> in our html. datosParaLlenar: List in String format used to load the table. Example: [{"id":1,"documento":"","nombres":"Casanova Barreiro Rossana Haydee","departamento":""... stringDatos: Names of the filed that we want to show int our column table. Separated by coma (,). onSelected: Function executed when you select a row of the table,has a parameter that returns the objet of the selected row. Example: function metodoOnSelectedSample(resp){ //Resp has the object in string format as we pass in the datosParaLlenar } scroll: Height in pixels of the table. Ej: '100px'. dataFormat: Format of the Dates so the table can order the datatype correct, example : 'MM/DD/YYYY'. bColum, bOrder: This parameters are to order via a particular column asc or desc, passing as an integer the number of the column to order and if desc or asc. Example: Second column descendent: 1,"desc"
| ||||||||||||||||
UC_addPagination | (idTabla) Add pagination to a table. This method adds two buttons, Previous and Next for pagination porpoises. The user has to define the methods for the behavior of the buttons: the ids are idTabla_anterior, idTabla_siguiente. Via javascript and jQuery: $('#idTabla_anterior').click(function(){...}); and $('#idTabla_siguiente').click(function(){...}); idTabla: Id of the html table. | ||||||||||||||||
UC_update | (json, tablename, column, dsn, callback) Update Data. json: Object with the new data. tablename: Name of the table to update. column: Name of the column to update from usually the table PK. dsn: Name of the data source, empty uses CCREPO Database. callback: Null or name of the function to execute on completion. | ||||||||||||||||
UC_delete | (tablename, column, value, valuetype, dsn, callback) Deletes an object. tablename: Name of the table to delete from. column: Name of the column that we are going to make the delete usually the PK. value: Value of the selected column to delete. valuetype: Datatype of the value of the column to delete: int, string. dsn: Name of the data source, empty uses CCREPO Database. callback: Null or name of the function to execute on completion. | ||||||||||||||||
UC_get | (sqlquery,dsn,callback) Get data from a SQL SELECT query. sqlquery: SELECT sql. dsn: Name of the data source, empty uses CCREPO Database. callback: Null or name of the function to execute on completion. | ||||||||||||||||
UC_makeCall | (campaign,source, destination,callback) Makes a call. campaign: Outbound campaign to compute this call to. source: Oublound DID for this call (number seen by the client). destination: Number to call. callback: Null or name of the function to execute on completion. | ||||||||||||||||
UC_hangUp | (callback) Hangup the actual call. callback: Null or name of the function to execute on completion. | ||||||||||||||||
UC_pause | (boolean) Pause or UnPause an agent without using BREAKS. boolean: true or false. | ||||||||||||||||
UC_sendSms | (phone,message) Sends SMS. phone: Destination. message: Text. | ||||||||||||||||
UC_sendMail | (fromname, to, subject, body) Sends an Email. fromname: Name of the From. to: Destination email. subject: Subject. body: Text can be plain or html. | ||||||||||||||||
UC_getAgents | (callback) Get agents in the callback in json format. | ||||||||||||||||
UC_getSystemCampaigns | (callback) Get campaings in the callback in json format. | ||||||||||||||||
UC_getMyAgentCampaigns | (callback) Get agents of my campaings in the callback in json format. | ||||||||||||||||
UC_getMySuperCampaigns | (callback) Get campaigns if Im a supervisor in the callback in json format. | ||||||||||||||||
UC_getAgentForCampaign | (campaign,callback) Get agents of an specific campaign in the callback in json format. | ||||||||||||||||
UC_subirArchivoCSV | (archivo, tabla,sentence,callback) Upload a CSV file to a database table. archivo: Obtained from an upload tabla: Destination table. sentence: If changes are required (check MYSQL LOAD IN FILE syntax). callback: Null or name of the function to execute on completion, returns the result. | ||||||||||||||||
UC_generateReport | (jsonReport,html,excel,pdf,doc) Generates and download a report excel, pdf, doc,txt, cvs. jsonReport: The object with the following format: html, excel, pdf, doc: this parameters are 1 o 0, when 1 is downloaded in the following format. (excel 2 is a csv) (doc in 2 is txt)
| ||||||||||||||||
UC_closeForm | Close actual Form. | ||||||||||||||||
UC_ShowXForm | Shows X button on Form Tab. | ||||||||||||||||
UC_setChannelVariable | (variable, value, callback) Sets a variable to an active call. variable:Name of the value. value: Value. callback: Returns. | ||||||||||||||||
UC_TagRecord | (guid, data) Tag a recording so we can search for that value on Recordings. guid: Id of the call from CTI object. data: Text to tag it. | ||||||||||||||||
UC_respool | (objetoRespool, callback) Respool for a Dialer call when you havent reach the client you wanted. is possible to add the next phone of the contact to the dialer altough was an answered call. objetoRespool: Object of the type UC_DialerObject (check function). callback: Response of the function. | ||||||||||||||||
UC_DialerObject | (dialer) Returns an object type calls_spool (dialer table), so we can make a respool or dialer schedule. dialer: String of the attribute Dialer in the CTI object. | ||||||||||||||||
UC_replaceAll | (str, find, replace) Replace all occurrences of a string. str: Original String. find: String to find. replace: What to replace with. Returns changed String. | ||||||||||||||||
UC_generateNamedReport | (jsonReport, html, excel, pdf, doc, name) Generates and download a report excel, pdf, doc,txt, cvs. but with a determinated name (not a guid). jsonReport: The object with the following format: html, excel, pdf, doc: This parameters are 1 o 0, when 1 is downloaded in the following format. (excel 2 is a csv) (doc in 2 is txt). name: Name of the file to download. | ||||||||||||||||
UC_DialerSchedule | (callDate, objectDialer, callback) Schedule a call for a Dialer in a determinated date for a campaign and destination. callDate: Datetime for the schedule call. objetDialer: Object UC_DialerObject with the Dialer String of the CTI object , callback: Response of the function. | ||||||||||||||||
notification | (title, message, icon, type) Shows a message to the user. title: Title of the notification. message: Message of the notification. icon: Fontawesome string for icon. Example:"fa fa-times"(error),"fa fa-check"(success),"fa fa-warning"(warning) type: Type of the notification. -Example:"danger"(error),"success"(success),"warning"(warning) | ||||||||||||||||
UC_audit | (audit) Audits actions of the user. Adds a record to ccrepo.auditory with user and IP. | ||||||||||||||||
UC_goToTab | (idTabPane) Go to other tab of the Form. idTabPane: Tab-pane id we want to show. | ||||||||||||||||
UC_generateGraphic | (idContenedor, datos, tipo,titulo, colores, tamano) Genete charts. idContenedor: If of the chart container. datos: Array of the data for the chart. tipo: Chart type if lineal null else pie, donut, bars. titulo: Title for a donut chart else null. colores: Array of colors in hexadecimal (['#2334','#45454']). tamaño: Size in pixels of the chart ('240px') else null takes the size of the container. | ||||||||||||||||
UC_ExecPost | (url, data, callback)
url: Pass the url of the web service . data: If the web service expects parameters, you must pass on data. calback : Return. | ||||||||||||||||
UC_GM_LoadActions | (measure, actions, callback) Executes a Gamification WebService that allows to add points to the agent. measure: Name of the measure actions: Ammount of actions to credit (it will be multiplied with the measure to calculate the points) callback: Return. |