Legacy Dev Forum Posts

 View Only

Sign Up

Genesys Data Action Output Contract with Dot in the attribute name

  • 1.  Genesys Data Action Output Contract with Dot in the attribute name

    Posted 06-05-2025 18:47

    usuresh | 2024-12-10 19:13:55 UTC | #1

    Hi,

    Could you pls help to parse below response and get topic category name ? I am getting blank value because I have "dot" in the response attribute name. I tried putting double underscore still no luck. Is there a way to parse this ?

    Note : we are not getting topic_category as a object.

    { "result": [ { "number": "12345687", "sysid": "fjdhfkhlfdlsafdsa", "topiccategory.name": "Test", } ] }

    Response Contract Json: ======= { "type": "object", "properties": { "number": { "type": "string" }, "name": { "type": "string" } }, "additionalProperties": true }

    Response Translation: ======================= { "translationMap": { "number": "$.result[0].number", "name": "$.result[0].topiccategory_name" }, "translationMapDefaults": { "name": "\"\"" }, "successTemplate": "{\r\n\"number\": ${number},\r\n\"name\": ${name}}" }


    Mike_Hardie | 2024-12-11 21:06:48 UTC | #2

    try $.result[0].topic_category['name']


    usuresh | 2024-12-12 00:01:36 UTC | #3

    MikeHardie, post:2, topic:30787
    $.result[0].topiccategory['name']

    Hi Mike,

    Thanks for you response ! We tried but no luck. Any Other thoughts ?

    { "number": "12345687", "name": "" }


    Jerome.Saint-Marc | 2024-12-13 09:06:17 UTC | #4

    Hello,

    You can use the following Response Configuration:

    {
      "translationMap": {
        "number": "$.result[0].number",
        "name": "$.result[0]['topic_category.name']"
      },
      "translationMapDefaults": {
        "name": "\"\"",
        "number": "\"0\""
      },
      "successTemplate": "{\r\n\"number\": ${number},\r\n\"name\": ${name}}"
    }

    Regards,


    usuresh | 2024-12-13 13:23:55 UTC | #5

    Hi Jerome,

    It worked! Thank you for taking the time to respond to this query.

    I truly appreciate your help once again!

    Regards, Suresh U


    system | 2025-01-13 13:23:56 UTC | #6

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 30787