Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Variable Scripters - editable?

    Posted 08-26-2022 13:45
    No replies, thread closed.
    I wanted to use the Variable Scripter Agent Name in one of our Scripts but we only use First names. Is it possible to edit the scripter? 

    Thanks
    Julie
    #ArchitectureandDesign

    ------------------------------
    Julie Kleedorfer
    Inspiritec, Inc.
    ------------------------------


  • 2.  RE: Variable Scripters - editable?

    Posted 08-28-2022 16:54
    No replies, thread closed.
    Create your own string variable
    and set it to something like slice({{Scripter.Agent Name}}, 0,indexOf({{Scripter.Agent Name}}," ") )
    Which should return just the part of the name before the first space, which should be the first name.

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



  • 3.  RE: Variable Scripters - editable?

    Posted 08-29-2022 09:09
    No replies, thread closed.
    Thanks but that didn't work. It just added the extra characters

    ------------------------------
    Julie Kleedorfer
    Inspiritec, Inc.
    ------------------------------



  • 4.  RE: Variable Scripters - editable?

    Posted 08-29-2022 15:27
    No replies, thread closed.
    Hi Julie

    You'll need to do this with a dynamic string variable.

    ------------------------------
    Vaun Mccarthy
    ------------------------------



  • 5.  RE: Variable Scripters - editable?

    Posted 08-30-2022 15:30
    No replies, thread closed.
    I'm really newer to this.. can you explain how a dynamic string variable works? what do I need to put in it to just get the Agents first name to pop up.

    ------------------------------
    Julie Kleedorfer
    Inspiritec, Inc.
    ------------------------------



  • 6.  RE: Variable Scripters - editable?
    Best Answer

    Posted 08-30-2022 16:21
    No replies, thread closed.
    Here is a step by step guide:

    When Creating a Variable
    Under Dynamic Types, Select the String (with the lightning bolt next to it)

    Give it a name and set the Value to  slice({{Scripter.Agent Name}}, 0,indexOf({{Scripter.Agent Name}}," ") )

    Add a text field to your script (the big T) and type in the name you gave the variable eg {{AgentFirstName}} or select the name eg AgentFirstName from the drop down when you type {{
    So you should end up with this: (where AgentFirstName is the name you gave the variable)
    And then on preview you should have the first name of who is logged in eg:



    Some further reading on Dynamic Variables:
    https://help.mypurecloud.com/articles/dynamic-script-variables/
    https://help.mypurecloud.com/articles/additional-functions-to-use-in-dynamic-variables/



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



  • 7.  RE: Variable Scripters - editable?

    Posted 08-31-2022 08:55
    No replies, thread closed.
    Thank you Anton so much! It worked perfectly!

    ------------------------------
    Julie Kleedorfer
    Inspiritec, Inc.
    ------------------------------