Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Need help with Translation map for a dataaction

    Posted 08-16-2024 06:04
    No replies, thread closed.

    Hi All, 

    For a data action in genesys i am getting the response in this format. 

    [
      {
        "document": {
          "orderID": "abc"
        }
      },
      {
        "document": {
          "orderID": "123"
        }
      }
    ]

    I would like to convert it to this format

    {
      "documents": [
        {
          "orderID": "abc"
        },
        {
          "orderID": "123"
        }
      ]
    }

    Please help me with the translation map configuration in response for this conversion to happen.  


    #API/Integrations
    #ConversationalAI(Bots,AgentAssist,etc.)

    ------------------------------
    Karthik Ageer
    Computer Generated Solutions, Inc.
    ------------------------------


  • 2.  RE: Need help with Translation map for a dataaction

    Posted 08-16-2024 06:40
    No replies, thread closed.

    Hi

    Whats your current translationMap?



    ------------------------------
    Cheers
    Zubair
    ------------------------------



  • 3.  RE: Need help with Translation map for a dataaction

    Posted 08-16-2024 06:45
    No replies, thread closed.

    I am getting error but this is what i currently have. 



    ------------------------------
    Karthik Ageer
    Computer Generated Solutions, Inc.
    ------------------------------



  • 4.  RE: Need help with Translation map for a dataaction
    Best Answer

    Posted 08-16-2024 07:08
    Edited by Cameron Tomlin 08-19-2024 11:32
    No replies, thread closed.

    Havent seen the source data structure but guess is to try below in translationMap

    "documents": "$.document"

    Or if first element is array then below

    "documents": "$[*].document"



    ------------------------------
    Cheers
    Zubair
    ------------------------------