cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
718
Views
0
Helpful
1
Replies

Popover actiondata does not accept true dismissible key.

hn117
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

dekwan
Cisco Employee
Cisco Employee

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.

CODE SNIPPET
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

 

 

View solution in original post

1 Reply 1

dekwan
Cisco Employee
Cisco Employee

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.

CODE SNIPPET
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

 

 

Getting Started

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: