igkouv | 2021-03-17 10:07:42 UTC | #1
Hello,
We are building a flow and until now we had a GetParticipantData with an attribute name and an assigned variable as string. Now, we want the attribute to accept a json (and not a string) at the corresponding variable.
Here it says:
To get an attribute, specify its name and a string variable you wish to assign to the attribute.
So, I want to know if Genesys allows to assign a json and not a string. Is this something we can implement or there is no other option except of string?
Thank you!
Jason_Mathison | 2021-03-17 17:58:04 UTC | #2
Hi igkouv,
As far as I know, Architect does not have a native JSON type. However, it is generally possible to store JSON in a string, although it may require some encoding. Can you give an example of what you are trying to do with the JSON?
--Jason
igkouv | 2021-03-17 21:22:07 UTC | #3
We store some information in a GetParticipantData. Let's say we have an attribute and we want the variable to handle a JSON and after that to get a specific value of a key from the JSON.
Could you please give me more information about the encoding you referred?
Jason_Mathison | 2021-03-18 13:17:57 UTC | #4
It is possible to escape / unescape JSON so that it can be stored in a string. For example: https://www.freeformatter.com/json-escape.html
However, Architect doesn't have any tooling to handle JSON data. For example it doesn't have any way to search through JSON data for a specific key / value pair.
A couple of thoughts come to mind. The first is to store each key/value pairs in their own Set participant data location. That way you can do a get participant data for the specific key/value pair that you want.
If you can't avoid the data being in JSON, you might be able to pass the data to a Lambda data action, and use a little bit of javascript to find and return the data that you want.
Depending on what you are trying to do, data tables might also be able to help you: https://help.mypurecloud.com/articles/work-with-data-tables/
Finally, you can describe your use case at https://genesyscloud.ideas.aha.io/ideas so that other users can vote on the idea and product management can prioritize your request.
--Jason
jarlei | 2021-04-14 12:04:12 UTC | #5
it would be very nice for the architect to work with json type ... 😉
system | 2021-05-15 12:04:13 UTC | #6
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 10308