Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Architect / Parsing built-in call variable, Call.UUIData, ascii string into individually addressable variables

    Posted 07-02-2025 08:25
    No replies, thread closed.

    What is the suggested way to parse the content of the Call.UUIData in architect, when using various encoding methods such as key/value pairs (key1=value1;key2=value2) or JSON ({"name":"John Doe","acct":"A123"}) into separate variables to reference and act upon in Architect?

    So for example, this string: key1=value1;key2=value2 is parsed into two variables:

    key1

    key2

    Thanks!


    #API/Integrations

    ------------------------------
    Alan Klein
    SA
    ------------------------------


  • 2.  RE: Architect / Parsing built-in call variable, Call.UUIData, ascii string into individually addressable variables
    Best Answer

    Posted 07-02-2025 08:57
    No replies, thread closed.

    Hello Alan, 

    I believe JSON is the preferred way, after parsing you can access individual variables by using dot notation. 

    Key-value pairs can work they generally require more complex parsing logic, I have seen them be more prone to errors, offer less flexibility for complex data structures and are harder to maintain or modify. 

    Cheers, 



    ------------------------------
    Cameron
    Online Community Manager/Moderator
    ------------------------------



  • 3.  RE: Architect / Parsing built-in call variable, Call.UUIData, ascii string into individually addressable variables

    Posted 07-02-2025 10:32
    No replies, thread closed.

    Very helpful Cameron, I appreciate your insights.



    ------------------------------
    Alan Klein
    SA
    ------------------------------



  • 4.  RE: Architect / Parsing built-in call variable, Call.UUIData, ascii string into individually addressable variables

    Posted 07-02-2025 13:05
    No replies, thread closed.

    Cameron,

    I've been trying to figure out how to parse the Call.UUIData which is JSON using JsonParse but running into issues. 

    Any tips?

    The UUI Hex is: 7B226E616D65223A224A6F686E20446F65222C2261636374223A2241313233227D
    Decodes as: {"name":"John Doe","acct":"A123"}

    And below are the two Architect actions.

    I am sometimes getting an error when it tries to read the name or sometimes it just reads the full JSON structure, and sometimes the function name and its contents, i.e. JSONParse(Call.UUIData).name.


    Ive' been trying many different permutations but really just looking for the name to be read back, so John Doe.



    ------------------------------
    Alan Klein
    SA
    ------------------------------



  • 5.  RE: Architect / Parsing built-in call variable, Call.UUIData, ascii string into individually addressable variables

    Posted 07-02-2025 13:17
    No replies, thread closed.

    Hello Alan, 

    I see that you are using JSONParse. It should be JsonParse. Everything else looks fine though. You are using JsonParse(Call.UUIData).name. 

    If this still doesn't work you could try and store the parsed JSON in a variable first:

    Assign parsedData = JsonParse(Call.UUIData)
    Then use: parsedData.name



    ------------------------------
    Cameron
    Online Community Manager/Moderator
    ------------------------------