Genesys Cloud - Main

Sign Up

Expand all | Collapse all

Capture the values entered through forms in web messaging within the inbound message flow

  • 1.  Capture the values entered through forms in web messaging within the inbound message flow

    Posted 7 days ago

    I am trying to capture the values entered through forms in web messaging within the inbound message flow so that they can be presented to the agent. However, while I can see the form values in the Interaction details, I am unable to capture them within the inbound message flow. 

    I attempted to capture the values in the initial task using Get Participant Data and store them in variables such as State.fullName / State.email, but no values are being captured.

    Am I approaching this incorrectly? What is the correct method to capture form values in this scenario?


    #ArchitectandDesign
    #DigitalChannels

    ------------------------------
    Tibin Thomas
    ------------------------------


  • 2.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 6 days ago

    If you want to pass data elements captured in an architect flow to the agent script - first declare them as input variable in the script

    image
    And then in your architect flow add a Setscreenpop data to map the architect (or participant data) values to the input variables in the script.
    image
    I hope this is what you are after.


    ------------------------------
    Richard Robinson
    Senior Technical Account Manager
    ------------------------------



  • 3.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 6 days ago

    Hi Richard,

    I understand your suggestion to send the captured details to the agent through Screen Pop. However, I'm unable to capture the details entered in the pre-chat form within the inbound message flow. Is there a way to achieve this? I can see these values reflected in the interaction report under Participant Data.



    ------------------------------
    Tibin Thomas
    ------------------------------



  • 4.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 5 days ago

    Apologies was off yesterday afternoon - but I see others have stepped in and you have the answer.

    Great collaboration...  Interesting - you had all the technical bits working... and it was a simple timing issue!

    I have seen a customer in a similar situation - where the customer continues to work on the web page whilst in the middle of a messaging session.  They built in functionality - so that when a form was competed in the form - it automatically posted a message from the customer side into the conversation - so that the agent was notified.



    ------------------------------
    Richard Robinson
    Senior Technical Account Manager
    ------------------------------



  • 5.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 6 days ago
    Edited by Phaneendra Avatapalli 6 days ago

    Hi Tibin,

    You could try handling this in the Digital Bot Flow instead. Before transferring to ACD, use Set Screen Pop to pass the form values to the agent.

    Also, make sure the attribute names match between what you set in the bot flow and what your agent script expects.

    We had a similar issue when we first implemented our digital bot a couple of years ago, and capturing the values in the bot flow helped us reliably pass them to the agent.

    This is likely because the values are captured during the interaction in the bot flow, rather than at the start of the inbound message flow.

    Hope this helps.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 6.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 6 days ago

    Hi Tibin,

    If you're trying to read the form fields directly in the inbound flow, that may not work.


    Get Participant Data is the preferred method and only works for data that was already written as participant data/custom attributes.

    So the better approach is:

    • if the form values are collected on the website, pass them in as custom attributes / participant data
    • then use Get Participant Data in the flow
    • then use Set Participant Data before sending to the agent in the script as indicated by @Richard Robinson



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



  • 7.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 6 days ago

    Hi Josh & Hi Phaneendra,

    Thanks for your valuable feedback.

    I'm passing the form values in custom attributes and i can see that in interaction report also. But how i can capture it in Get Participant Data ? what is the 'variable to assign' in Get Participant Data ?

     // Collect form values
        const fullName = document.getElementById('fullName').value.trim();
        const email      = document.getElementById('email').value.trim();
        const question    = document.getElementById('question').value.trim();

        Genesys("command", "Database.set", {
          messaging: {
            customAttributes: {
              fullName:  fullName,
              email:      email,
              question:    question
            }
          }
        },

    Best Regards,



    ------------------------------
    Tibin Thomas
    ------------------------------



  • 8.  RE: Capture the values entered through forms in web messaging within the inbound message flow
    Best Answer

    Posted 6 days ago

    Hi Tibin, 

    Within your architect flow you must use the Get Participant blocks, if the names are as above the this is what it would look like.

    The key part is ensuring the "Attribute Name" matches exactly the format that is being passed into Genesys, you can then store the underlying information in a variable name of your choice and utilise this elsewhere within the flow. 



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



  • 9.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 6 days ago

    Hi Josh,

    Thanks for sharing  it looks like the screenshot is from the Digital Bot Flow, so Tibin would likely need to implement this there rather than in the inbound message flow, from what I understand.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 10.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 6 days ago

    Hi Phaneendra, 

    This screenshot is actually from the Inbound Message Flow and not the Digital Bot Flow, Tibin could implement this in either flow (providing there is a Digital Bot Flow in the architecture which may not be the case).

    The key part is waiting for the information to become available, this could be via a Wait block and if needed forming a Loop to evaluate if this information has or hasn't been captured before continuing on the journey.



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



  • 11.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 6 days ago
    Edited by Phaneendra Avatapalli 6 days ago

    Thanks Josh, that's really helpful, appreciate the clarification.

    I was just about to suggest a similar Wait/Loop approach as well 🙂. 

    Glad to hear it all working now Tibin.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 12.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 6 days ago

    Hi Tibin,

    It looks like your setup is correct - based on your initial post, you're using the right variables (e.g. state.fullname/state.email), and since you can see the values in Interaction Details, the keys and data are being set properly.

    From my understanding, the issue here is likely related to timing rather than configuration.

    The inbound message flow runs at the very start of the interaction, whereas the custom attributes you're setting (via Database.set) are written after the conversation begins. By the time those values are available, the inbound flow has already executed, which is why Get Participant Data isn't returning anything at that stage.

    That's why handling this in the Digital Bot Flow tends to work more reliably, as it runs after the data has been captured.

    Hope this helps and keen to hear if others in the community have approached this differently



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 13.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 6 days ago

    Thanks for sharing Phaneendra, the timing point is a good one. 

    Just to build on that, the reason for focusing on Get Participant Data is that it is still the correct mechanism to read those values once they exist as participant data. So the approach itself is more about when they are trying to be accessed.

    In this case, if the custom attributes are only being written after the conversation starts, then the inbound message flow is probably executing too early to pick them up..

    So practically it becomes:
    • Use Get Participant Data > correct method
    • But use it in a flow stage where the data is already available (e.g. bot flow, later in the inbound message flow or later in the interaction)



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



  • 14.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 6 days ago

    Thanks Josh, that's really helpful appreciate the clarification.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 15.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 6 days ago

    Thanks Josh and Phaneendra for your valuable inputs. Now i'm able to capture the value with Get Participant Data node.

    Best Regards,



    ------------------------------
    Tibin Thomas
    ------------------------------



  • 16.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 6 days ago

    That's great news that it is now working for you Tibin. 



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



  • 17.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 6 days ago

    Hi @Tibin Thomas,

    Did you try changing the variables from State.fullname/State.email to Flow.fullname/Flow.email ?

    Regards



    ------------------------------
    Vineet Kakroo
    Senior Technical Consultant
    ------------------------------



  • 18.  RE: Capture the values entered through forms in web messaging within the inbound message flow

    Posted 5 days ago

    Yes Vineet.



    ------------------------------
    Tibin Thomas
    ------------------------------