Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Transform contract outputs

    Posted 04-02-2025 10:03

    Hello!

    I set a data action that returns a list of objects, which one of the objects will return a proper called "lineOfBusinessName".

    I'm don't know the number of objects for every input, so I decided to concat the list of lineOfBusinessName in a string on the translationMap, but since I can't use the join function, I used concat that returns all together, without a separator. How can I solve this using any separator like a comma or a pipe between each item on the string lineOfBusinessNames?

    Here's the configuration:

    {
      "translationMap": {
        "lineOfBusinessNames""concat($[*].lineOfBusinessName)",
        "errorMessage""$.errors[0].Message"
      },
      "translationMapDefaults": {
        "errorMessage"""
      },
      "successTemplate""{ \"lineOfBusinessNames\": ${lineOfBusinessNames}, \"errorMessage\": \"${errorMessage}\" }"
    }

    #DataActions

    ------------------------------
    Samara Silva
    ------------------------------


  • 2.  RE: Transform contract outputs

    Posted 04-08-2025 14:28

    Can you provide an example of the response you are getting (please redact anything sensitive, but keep the object "shape" the same.)  Also provide what you want the output to look like.



    ------------------------------
    --Jason
    ------------------------------