Discussion Thread View
  • 1.  JSON Builder Understanding Required

    Posted 07-29-2021 05:36
    Dear Team,
    I am struggling to use the JSON Builder Tool in Interaction Designer.

    Need to Build a JSON for a POST Request.

    Sample Body Required : {"id": 1,"firstName": "Akif","lastName": "Dadan","email": "springbootsampler@btc.co.sa"}

    Error attached,

    Kindly help me understand what a list of string means in Designer.

    I have tried the following formats :

    Each of it gives the same error.

    Requirement is to build a JSON as stated above.

    Referred the guide - https://help.genesys.com/pureconnect/mergedprojects/wh_tr/desktop/pdfs/designer_rest_api_dg.pdfhttps://help.genesys.com/pureconnect/mergedprojects/wh_tr/desktop/pdfs/designer_rest_api_dg.pdf

    This does not specify how inputs are given to the JSON Builder Block


    Akif Dadan Dadan
    Baud Telecom Company Ltd

  • 2.  RE: JSON Builder Understanding Required

    GCAP Member
    Posted 07-29-2021 09:13

    Pressing "F1" with the toolstep open in designer brings up the guidance for each tools inputs and outputs:

    JSON Builder

    In this case the tool expects parallel lists for each of the 3 values that you pre-build.  For example:

    lsnames = ["name1", "name2"]
    lsvalues = ["val1", "val2"]
    lstypes = ["string", "string"]

    This would produce

    { "name1" : "val1", "name2" : "val2" }

    Hope this helps.

    State of Utah