Genesys Cloud - Main

 View Only

Discussion Thread View
  • 1.  Agent Script Dynamic Variable

    Posted 08-23-2024 16:17

    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

    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

    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

    GENESYS
    Posted 08-29-2024 15:02

    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

    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

    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

    GENESYS
    Posted 09-09-2024 07:19

    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

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



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources