Genesys Cloud - Main

 View Only

Sign Up

  • 1.  Scripting for web message

    Posted 18 hours ago

    Hello,

    We are looking to create a script for our Web Messaging for when it gets to an agent. So the message goes through the digital bot, and the bot replies "Thank you "+State.Name+", the next available agent will be right with you". We want a script to then pop, once it's connected with an agent that states, "Hi "+State.Name+" this is John Smith (the name of the agent handling the web message). How can I help you today?"

    Has anyone set this up before, and how would we be able to pull that information since it's collecting the info after the web message is connected?

    Any assistance is appreciated.

    Thank you!


    #DigitalChannels
    #Routing(ACD/IVR)
    #Other

    ------------------------------
    Katie Dodge
    Telecom Administrator
    ------------------------------


  • 2.  RE: Scripting for web message
    Best Answer

    Posted 17 hours ago

    Hi Katie,

    Yes this is possible and there are a few steps required.

    Bot flow

    In the Bot flow you will need to collect and store the customers name as a attribute like CustomerName.

    How do you plan on collecting the customers input?

    Scripts 

    1. go to Digital and Telephony > Interactions Assets > Scripts and pick the relevant script your agents will use.
    2. Click the Variables tab
      • Click Add Variable
      • Choose Basic variable type (String)
      • Name it exactly as your participant attribute (e.g., "CustomerName") - the names must match exactly

    Then you need to enable the input property.

    Once these steps are complete, the attribute customer name can be used in the script - Use your input variable, e.g., {{CustomerName}}

    Here is the genesys documentation.

    Thanks

    James



    ------------------------------
    James Brannigan
    Senior Technical Account Manager
    ------------------------------



  • 3.  RE: Scripting for web message

    Posted 17 hours ago

    Thank you for this! I will try this and let you know!



    ------------------------------
    Katie Dodge
    Telecom Analyst
    ------------------------------



  • 4.  RE: Scripting for web message

    Posted 15 hours ago

    To answer your question about collecting the customer's input, it's captured in the digital bot flow. It's in the output as "State.Name" 



    ------------------------------
    Katie Dodge
    Telecom Analyst
    ------------------------------



  • 5.  RE: Scripting for web message

    Posted 15 hours ago

    Hi Katie!

    You're on the right track, but there's a key step missing. Here are two options to pass the customer name to your agent script:

    Option 1: Set Participant Data Action 

    In Your Bot Flow:

    1. Collect the customer name
    2. Use the Set Participant Data action:
      • Attribute Name: "CustomerName"
      • Value: Your collected name variable
    3. Transfer to queue

    In Your Agent Script:

    1. Go to Variables tab
    2. Add a Basic variable named exactly "CustomerName" (must match your attribute name)
    3. Enable the Input property
    4. Reference it in your script: {{CustomerName}}

    Option 2: Set Screen Pop Action with Script Inputs

    In Your Bot Flow:

    1. Collect the customer name into a Flow variable (e.g., Flow.CustomerName)
    2. Use the Set Screen Pop action (Data category):
      • Select your published script
      • Map Flow.CustomerName to the script's input variable
    3. Transfer to queue

    In Your Agent Script:

    1. Create a variable (e.g., "CustomerName")
    2. Enable the Input property (allows the variable to receive values from Architect)
    3. Reference it: {{CustomerName}}

    Important: Variable names and data types must match exactly between your flow and script.

    Why State.Name Won't Work

    State variables only exist within that specific state. Even Flow variables alone aren't enough - you must either use Set Participant Data OR Set Screen Pop to pass data to agent scripts. Regular variables don't automatically transfer to agents.

    Hope this helps



    ------------------------------
    Josh Coyle
    Senior Professional Services Consultant
    ------------------------------