### Get Services Example Source: https://developer.cisco.com/docs/finesse/rest-services-user This example demonstrates how to retrieve the list of services configured for the user. This is particularly relevant for Agent Answers in Unified CCE deployments. ```javascript var services = user.getServices(); ``` -------------------------------- ### Get Install Log Source: https://developer.cisco.com/docs/finesse/log-collection-log-collection Use this command to retrieve the installation log file. The log is uploaded to the SFTP server. ```bash file get install desktop-install.log ``` -------------------------------- ### Get Install Log Source: https://developer.cisco.com/docs/finesse/log-collection-log-collection Retrieve the installation log file. This log is stored on the SFTP server. ```bash file get install install.log ``` -------------------------------- ### Initialize and Use SystemInfo Source: https://developer.cisco.com/docs/finesse/rest-services-systeminfo?_escaped_fragment_=rest-services-systeminfo%2Freference_DB3BA511281F3C77FD3772251B3FB522 Demonstrates how to instantiate the SystemInfo object and call its methods. Ensure the necessary callbacks are defined for asynchronous operations. ```javascript var systeminfo = new finesse.restservices.SystemInfo('',{ onLoad: handleSystemInfoOnLoad, onChange: handleSystemInfoOnChange }); systeminfo.getCtiMMode(); ``` -------------------------------- ### User Dialogs with onError Callback Example Source: https://developer.cisco.com/docs/finesse/restcollectionbase-common-parameters This example illustrates how to use the `onError` callback to handle failures during operations like GET, PUT, POST, and DELETE for user dialogs. The `onError` handler receives the response object. ```javascript user.getDialogs({ onLoad: function(user){}, onError: function(rsp){ // log the error message to clientLogs with rsp.error.errorMessage // render a meaningful error message into the UI } }); ``` -------------------------------- ### init() Source: https://developer.cisco.com/docs/finesse/shortcutkey-service Initializes the ShortcutKeyService. This method should be called to prepare the service for use by the Container or individual gadgets. ```APIDOC ## init() ### Description Initiates the ShortcutKeyService for the Container or the gadgets. ### Method POST (conceptual) ### Endpoint /shortcutKeyService/init ### Parameters None ### Response #### Success Response (200) - **null** - Indicates successful initialization. ### Response Example { "example": "null" } ``` -------------------------------- ### Run Migration Utility - Import Phase Source: https://developer.cisco.com/docs/finesse/cad-to-finesse-migration-tool Execute the migration utility's import phase from the command line to populate Finesse configuration. This must be run from the same location as the export phase. Provide Finesse server details and administrator credentials. ```bash convert.exe Yes import , , ``` -------------------------------- ### Team—Get List of Workflows Source: https://developer.cisco.com/docs/finesse/mediapropertieslayout-apis Retrieves the list of workflows available to a team. Workflows can automate certain agent tasks or guide them through processes. ```APIDOC ## GET /teams/{teamId}/workflows ### Description Retrieves the list of workflows configured for a specific team. ### Method GET ### Endpoint /teams/{teamId}/workflows ### Parameters #### Path Parameters - **teamId** (string) - Required - The unique identifier of the team. ``` -------------------------------- ### Initialize ClientServices Source: https://developer.cisco.com/docs/finesse/client-services Initiates the ClientServices module with configuration parameters. Ensure the 'config' parameter is valid. ```javascript finesse.clientservices.ClientServices.init(finesse.gadget.Config) ``` -------------------------------- ### Dialog—Start Recording Source: https://developer.cisco.com/docs/finesse/clientlogger Starts recording a dialog. ```APIDOC ## Dialog—Start Recording ### Description This API starts recording a dialog. ### Method POST ### Endpoint /Dialog/{dialogId}/Record ### Parameters #### Path Parameters - **dialogId** (string) - Required - The ID of the dialog. ``` -------------------------------- ### Dialog—Start Recording Source: https://developer.cisco.com/docs/finesse/apis-available-to-gadget-javascript Starts or stops the recording of a dialog. ```APIDOC ## Dialog—Start Recording ### Description Controls the recording of a dialog. Can be used to start or stop call recording. ### Method PUT ### Endpoint /Dialog/{dialogId}/Recording ### Parameters #### Request Body - **recordingState** (string) - Required - The desired recording state (e.g., START, STOP). ``` -------------------------------- ### init(config) Source: https://developer.cisco.com/docs/finesse/client-services Initiates the ClientServices module with the specified configuration parameters. This method must be called before other ClientServices methods can be used. ```APIDOC ## init(config) ### Description Initiates the ClientServices module with the specified configuration parameters. ### Method POST (implied) ### Endpoint N/A (JavaScript method) ### Parameters #### Request Body - **config** (Object) - Required - Configuration parameters for initialization. For more information, see Gadget Configuration. ``` -------------------------------- ### Dialog—Start Recording Source: https://developer.cisco.com/docs/finesse/finesse-container-timer Starts or stops the recording of an active call. ```APIDOC ## Dialog—Start Recording ### Description Controls the recording of an active call. Can be used to start or stop recording. ### Method PUT ### Endpoint /User/{userId}/Dialogs/{dialogId}/Recording ### Parameters #### Request Body - **recordingState** (string) - Required - The desired recording state ('START' or 'STOP'). ``` -------------------------------- ### init(hub, gadgetId, config) Source: https://developer.cisco.com/docs/finesse/clientlogger Initiates the client logger object for client logging messages. This method sets up the logger with the necessary hub connection, gadget identifier, and configuration. ```APIDOC ## init(hub, gadgetId, config) ### Description Initiates the client logger object for the client logging messages. ### Parameters #### Path Parameters - **hub** (Object) - Required - The Shindig hub topic that the gadgets wants to listen to. - **gadgetId** (String) - Required - Unique identifier of the gadget. - **config** (Object) - Required - The configuration data which is used to get the hostname for the third-party gadget. ### Request Example ```javascript var _clientLogger = finesse.cslogger.ClientLogger; _clientLogger.init(gadgets.Hub, "MyGadgetId", config); ``` ``` -------------------------------- ### BROWSER_POP Path Example Source: https://developer.cisco.com/docs/finesse/workflowaction-api-parameters Example of a path for a BROWSER_POP action, demonstrating variable embedding using ${variableName}. ```text http://www.example.com?q=${callVariable1} ``` -------------------------------- ### Initialize ShortcutKeyService Source: https://developer.cisco.com/docs/finesse/shortcutkey-service Initializes the ShortcutKeyService. This method should be called to set up the service for use by containers or gadgets. ```javascript finesse.shortcutkey.ShortcutKeyService.init(); ``` -------------------------------- ### HTTP_REQUEST Path Example (Finesse) Source: https://developer.cisco.com/docs/finesse/workflowaction-api-parameters Example of a path for an HTTP_REQUEST action to Finesse, specifying only the relative API path. ```text /finesse/api/Dialog/32458 ``` -------------------------------- ### Run Migration Utility - Export Phase Source: https://developer.cisco.com/docs/finesse/cad-to-finesse-migration-tool Execute the migration utility's export phase from the command line. This backs up CAD LDAP and serializes configuration. Ensure you are in the directory where the utility was extracted and consent to support terms. ```bash convert.exe Yes export Yes ``` -------------------------------- ### ResourceURLs Object Example Source: https://developer.cisco.com/docs/finesse/resource-urls An example of the ResourceURLs object containing an array of valid resource URLs for web applications. ```json ["/3rdpartygadget/files/GoogleMapsScreenPop/GoogleMapsScreenPop.css.gz", "/3rdpartygadget/files/SampleGadget.css", "/3rdpartygadget/files/UpdateCallVariableData/UpdateCallVariableDataSampleGadget.js.gz", "/3rdpartygadget/files/callinsights/New folder/bbc"] ``` -------------------------------- ### Upload Gadget using SFTP Source: https://developer.cisco.com/docs/finesse/upload-third-party-gadgets Use this SFTP command sequence to upload a third-party gadget XML file to the Finesse server. Ensure the file is placed in the correct directory. ```bash my_workstation:gadgets user$ sftp 3rdpartygadget@ 3rdpartygadget@'s password: Connected to . sftp> cd /files sftp> put HelloWorld.xml Uploading HelloWorld.xml to /files/HelloWorld.xml HelloWorld.xml sftp> exit ``` -------------------------------- ### User Response Example Source: https://developer.cisco.com/docs/finesse/client-integration Example XML response from the Finesse API when retrieving user information, including the state and extension. ```XML Copy LOGIN 98411 ``` -------------------------------- ### Get User Media List Source: https://developer.cisco.com/docs/finesse/rest-services-user Retrieves the media list associated with the user. Use this to get the media dialog collection object. ```javascript var mediaList = _user.getMediaList({ onCollectionAdd: _handleMediaAdd, onCollectionDelete: _handleMediaDelete, onLoad: _handleMediaListLoaded }); ``` -------------------------------- ### Initialize MediaOptionsHelper Source: https://developer.cisco.com/docs/finesse/mediaoptionshelper Instantiates the MediaOptionsHelper class with media and media options. This is used to synchronize media login options after a connection or system failure. ```javascript Copy_optionsHelper = new MediaOptionsHelper(_media, _mediaOptions); ``` -------------------------------- ### SSO Token Response Example Source: https://developer.cisco.com/docs/finesse/client-integration This is an example of the JSON response received after a successful SSO authentication, containing the access token and user ID. ```JSON {"token":"eyJjdHkiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ is3MiOiJpZHMuYXV0b2JvdC5jdnAiLCJzdWIiOiJ7XCJzY29wZVwiOltcImN Y19vbnByZW1fYXBwc1wiXSxcInJ0XCI6XCJlMTRkNDIzY2E1MjNmZDkzNGRkN cw4MDZjNTI2ZjZjMmI1MmIxZGMwXCIsXCJ1c2VyX2lkXCI6XCJzamVmZmVyc29 blsXCJyZWFsbVwiOlwiZmluZXNzZS5jb21cIixcInVwblwiOlwic2plZmZlcnN b25AZmluZXNzZS5jb21cIixcIm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2ZXJcIjpcIjEuMFwifSIsImV4cCI6MTY3MTcy MDQ2MSwiaWF0IjoxNjcxNzEzMjYxLCJqdGkiOiJlMTRkNDIzY2E1MjNmZDkzNGRkNzg 0MDZjNTI2ZjZjMmI1MmIxZGMwIn0.XlFitxdlNE0KKyD9uUIF_KHQNv0AR-JO7V9Ncl9G24 YuK66U-BGYXrK1h67larnVPmpDeDRm-g5C5ApLXTx-MT0RuhQZPc6hU6TBpyKkvk0FhYyf2 LU48j0seI5XuvS3_i_vDQxPY_Q6TXeaANBYjcgsNAHKoXvIO0K3YaZOUsx1yeVkPIFeCl8H3 iJgXCD5gOF4OUK_g8lda7-92ARiqIAFtobwYqa-a-ramXyXncG81ihFNL7ngXC6V50hTC zOduZYGvFxTGaLV753GAErrLNyKiKSm--txpoiBH5rf7w3JaJE9G98B64nHVhTm8nm4BysEV gF3UNLhcNb0C0Vtw","expires_in":300,"user_id":"sjefferson","realm": "finesse.com","user_principal":"sjefferson@finesse.com"} ``` -------------------------------- ### ConfigInfo—Get Source: https://developer.cisco.com/docs/finesse/api-parameter-types Retrieves configuration information for the Finesse system. ```APIDOC ## ConfigInfo—Get ### Description Retrieves configuration information for the Finesse system. ### Method GET ### Endpoint /api/config-info ```