Global

Methods

addAttachment(scheme, uid, name)

This function adds an attachment to the currently selected message. By calling this function the attachment will only be linked to the message. Please ensure having installed an AttachmentDataSourceProvider that implements the specified scheme and provides the binary attachment input stream, if requested. The uid and the scheme together have to be globally unique. The uid must contain only the following characters: [a-z][A-Z][0-9].-_ The maximum number of characters of the uid is 255. The scheme must contain only lower case characters and digits [a-z][0-9] The maximum length of the scheme is 8 characters or digits.

Parameters:
Name Type Description
scheme string

scheme with a maximum length of 8 characters or digits

uid string

uid

name string

name of the attachment

Source:

addTab(name, url, autoSwitch)

This function adds a new custom tab to the sub tab bar which will be displayed together with QuickCases in the same tab bar.

Parameters:
Name Type Description
name string

name of the new custom tab

url string

name of the url

autoSwitch boolean

activated if true

Source:

changeTemplate(templateName)

This function allows to change the current template for the mail editor view. If there are unsaved changes a dialog window will appear and ask for a confirmation.

Parameters:
Name Type Description
templateName string

name of the template

Source:

close()

This function has the same effect like clicking the button 'Close' on a ticket in the mail editor view.

Source:

externalInquiry(options)

This function switches the mail agent editor to the external inquiry mode or opens the external inquiry dialog according to parameter property 'options.forceDialog' and key 'externalForward.dialog.legacy' in Routing.conf.

Parameters:
Name Type Description
options object

object containing the following property:

   forceDialog : external inquiry editor or external inquiry dialog
   

Source:
Returns:

false if the external inquiry option isn't available in the mail agent editor, otherwise switches the mail agent editor to the external inquiry mode or opens the external inquiry dialog.

 options.forceDialog = false & externalForward.dialog.legacy = false --> switches editor
 options.forceDialog = false & externalForward.dialog.legacy = true --> opens dialog
 options.forceDialog = true & externalForward.dialog.legacy = false --> opens dialog
 options.forceDialog = true & externalForward.dialog.legacy = true --> opens dialog

insertHtml()

This function inserts html text at the current cursor position into the mail agent editor content area. The html code passed to the function must be valid html without the following tags: doctype, html, head, style, body, script Please note that insert operations of huge html content may cause browser freeze or crash depending on the client environment and browser type. The content will be auto converted to the required format, given by the currently selected template (txt, html, pdf) If the select parameter is true, the inserted text will be selected automatically after the insert operation.

Source:

insertHtml(text, select)

This function inserts html text at the current cursor position into the chat agent editor content area. The html code can contain the following tags and attributes: br, p, strong, b, u, i, em, span[id|style|class], a[title|href|target|class], img[src|alt|style] Please note that insert operations of huge html content may cause browser freeze or crash depending on the client environment and browser type. If the select parameter is true, the inserted text will be selected automatically after the insert operation.

Parameters:
Name Type Description
text string

Text to insert into the html

select boolean

if true, the inserted text will be selected automatically after the insert operation

Source:

insertText(text, select)

This function inserts plain text at the current cursor position into the chat agent editor content area. Please note that insert operations of huge text content may cause browser freeze or crash depending on the client environment and browser type. If the select parameter is true, the inserted text will be selected automatically after the insert operation.

Parameters:
Name Type Description
text string

Text to insert into the html

select boolean

if true, the inserted text will be selected automatically after the insert operation

Source:

insertText()

This function inserts plain text at the current cursor position into the mail agent editor content area. Please note that insert operations of huge text content may cause browser freeze or crash depending on the client environment and browser type. The text must be plain text, that will be auto converted to the required format, given by the currently selected template (txt, html, pdf) If the select parameter is true, the inserted text will be selected automatically after the insert operation.

Source:

internalForward(agentOrGroup, dueDate)

This function triggers an internal forward operation on the currently selected ticket. The ticket can either be forwarded internally to another agent or to an agent group, if the configuration allows group forwarding.

Parameters:
Name Type Description
agentOrGroup string

the username of the agent or the name of the agent group to be used as target for the internal forward operation

dueDate date

the due date for the internal forward operation as UTC timestamp or formatted date string with the pattern 'yyyy-MM-dd hh:mm:ss' (using the local timezone of the client)

Source:

recategorize(category, options)

This function triggers the internal recategorize operation on the currently selected ticket. After a successful recategorize operation the ticket may be removed from the agent's folder.

Parameters:
Name Type Description
category string

the name of the new category for the ticket

options object

object containing the following optional keys:

keep : if true the ticket will not be removed from the agent's folder after the successful recategorize operation

Source:

registerShortcut(shortcut, callbackFunction)

With this function you are able to register a global shortcut in the agent UI. The callback function will be executed each time an agent uses the defined shortcut. You need to register the shortcut each time the page is (re)loaded, since the shortcut will be automatically unregistered upon page unload.

Parameters:
Name Type Description
shortcut Array.<string>

Shortcuts are currently restricted to a key combination of 'ctrl+shift+'. Example: 'ctrl+shift+1' For the digit, select only 1 - 9.

callbackFunction function

The function which will be called when using the shortcut, presupposed the frame is visible, in which the function is implemented.

Source:

reloadTemplate()

This function will reload the currently selected template for the mail editor view. A reload of the current template will force a refresh of all template variables used in the template. If there are unsaved changes a dialog window will appear and ask for a confirmation.

Source:

removeAttachment(scheme, uid)

This function removes an external attachment from the currently selected message.

Parameters:
Name Type Description
scheme string

scheme with a maximum length of 8 characters or digits

uid string

uid

Source:

setFullscreen(enable)

This function enables or disables the fullscreen mode of the currently selected mail info tab.

Parameters:
Name Type Description
enable boolean

activated if true

Source:

setFullscreen(enable)

This function enables or disables the fullscreen mode of the mail editor view

Parameters:
Name Type Description
enable boolean

activated if true

Source:

setPrimaryToAddress(newAddress)

This function changes the primary to-address of the ticket, used as recipient address to answer the currently selected message. The primary to-address of the ticket is also used to identify the contact of the ticket.

When the primary to-address is changed, the contact assignment of the ticket may also change. If the new to-address is not associated with an existing contact then a new contact will be created and assigned to the ticket.

Please note that the operation is executed asynchronously and the changes will take effect a short time after the method returns.

Parameters:
Name Type Description
newAddress string

the new address to be set for the currently selected ticket.

Source:
Returns:

false if no message is currently selected or if the operation cannot be performed for the currently selected message, otherwise true if the operation is being executed.

startNewProcess(options)

This function opens the QuickCase editor and starts a new process with the given optional parameters. if there are no options provided the default options to create a new ticket will be used. The default options can be configured in the 'Routing.conf' configuration file by the key 'agent.newProcess.quickCase.defaultParams'

Parameters:
Name Type Description
options object

object containing the following optional keys:

   customer       : customer email address
   cc             : cc address list for the ticket separated by '|'
   bcc            : bcc address list for the ticket separated by '|'
   category       : category name of ticket
   template       : template to be used for answer proposal
   account        : username or id of account to be used to process the ticket
   accountAddress : email address of account to be used to process the ticket - this is an alternative to identify the account by username or id
   refID          : refID to be applied to the ticket
   subject        : subject of the ticket
   language       : language code of the ticket
   channel        : channel of the ticket - allowed values are 1 (email), 2 (letter), 3 (fax)
   cause          : cause of ticket creation - allowed values are 1 (default - new process), 4 (phone ticket / call channel), 6 (generic work item), 7 (web form), 9 (invisible), 10 (API)
   contactID      : the id of the contact to be assigned to the ticket
   processID      : the process id of the process where the ticket should be assigned to
   crm_*          : for each parameter of type crm_ an email property will be created for the ticket
Source:

switchTab(tabname)

This function switches the mail info view to the tab with the specified name.

Parameters:
Name Type Description
tabname string

name of the tab

Source: