Legacy Dev Forum Posts

 View Only

Sign Up

Genesys Data Action Output Contract Recognizes dot as underscores

  • 1.  Genesys Data Action Output Contract Recognizes dot as underscores

    Posted 06-05-2025 18:44

    CWebkas | 2023-03-03 16:24:53 UTC | #1

    Hi

    I have a raw data action output from which I need the element "rows.f.v". When writing this into the output contract, I'll get an empty result in this field, as "rows.f.v" translates to "rowsfv" for some reason (see screenshots below.

    Question. How do I make genesys output contract recognize names with dots included? Best Lukas

    ![image

    690x318](upload://AbFRR992OApXnjl9110y4ODf9j5.png)

    ![image

    690x424](upload://tnw2ZLPtQftfbAhVnO0suQTOd8U.png)

    ![image

    690x339](upload://16JwlpBLSmcU0L34QJbAvaHdYrO.png)

    Full resulting JSON

    { "schema.fields.name": [ "userid", "number", "firstname", "lastname", "orgunit", "location", "email" ], "kind": "bigquery#queryResponse", "schema.fields.type": [ "STRING", "STRING", "STRING", "STRING", "STRING", "STRING", "STRING" ], "cacheHit": true, "schema.fields.mode": [ "NULLABLE", "NULLABLE", "NULLABLE", "NULLABLE", "NULLABLE", "NULLABLE", "NULLABLE" ], "jobReference.projectId": "rpts-analytics", "jobComplete": true, "totalRows": "1", "jobReference.jobId": "job-zP2Yn3hEMOYCezXcIbZiP9wGh1o", "rows.f.v": [ [ "u00005877", "+41XXX", "Lukas", "Weixler", "741", "50.0", "None" ] ], "jobReference.location": "europe-west3", "totalBytesProcessed": "0", "rows_f__v": [ null ] }


    Jason_Mathison | 2023-03-03 21:57:48 UTC | #2

    Hi CWebkas,

    Can you provide the raw response from the endpoint, redacting anything private. The key part is that we get to see the keys and the shape of the data. You can get this from either the "Execute" step in test mode, or if you turn off the flattening box the test output should also be exactly what you got back.

    --Jason


    CWebkas | 2023-03-06 07:49:47 UTC | #3

    Hi Jason,

    Here is the redacted json raw response from the endpoint. I want to get the data within "rows.f.v". Thx ahead. Lukas

    { "schema.fields.name": [ "userid", "number", "firstname", "lastname", "orgunit", "location", "email" ], "kind": "bigquery#queryResponse", "schema.fields.type": [ "STRING", "STRING", "STRING", "STRING", "STRING", "STRING", "STRING" ], "cacheHit": true, "schema.fields.mode": [ "NULLABLE", "NULLABLE", "NULLABLE", "NULLABLE", "NULLABLE", "NULLABLE", "NULLABLE" ], "jobReference.projectId": "rpts-analytics", "jobComplete": true, "totalRows": "1", "jobReference.jobId": "job-zP2Yn3hEMOYCezXcIbZiP9wGh1o", "rows.f.v": [ [ "u00005877", "+XXXXX", "XXXXX", "XXXXX", "741", "50.0", "None" ] ], "jobReference.location": "europe-west3", "totalBytesProcessed": "0", "rows_f__v": [ null ] }


    Jason_Mathison | 2023-03-06 15:22:36 UTC | #4

    Hi CWebkas,

    The output that you just provided is definitely still being flattened. Can you either uncheck the "flatten ouput" checkbox or get the output from the execute step of test mode?

    --Jason


    CWebkas | 2023-03-06 15:50:15 UTC | #5

    Hi Jason,

    Thx, of course. Here is the un-flattened output. Thx ahead.

    { "kind": "bigquery#queryResponse", "schema": { "fields": [ { "name": "userid", "type": "STRING", "mode": "NULLABLE" }, { "name": "number", "type": "STRING", "mode": "NULLABLE" }, { "name": "firstname", "type": "STRING", "mode": "NULLABLE" }, { "name": "lastname", "type": "STRING", "mode": "NULLABLE" }, { "name": "orgunit", "type": "STRING", "mode": "NULLABLE" }, { "name": "location", "type": "STRING", "mode": "NULLABLE" }, { "name": "email", "type": "STRING", "mode": "NULLABLE" } ] }, "jobReference": { "projectId": "rpts-analytics", "jobId": "jobJuE5OmH47W5g4fUlYKfpZpUO9Fq", "location": "europe-west3" }, "totalRows": "1", "rows": [ { "f": [ { "v": "xxxxxxxx" }, { "v": "+xxxxxxxxxx" }, { "v": "xxxxxxxxx" }, { "v": "xxxxxxx" }, { "v": "xxxxx" }, { "v": "xxxxxxx" }, { "v": "xxxxxxxxx" } ] } ], "totalBytesProcessed": "0", "jobComplete": true, "cacheHit": true }


    Jason_Mathison | 2023-03-07 09:22:17 UTC | #6

    Thanks for that output, now we can work through your issues.

    It looks like you tried to create your output contract based on the flattened output that you were seeing. That isn't how you want to do it. If you are trying to output the raw result from that endpoint then you would need to create an output contract that looks like the output.

    Unfortunately, if you do that with this output, you will have an array within an array, which will fail when we attempt to flatten it. So here is an outline of the approach to try:

    Grab the "f" array from the first result in the "rows" array:

    { "translationMap": { "f-values" : "rows[0].f" }, "translationMapDefaults": { }, "successTemplate": "{ \"f-values\": $f-values}" }

    Then your output contract can look like this:

    { "type": "object", "properties": { "f-values": { "type": "array", "items": { "type": "object", "properties": { "v": { "type": "string" } }, "additionalProperties": true } } }, "additionalProperties": true }

    You may need to alter what you pull out of your results, but hopefully this will get you going.

    --Jason


    CWebkas | 2023-03-07 07:59:36 UTC | #7

    Success! Thank you very much for your help. To now access the single values, I modified the output contract and the response config as follows:

    Output Contract:

    { "type": "object", "properties": { "userID": { "type": "object", "properties": { "v": { "type": "string" } }, "additionalProperties": true }, "firstname": { "type": "object", "properties": { "v": { "type": "string" } }, "additionalProperties": true }, "lastname": { "type": "object", "properties": { "v": { "type": "string" } }, "additionalProperties": true }, "number": { "type": "object", "properties": { "v": { "type": "string" } }, "additionalProperties": true }, "location": { "type": "object", "properties": { "v": { "type": "string" } }, "additionalProperties": true } }, "additionalProperties": true }

    Response Config:

    { "translationMap": { "number": "rows[0].f[1]", "firstname": "rows[0].f[2]", "location": "rows[0].f[4]", "userID": "rows[0].f[0]", "lastname": "rows[0].f[3]" }, "translationMapDefaults": {}, "successTemplate": "{ \"userID\": $userID, \"number\": $number, \"firstname\": $firstname, \"lastname\": $lastname,\"location\": $location}" }


    Jason_Mathison | 2023-03-07 12:34:54 UTC | #8

    Glad we could help you get this working!

    --Jason


    system | 2023-04-07 12:34:59 UTC | #9

    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: 18710