Genesys Cloud - Developer Community!

Sign Up

  • 1.  Web Messaging - Send information to front end without sending a message

    Posted 11 days ago

    I want to send information from the Architect flow (in this case in-queue message flow, but maybe others later) so that I can display the queue position and estimated wait time before the user gets to the chat.  I can use the database get command or subscribe to database updates through the SDK, but I have no way to update the customAttributes in Architect.

    Any suggestions on how I can update customAttributes, or otherwise update data in Architect so that the front end can subscribe to it?


    #ArchitectandDesign

    ------------------------------
    Dan Gilmour
    ------------------------------


  • 2.  RE: Web Messaging - Send information to front end without sending a message

    Posted 10 days ago

    Hi Dan,

    I think this question may be better suited to the Genesys Cloud Developer Community so that the experts there can help with this, so I am going to move it over.



    ------------------------------
    Sam Jillard
    Online Community Manager/Moderator
    Genesys - Employees
    ------------------------------



  • 3.  RE: Web Messaging - Send information to front end without sending a message

    Posted 10 days ago

    Thanks



    ------------------------------
    Dan Gilmour
    ------------------------------



  • 4.  RE: Web Messaging - Send information to front end without sending a message

    Posted 10 days ago

    Hi @Dan Gilmour,

    There may be a better way to do this but you can use "Set Participant" step in Architect to set a key-value pair with the value of "position in queue" or "estimated wait time". Then you can subscribe to events from v2.detail.events.conversation.{id}.attributes and you can look for changes in the two participant data elements you set within Architect. You can subscribe to v2.detail.events.conversation.{id}.attributes either via eventbridge or websockets.

    Hope this helps, until someone posts a better solution.

    Regards



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



  • 5.  RE: Web Messaging - Send information to front end without sending a message

    Posted 9 days ago

    Thanks Vineet, to clarify I'm currently using database get in the SDK commands (link) to get participant data.  I've set the data with "Set Participant Data" in architect with the attribute name "Estimated_Wait_Time", but that value does not appear in custom attributes when I use database get.

    Would what you are suggesting only work when using the proper API?



    ------------------------------
    Dan Gilmour
    ------------------------------



  • 6.  RE: Web Messaging - Send information to front end without sending a message

    Posted 9 days ago

    The issue with the Database command is that it needs to send a message to update, also I don't think you can use to it to get attributes, only to save them to the conversation.

    If you're building your own chat widget, the easiest solution would be to have Architect send the message, and the widget then decides how to present it, or is the idea to show this information somewhere on the website?



    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



  • 7.  RE: Web Messaging - Send information to front end without sending a message

    Posted 9 days ago

    The dream is to reuse as much as we can so we can release our chat feature sooner, which means reusing the ootb chat widget for the actual chat experience, and just building a different chat intake form so the user does not interact with the bot, and displaying queue and wait time in a separate sceen, so that we minimize the interaction with a bot.  

    Therefore the challenge with getting info through messages is that they eventually do appear in the chat that the user sees, so it would be quite confusing.



    ------------------------------
    Dan Gilmour
    ------------------------------



  • 8.  RE: Web Messaging - Send information to front end without sending a message

    Posted 9 days ago

    So if I understand it correctly you want to show the queue information before the customer starts the chat?

    In that case you would need to use APIs to get queue observations and wait time and display that in the form.
    You could have some middleware in the backend the subscribes to this information that your website can get the information from.



    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



  • 9.  RE: Web Messaging - Send information to front end without sending a message

    Posted 9 days ago

    Thanks Dan for clarifying, though I am not sure I understand why would a bot be involved once you have put a message in the queue and there you can use inqueue-messenger to show the customer position-in-queue or estimated-wait-time.
    Your requirement is surely building a slightly complex solution than using the ootb messenger.

    Regards



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



  • 10.  RE: Web Messaging - Send information to front end without sending a message

    Posted 9 days ago

    shared a project recently (diagram included) that involves a Digital Bot Flow communicating with a website (outside of the Web Messenger UI), however similar to what @Jan Heinonen suggests it involves a separate service.

    In your case the service would periodically call an endpoint like GET /api/v2/routing/queues/{queueId}/estimatedwaittime and expose it to your website.

    Similar to you I also investigated sending information through the Messenger SDK, but for me the Web Messenger session had already began. I had little success getting information from the Flow back the to Client though.

    I wonder for whether for your solution you could just have a scheduled AWS Lambda that:

    1. Calls GET /api/v2/routing/queues/{queueId}/estimatedwaittime
    2. Writes the wait time to a JSON file in a public S3 bucket
    3. Website then retrieves the JSON file to display the wait time

    It's the simplest I can think of, but doesn't use anything out the box.



    ------------------------------
    Lucas Woodward
    Winner of Orchestrator of the Year, Developer (2025)

    LinkedIn - https://www.linkedin.com/in/lucas-woodward-the-dev
    Newsletter - https://makingchatbots.com
    ------------------------------