02-06-2021 10:22 PM
Hey i have a JSON API 'https://safe-stream-34164.herokuapp.com/' and I have the following requirements:
1. The agent can select the required Menu/Submenu and click the Transfer Button
2. As soon as the agent click the transfer button, Gadget will store the values of Menu and Sub Menus into the call variable (for example Menu=CallVariable1, sub-menu=CallVariable2)
I am new to cisco not getting how to update the call variables by getting the id from JSON file any help would be appreciated
Thanks in advance
Solved! Go to Solution.
02-10-2021 07:59 AM - edited 02-10-2021 08:03 AM
I couldnt be able to write it was continuesly giving error hope it helps
02-08-2021 08:38 AM
Hi,
As you can see, I created a new discussion thread with your question. This way the responses won't get intertwined with the old post.
Are you using the UpdateCallVariableSampleGadget: https://github.com/CiscoDevNet/finesse-sample-code/tree/master/UpdateCallVariableDataSampleGadget ?
What do you mean when you say "not getting how to update the call variables by getting the id from JSON file"?
Also, once the call is transferred, you cannot update the call variables if you are not on wrap up. So, I would suggest that when the transfer button is pressed, you update the call variables first, then complete the transfer.
Please explain your code with more detail in order for me to help you further.
Thanx,
Denise
02-08-2021 10:18 AM
Hey yes i am using https://github.com/CiscoDevNet/finesse-sample-code/tree/master/UpdateCallVariableDataSampleGadget
I have deployed my json file on finesse server and accesing like this
02-08-2021 10:54 AM
Hi,
Ok. Understood that you want to store the value from the JSON. Looks like you got that part working, but can you explain what is not working? Are you getting an error in the console? Is the REST API request being made but getting an error back? Can you provide the logs? Did you try to step through the updateCallVariable method to see where it is having issues?
I need more details about what is not working in order for me to help you.
Thanx,
Denise
02-08-2021 11:04 AM
I am displaying it in displayCallVariables I have tried this code in other file its working, on clicking its getting the value but here it is not getting the value of names which i am retrieving . so i wanna know how to get the value of names on clicking and then storing its value in callvariable1 . I dont think iam calling updateCallVariable correctly .
02-08-2021 11:21 AM
Hi,
I'm sorry but you are still not giving me the details I need to help. You are saying that the issue is the update call variable, but you are not giving me the details of this part. I need details of your issues AFTER the call to updateCallVariable.
In the existing code, it logs "updateCallVariable(): Updating " + name + " to " + value + " for dialog with id: " + currentDialog.getId()" if a current dialog exists or "updateCallVariable(): There are currently no active dialogs" if it doesn't. What do you see in the console? If you do not see anything, then do you see the log you added to print the value (console.log($(this).text()))? Did you use the browser's debugger to step through the updateCallVariable method to see where it is being stuck?
Thanx,
Denise
02-08-2021 12:10 PM
I am getting the values from JSON but on clicking them nothing is happening as you see in this pic
02-08-2021 01:23 PM
Hi,
I suggest adding more meaningful log statements. Is the Array(6) log the one that matches console.log(data)? If so, I do not see the log statement for console.log($(this).text()), which means that it isn't even getting to the updateCallVariable method.
You should probably use breakpoints in the developer tool: https://developers.google.com/web/tools/chrome-devtools/javascript/breakpoints so that you can see which line of code is having issues.
Also, I don't think I quite understand what your code is doing in terms of trying to get the values. What is $(this).text() returning?
Earlier, you said that the updateCallVariable is not working, but it now seems like you are having issues getting the right values from your JSON. So where exactly is the issue? You will be able to figure this out if you used the breakpoints and found the exact line of code.
Thanx,
Denise
02-08-2021 06:02 PM
02-08-2021 07:25 PM
The problem is my jquery onclick function isnt working inside dialog in updatecallvariables.js file
02-08-2021 07:29 PM
$(this).text() is returning the value name which i want to update in call variable let me show you
This is my other file in which its getting the value I tried my code in it for testing purpose to see if I am doing okay
Here are both my folders attached can you review them also let me try breakpoints in developer tool
02-08-2021 08:58 PM
I got it solved!
Thankyou so much
02-09-2021 08:52 AM
Good to hear that you figured it out. What ended up being the solution? And if you don't mind, can you post it for others who may run into the same issue?
Thanx,
Denise
02-10-2021 07:49 AM
i
02-10-2021 07:59 AM - edited 02-10-2021 08:03 AM
I couldnt be able to write it was continuesly giving error hope it helps
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide