Genesys Cloud - Main

 View Only

Sign Up

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

    Posted 04-02-2025 12:50
    No replies, thread closed.

    Hi there, need some assistance/guidance with dynamic script variable in a script.

    i have created a dynamic variable in a script and add getIndexValue(["a","b","c"], 1) just to test.

    when i preview the script, the variable returns blank instead of b.

    any suggestion/ solutions?


    #Unsure/Other

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


  • 2.  RE: Dynamic Script variable
    Best Answer

    Posted 04-02-2025 16:44
    Edited by Jason Kleitz 08-07-2025 13:53
    No replies, thread closed.

    Reginald,

    Thanks for taking time to ask a question.  The script builder uses Math.js for its evaluation of dynamic variables. I'm not sure where you found "getIndexValue" as a valid function to use in this context.  Using your example, try using bracket syntax for accessing arrays instead.

    ["a","b","c"][1]

    Here are some helpful links to learn more about Math.js and its use in scripter.

    https://help.mypurecloud.com/articles/dynamic-script-variables/#:~:text=Dynamic%20variables%20compute%20their%20own,True%2FFalse%20(Boolean).

    https://mathjs.org/docs/reference/functions.html

    ------------------------------
    Jacob NEWBY
    Senior Software Engineer
    ------------------------------



  • 3.  RE: Dynamic Script variable

    Posted 04-02-2025 17:55
    No replies, thread closed.

    @Jacob NEWBY His example of getIndexValue is from this page:

    https://help.mypurecloud.com/articles/additional-functions-to-use-in-dynamic-variables/

    If that is not valid, the page should be updated...



    ------------------------------
    Anton Vroon
    ------------------------------



  • 4.  RE: Dynamic Script variable

    Posted 04-03-2025 14:03
    No replies, thread closed.

    Anton,

    Thank you for your reply.  I see that "getIndexValue" is an extension that we support.  I have generated a ticket on our end to investigate this issue. 



    ------------------------------
    Jake NEWBY
    Senior Software Engineer
    ------------------------------



  • 5.  RE: Dynamic Script variable

    Posted 04-07-2025 10:29
    No replies, thread closed.

    any update on this?



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



  • 6.  RE: Dynamic Script variable

    Posted 04-22-2025 15:23
    No replies, thread closed.

    Sorry for the long delay in responding. We are working on an update with a timeframe of about a month. Will make a note to check back here and update again.



    ------------------------------
    Leor Grebler, Principal Product Manager - Agent Copilot
    leor.grebler@genesys.com
    Genesys - Employees
    ------------------------------



  • 7.  RE: Dynamic Script variable

    Posted 05-08-2025 12:58
    No replies, thread closed.

    We pushed the fix on this two weeks ago and it has gone out successfully.



    ------------------------------
    Leor Grebler, Principal Product Manager - Agent Copilot
    leor.grebler@genesys.com
    Genesys - Employees
    ------------------------------



  • 8.  RE: Dynamic Script variable

    Posted 04-03-2025 02:20
    No replies, thread closed.

    As Anton indicated, this is defined in the Genesys Resource center



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