Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Agent Script Dynamic Variable

    Posted 08-23-2024 16:17
    No replies, thread closed.

    Hi community,

    Please advise if the below is possible within an Agent Script:

    1. Receive Json data in script: Sample - {"CLI":"8902057923","DNIS":"8902704132","MSISDN":"8902057923"}
    2. I require to extract the received data, (CLI,  DNIS, MSISDN) and assign to variable in agent script.
    3. i would also need to be able to handle the avocve is any one of the data in Json is returned blank.

    please advise if the above is possble?


    #SystemAdministration

    ------------------------------
    Reggie
    ------------------------------


  • 2.  RE: Agent Script Dynamic Variable

    Posted 08-24-2024 01:03
    No replies, thread closed.

    Hi Reggie

    How does this JSON object get to the script?  If it's coming in via Architect then you could just use Architect to split it up and assign to participant data that matches input variables in the script?



    ------------------------------
    Vaun McCarthy
    ------------------------------



  • 3.  RE: Agent Script Dynamic Variable

    Posted 08-26-2024 16:14
    No replies, thread closed.

    sorry for late response, the problem is that the data is provided via CRM system on script loading and not via Architech



    ------------------------------
    Reginald
    ------------------------------



  • 4.  RE: Agent Script Dynamic Variable

    Posted 08-29-2024 15:02
    No replies, thread closed.

    Reginald, 

    If the data is coming from the CRM on a script. I won't be able to speak to this much. 

    But to echo what @Vaun McCarthy stated if it was coming from Architect you could then use Architect to split it up and assign it to participant data that matches the variables. 

    Cheers, 



    ------------------------------
    Cameron Tomlin
    Online Community Manager/Moderator
    Genesys - Employees
    ------------------------------



  • 5.  RE: Agent Script Dynamic Variable

    Posted 09-03-2024 12:30
    No replies, thread closed.

    How is the data provided by the CRM? I would consider using a Data Action to call the CRM's API on page load (you can call DAs from Scripts) and parse out the data within the Data Action to return the data required as separate items.

    HTH



    ------------------------------
    Paul Simpson
    Views expressed are my own and do not necessarily reflect those of my employer.
    ------------------------------



  • 6.  RE: Agent Script Dynamic Variable

    Posted 09-09-2024 02:00
    No replies, thread closed.

    Hi all, thanks for your response, i have resolved this via API but will be logging an idea to retrieve Json within script.

    Thanks all



    ------------------------------
    Reginald
    ------------------------------



  • 7.  RE: Agent Script Dynamic Variable

    Posted 09-09-2024 07:19
    No replies, thread closed.

    Hi Reginald, 

    Just out of my own curiosity, what can you give specifics on how you resolved this and what specific API you used? 

    Cheers,



    ------------------------------
    Cameron Tomlin
    Online Community Manager/Moderator
    Genesys - Employees
    ------------------------------



  • 8.  RE: Agent Script Dynamic Variable
    Best Answer

    Posted 09-09-2024 07:25
    No replies, thread closed.

    Hi there, the customer changed there API on how they return data, no longer 1 x Json, i can now assign is value to a variable in the API which i call on loading of page and display in agent script



    ------------------------------
    Reginald
    ------------------------------