09-06-2021 10:34 PM - edited 09-06-2021 10:46 PM
Hi I am trying to develop a finesse gadget that requires a custom popover service in order to receive calls.
Currently in the action data object used in showPopover method, the "dismissible" key is set to false which results in the showPopover() handler function activating automatically after the popover timer runs down.If I set dismissible to true it returns an error in the logs "Uncaught Error: PopoverService: Action data structure is not in expected format. Refer finesse client logs for more details." My action data looks like this:
var popoverAction = {
"dismissible": false,
"keepMaximised": false,
"clientIdentifier": 'answerCall', // A string to uniquely identify a specific popover
"buttons": // Optional. Max 2
[{
"id": "AnswerCall",
"label": "Answer Call",
"type": "Affirm",
"hoverText": "Answer Call",
}]
};
I want the popover to be automatically dismissed after the timer is done without the handler function running.
Any help appreciated.
Solved! Go to Solution.
09-07-2021 01:57 PM
Hi,
Looking at the finesse.js code, it shows that you can get that error for the following code:
var actionDataResult = SchemaValidator.validateJson(actionData, SchemaMgr.getActionDataSchema()); if (!actionDataResult.valid) { _logger.log("PopoverService: Action data validation actionDataResult : " + JSON.stringify(actionDataResult)); throw new Error("PopoverService: Action data structure is not in expected format. Refer finesse client logs for more details."); }
From documentation (https://developer.cisco.com/docs/finesse/#!popover-service/actiondata), I noticed that it says:
The following method can be used to get the schema for the actionData object.
finesse.containerservices.PopoverSchema.getActionDataSchema().
I suggest seeing if you can use this method to print out the action data schema to see what is expected since that is what your object is being validated against.
Thanx,
Denise
09-07-2021 01:57 PM
Hi,
Looking at the finesse.js code, it shows that you can get that error for the following code:
var actionDataResult = SchemaValidator.validateJson(actionData, SchemaMgr.getActionDataSchema()); if (!actionDataResult.valid) { _logger.log("PopoverService: Action data validation actionDataResult : " + JSON.stringify(actionDataResult)); throw new Error("PopoverService: Action data structure is not in expected format. Refer finesse client logs for more details."); }
From documentation (https://developer.cisco.com/docs/finesse/#!popover-service/actiondata), I noticed that it says:
The following method can be used to get the schema for the actionData object.
finesse.containerservices.PopoverSchema.getActionDataSchema().
I suggest seeing if you can use this method to print out the action data schema to see what is expected since that is what your object is being validated against.
Thanx,
Denise
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: