Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  JSON Inputs to Common Module or Bot

    Posted 14 hours ago

    I would think that this would be a simple question, but I am unable to find the answer and have tried for too long to make it work.

    Can anyone provide a sample in Architect so a flow can call a common module or Bot and provide a JSON object as the input.
    I have created a JSON data item, can reference it, load it, etc in the flow.   I have setup the Bot with the same structured JSON object and tagged it as input, but when I run the flow, the values do not arrive in the Bot or Common module.


    #Architect
    #Archy

    ------------------------------
    Bruce Boulding
    ------------------------------


  • 2.  RE: JSON Inputs to Common Module or Bot

    Posted 12 hours ago

    Bruce, the way to handle this is to serialize the JSON object into a string, pass that string to the Common Module or Bot, and then parse it back into JSON on the receiving side before using it.
    One thing to keep in mind is that Architect string fields have a limit of around 32K characters, so it's important to check the payload size. If the payload can get too large, then compressing the JSON, or using a different approach like passing only a correlation ID and retrieving the full payload elsewhere, should be considered.



    ------------------------------
    Att,
    Breno Canyggia Ferreira Marreco
    ------------------------------



  • 3.  RE: JSON Inputs to Common Module or Bot

    Posted 10 hours ago

    I agree with Breno.

    Serializing the JSON object into a string can be a good workaround when the object is not being passed as expected between the flow and the Common Module or Bot Flow.

    The main point I would reinforce is the string size limit. Architect string variables have a limit of 32,000 characters, so this approach is safer for small or controlled payloads. If the JSON can grow over time, especially with customer data, arrays, history, or nested objects, it is important to validate the payload size before relying on this solution.

    For larger payloads, I would avoid passing the full JSON through the flow. In that case, passing only the required fields, or passing a correlation ID and retrieving the full payload from an external system or Data Action, would be a cleaner and safer approach.

    So, the string approach can work, but I would treat the 32K limit as an important design constraint.



    ------------------------------
    Arthur Pereira Reinoldes
    ------------------------------