Difference between revisions of "PEC-Developer/Current/SCAPI/SystemNamespace"

From Genesys Documentation
Jump to: navigation, search
m (Text replacement - "\|Platform=([^\|]*)GenesysEngage-onpremises([\|]*)" to "|Platform=$1GenesysEngage-cloud$2")
(Published)
Line 6: Line 6:
 
|ComingSoon=No
 
|ComingSoon=No
 
|Platform=GenesysEngage-cloud
 
|Platform=GenesysEngage-cloud
|Prereq=
 
 
|Section={{Section
 
|Section={{Section
 
|sectionHeading=Methods
 
|sectionHeading=Methods
 
|anchor=Methods
 
|anchor=Methods
 
|alignment=Vertical
 
|alignment=Vertical
|Media=
 
|image=
 
 
|structuredtext=The System namespace includes the following methods:
 
|structuredtext=The System namespace includes the following methods:
  
Line 80: Line 77:
 
{{!}}buttons
 
{{!}}buttons
 
{{!}}Array.<string>
 
{{!}}Array.<string>
{{!}}Optional. Each character string in this array becomes a button.
+
{{!}}Optional. Each character string in this array becomes a button. All buttons are displayed as buttons, not hyperlinks, in the following order: [Button 2] [Button 3] ... [Button N] [Button 1].
 
{{!}}-
 
{{!}}-
 
{{!}}buttonShowDismiss
 
{{!}}buttonShowDismiss
Line 142: Line 139:
 
{{!}}message
 
{{!}}message
 
{{!}}string
 
{{!}}string
{{!}}Optional. The subject.
+
{{!}}Optional. The message.
 
{{!}}-
 
{{!}}-
 
{{!}}keyValues
 
{{!}}keyValues
Line 150: Line 147:
 
{{!}}buttons
 
{{!}}buttons
 
{{!}}Array.<string>
 
{{!}}Array.<string>
{{!}}Each character string in this array becomes a button.
+
{{!}}Each character string in this array becomes a button. All buttons are displayed as buttons, not hyperlinks, in the following order: [Button 2] [Button 3] ... [Button N] [Button 1].
 
{{!}}-
 
{{!}}-
 
{{!}}buttonShowDismiss
 
{{!}}buttonShowDismiss
Line 186: Line 183:
 
{{!}}<tt>true</tt> if the toast has been updated; <tt>false</tt> if the toast identifier has not been found.
 
{{!}}<tt>true</tt> if the toast has been updated; <tt>false</tt> if the toast identifier has not been found.
 
{{!}}}
 
{{!}}}
|structuredtextwide=
 
|FAQHeading=
 
 
|Status=No
 
|Status=No
 
}}
 
}}
 
}}
 
}}

Revision as of 16:47, September 9, 2020

This topic is part of the manual Service Client API Reference for version Current of Developer.

Learn about the System namespace methods in the Service Client API.

Methods

The System namespace includes the following methods:

getAllowedServices

Signature <static> getAllowedServices() → {Array.<string>}
Description Gets the list of allowed services, as determined by the security configuration for Agent Desktop. If the domain of the web application that calls this method isn't listed in the service-client-api.accepted-web-content-origins option, then this method fails. Contact your Genesys representative for details about this configuration.
Returns Array.<string>

triggerActivity

Signature <static> triggerActivity()
Description Triggers a fake activity to prevent the inactivity timer from closing the agent session.

popupToast

Signature <static> popupToast(parameters) → {string}
Description Pops up a new custom toast.
Parameters
Name Type Description
title string The title
iconUrl string The URL of the icon you want to display in the title bar of the custom toast popup.
subject string Optional. The subject
message string Optional. The message
keyValues string Optional. JSON object used to fill the key value pair list. For example: {"key1" ; "value one","key2" ; "value two","key3" ; "value three"}.
buttons Array.<string> Optional. Each character string in this array becomes a button. All buttons are displayed as buttons, not hyperlinks, in the following order: [Button 2] [Button 3] ... [Button N] [Button 1].
buttonShowDismiss boolean Optional. If set to true, displays the Show and Dismiss buttons and pops up the current iframe if the Show button is pushed. If set to false , displays '"OK"' or custom buttons based on the parameter's buttons.
autoCloseTimeout object Optional. If set to greater than 0, the popup is automatically closed after the specified milliseconds.
sendToMyMessage object Optional. If set to true, sends the subject, iconUrl, title, keyValues, and message parameters to the MyMessage panel.
Returns A unique identifier

updateToast

Signature <static> updateToast(id, parameters) → {boolean}
Description Updates the specified toast.
Parameters
Name Type Description
id string The identifier of the toast to update. The identifier is returned by the popupToast method.
parameters object
Name Type Description
title string The title
iconURL string The URL of the icon you want to display in the title bar of the custom toast popup.
subject string Optional. The subject.
message string Optional. The message.
keyValues object Optional. JSON object used to fill the key value pair list. For example: {"key1" : "value one","key2" : "value two","key3" : "value three"}.
buttons Array.<string> Each character string in this array becomes a button. All buttons are displayed as buttons, not hyperlinks, in the following order: [Button 2] [Button 3] ... [Button N] [Button 1].
buttonShowDismiss boolean If set to true, displays Show and Dismiss buttons and pops up the current iframe if the Show button is pushed. If set to false, displays '"OK"' or custom buttons based on the parameter's buttons.
Returns true if the toast has been updated; false if the toast identifier has not been found.

closeToast

Signature <static> closeToast(id) → {boolean}
Description Closes the specified toast.
Parameters
Name Type Description
id string The identifier of the toast to close. The identifier is returned by the popupToast method.
Returns true if the toast has been updated; false if the toast identifier has not been found.
Comments or questions about this documentation? Contact us for support!