Genesys Cloud - Main

 View Only
Discussion Thread View
Expand all | Collapse all

Data Action Translation Map

  • 1.  Data Action Translation Map

    Posted 11-21-2022 10:51
    Edited by Hanife Nur Özçetin 11-21-2022 10:53
    Hello,
    I am working on my integration action information. I am trying to create a custom action by taking id as input and from that I am going to get user info such as avatar and first/last name of the user.
    INPUT CONTRACT
    {
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "User Info Request",
    "description": "Fields needed in the body of the POST to create a calendar reminder.",
    "type": "object",
    "required": [
    "id"
    ],
    "properties": {
    "id": {
    "type": "number"
    }
    },
    "additionalProperties": true


    OUTPUT CONTRACT
    {
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "data",
    "description": "",
    "type": "object",
    "properties": {
    "avatar": {
    "type": "string"
    },
    "first_name": {
    "type": "string"
    },
    "last_name": {
    "type": "string"
    }
    },
    "additionalProperties": true
    }


    RESPONSE
    {
    "translationMap": {
    "first_name": "$first_name",
    "last_name": "$last_name",
    "avatar": "$avatar"
    },
    "translationMapDefaults": {},
    "successTemplate": "${rawResult}"
    }


    When I try to test I got an error which is :
    Resolve translation map: Failed while processing the translation map. Could not resolve value for the key: 'first_name' and no default value was configured. Additional details: Illegal character at position 1 expected '.' or '['

    What I do wrong? I am new at coding. Any help would be appreciated.
    Sincerely, 

      #Integrations

      ------------------------------
      Hanife Nur Özçetin
      Customer Experience Yazilim Danismalik Ticaret LTD
      ------------------------------


    • 2.  RE: Data Action Translation Map

      GENESYS
      Posted 11-21-2022 11:43
      Hello Hanife,

      One of our peers here might respond to your question in a bit, but as an alternative I wanted to point you to our Developer Forum where devs and programmers like you are more active. There might already be a thread similar to your question there. It is also highly likely that posting this question there would get you a faster, if not better, answer.

      ------------------------------
      Nico Feliciano
      Genesys - Employees
      ------------------------------



    • 3.  RE: Data Action Translation Map

      Posted 11-21-2022 15:29
      Hi Hanife - 
      I agree with Jan - the Developer Forum is where I got up to speed on building out data actions and response mapping. But sometimes asking the right question to get the right result is pretty tedious. I'll take a shot at giving you a hand.
      I'm still fairly new to how all of this works, but I think you might be missing a "." to help the data action search within the message for the tag you're looking for.
      So: "first_name": "$first_name", 
      Should be: "first_name": "$.first_name",

      Maybe try:
      {
      "translationMap": {
      "first_nameValue": "$.first_name",
      "last_nameValue": "$.last_name",
      "avatarValue": "$.avatar"
      },
      "translationMapDefaults": {},
       "successTemplate": "{\"first_name\": ${first_nameValue}, \"last_name\": ${last_nameValue}, \"avatar\": ${avatarValue}}"
      }

      Thanks,


      ------------------------------
      Cory King
      IT Lead
      Interstate Gas Supply, Inc.
      ------------------------------



    • 4.  RE: Data Action Translation Map

      Posted 11-22-2022 16:03
      Edited by Muhammad Zubair Awan 11-22-2022 16:04
      Hi Hanife,

      The JSON path for translation map values $first_name, $last_name, and $avatar look incorrect - that is why you are getting the error Illegal character at position 1 expected '.' or '[' - also you haven't defined the success template. You need to define the correct JSON path for the translation map values which you will need to find from the (Response) body of the API you are calling. You have only shared the contracts and not the config so can't tell you the exact path without knowing the API you are using but as an example if you need to read id and name from below JSON

      {
      "id": "1111-2222-3333-4444",
      "name": "Jack Sparrow"
      }

      then your translation map should be as below - where userId and userName are your output contracts

      {
      "translationMap": {
      "userId": "$.id",
      "userName": "$.name"
      },
      "translationMapDefaults": {},
      "successTemplate": "{\"userId\": ${userId},\"userName\": ${userName}}"
      }

      Hope this helps.

      Cheers

      ------------------------------
      Muhammad Zubair Awan
      Spark NZ Trading
      ------------------------------



    • 5.  RE: Data Action Translation Map

      Posted 11-23-2022 01:29
      Hi,
      My configuration ;
      {
      "requestUrlTemplate": "https://reqres.in/api/users?page=2",
      "requestType": "GET",
      "headers": {},
      "requestTemplate": "${input.rawRequest}"
      }

      I tried both of the suggestions but the error is the same.
      9. Resolve translation map: Failed while processing the translation map. Could not resolve value for the key: 'userId' and no default value was configured. Additional details: No results for path: $['id'].


      ------------------------------
      Hanife Nur Özçetin
      Customer Experience Yazilim Danismalik Ticaret LTD
      ------------------------------



    • 6.  RE: Data Action Translation Map

      Posted 11-23-2022 16:48
      Hi,

      The example in my previous comment was just to show you how to define the JSON path for the values you are trying to read. You were supposed to replace $.id with the fields you are trying to read in your source data - error "No results for path: $['id']" means in your source data, system could not find id under $. path.

      Now that I have the API/data you are trying to access, I see that your user data is an array. so for example if you need to read the first_name from element 0 of the data array which is something like

      {"data":[{"id":7,"email":"XXXXXX@example.com","first_name":"Michael","last_name":"XXXXXX","avatar":"https://XXXXX/7-image.jpg"}

      your translation map will be as below, where first_name is defined as output contract with type string

      {
      "translationMap": {
      "first_name":"$.data[0].first_name"
      },
      "translationMapDefaults": {},
      "successTemplate": "{\"first_name\": ${first_name}}"
      }

      it will return "Michael". Similarly you can retrieve other values as you need. 

      So above should resolve the errors. However, I see that you are taking id (number) as input and trying to retrieve the user details matching that id from the array. I do not think you can do so within the Data Action itself with this GET api. I suggest reading complete data array and extract the data based on the id using the architect flow. 

      To read the first_name array, change the output contract to

      {
      "type": "object",
      "properties": {
      "data": {
      "type": "array",
      "items": {
      "type": "object",
      "properties": {
      "first_name": {
      "type": "string"
      }
      },
      "additionalProperties": true
      }
      }
      },
      "additionalProperties": true
      }

      and leave the translation map to default config

      {
      "translationMap": {},
      "translationMapDefaults": {},
      "successTemplate": "${rawResult}"
      }

      similarly you can read other values like last_name, avatar, id etc. 

      Cheers

      ------------------------------
      Muhammad Zubair Awan
      Spark NZ Trading
      ------------------------------



    • 7.  RE: Data Action Translation Map

      Posted 11-24-2022 08:30
      Hi, 
      Thank you for the reply. I see your point. I changed my request url to this --> https://reqres.in/api/users/${input.id}
      Right now While response like below
      {
      "translationMap": {},
      "translationMapDefaults": {},
      "successTemplate": "${rawResult}"
      }
      It receives the correct information about the input id I get without output contracts. 
      The problem is now when I arranged output contracts like this;
      {
      "title": "data",
      "type": "object",
      "properties": {
      "first_name": {
      "type": "string"
      },
      "last_name": {
      "type": "string"
      }
      },
      "additionalProperties": true
      }


      It receives correct json but doesn't fill the output template. I tried to add arrays and first_name : $.first_name kind of solutions however it respond an error or remained the same. Do u have any suggestions?
      Thank you in advance.

      ------------------------------
      Hanife Nur Özçetin
      Customer Experience Yazilim Danismalik Ticaret LTD
      ------------------------------



    • 8.  RE: Data Action Translation Map

      Posted 11-24-2022 14:07
      Hi,

      Leaving the translation map as default, following output contract should work mapping the values

      {
      "title": "Output",
      "type": "object",
      "properties": {
      "data": {
      "type": "object",
      "properties": {
      "first_name": {
      "type": "string"
      },
      "last_name": {
      "type": "string"
      },
      "avatar": {
      "type": "string"
      }
      },
      "additionalProperties": true
      }
      },
      "additionalProperties": true
      }

      Cheers

      ------------------------------
      Muhammad Zubair Awan
      Spark NZ Trading
      ------------------------------



    • 9.  RE: Data Action Translation Map

      Posted 11-25-2022 04:14
      Thank you so much. It solved my problem.
      Regards

      ------------------------------
      Hanife Nur Özçetin
      Customer Experience Yazilim Danismalik Ticaret LTD
      ------------------------------



    • 10.  RE: Data Action Translation Map

      Posted 05-26-2023 13:54
      Edited by Anurag Gusain 05-26-2023 14:15

      Hi @Muhammad Zubair Awan  - I am also getting response in Array. can you please help me in identifying the output contract of the below response.

      {
        "status": "SUCCESS",
        "statusCode": 200,
        "message": "Identified Timezone",
        "data": [
          {
            "phone_number": "xxx",
            "timezone": "America/Los_Angeles",
            "state": "OR",
            "utc_offset": "-08:00",
            "utc_offset_in_minutes": -480,
            "dst": true,
            "next_dst_startdate": "2024-03-10T02:00:00Z",
            "next_dst_enddate": "2023-11-05T02:00:00Z",
            "lata": "xx",
            "rate_centre_lir": "xxx"
          }
        ]
      }



      ------------------------------
      Anurag Gusain
      Servion Global Solutions Inc.
      ------------------------------



    • 11.  RE: Data Action Translation Map

      Posted 05-26-2023 16:59

      Hi Anurag

      Is above the JSON output when you test run the data action? Can you share the API and Response configuration of your data action? Also what data/properties you are expecting to retrieve?




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



    • 12.  RE: Data Action Translation Map

      Posted 05-26-2023 18:17
      Edited by Anurag Gusain 05-26-2023 18:18

      Hi @Muhammad Zubair Awan - Please find the below Jason response. The Data action is running successfully but the values are not getting displayed into output parameters

      {
        "data.state": [
          "OR"
        ],
        "data.timezone": [
          "America/Los_Angeles"
        ],
        "data.utc_offset": [
          "-08:00"
        ],
        "data.lata": [
          "xx"
        ],
        "data.rate_centre_lir": [
          "xx"
        ],
        "message": "Identified Timezone",
        "data.dst": [
          true
        ],
        "data.next_dst_enddate": [
          "2023-11-05T02:00:00Z"
        ],
        "data.next_dst_startdate": [
          "2024-03-10T02:00:00Z"
        ],
        "data.utc_offset_in_minutes": [
          -480
        ],
        "data.phone_number": [
          "xxxx"
        ],
        "status": "SUCCESS",
        "statusCode": 200
      }



      ------------------------------
      Anurag Gusain
      ------------------------------



    • 13.  RE: Data Action Translation Map

      Posted 05-26-2023 19:52

      hi Anurag

      try with following output contract

      {
        "title": "Output",
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "statusCode": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "title": "dataOutput",
              "type": "object",
              "properties": {
                "phone_number": {
                  "type": "string"
                },
                "timezone": {
                  "type": "string"
                },
                "state": {
                  "type": "string"
                },
                "utc_offset": {
                  "type": "string"
                },
                "utc_offset_in_minutes": {
                  "type": "integer"
                },
                "dst": {
                  "type": "boolean"
                },
                "next_dst_startdate": {
                  "type": "string"
                },
                "next_dst_enddate": {
                  "type": "string"
                },
                "lata": {
                  "type": "string"
                },
                "rate_centre_lir": {
                  "type": "string"
                }
              },
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true
      }




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



    • 14.  RE: Data Action Translation Map

      Posted 05-26-2023 19:59

      Hi @Muhammad Zubair Awan - It worked but Giving Add option after every output response. See below



      ------------------------------
      Anurag Gusain
      Servion Global Solutions Inc.
      ------------------------------



    • 15.  RE: Data Action Translation Map

      Posted 05-26-2023 20:12
      Edited by Muhammad Zubair Awan 05-26-2023 20:18

      Nice.. you can ignore +Add option. your "data" is an array that is why you see it but I do not know the use case of this button - perhaps for testing purposes



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



    • 16.  RE: Data Action Translation Map

      Posted 06-13-2023 09:56

      Hi Muhammad Zubair Awan , could you help me as well with this issues , I have verymuch simular use case?

      I am getting correct JSON response but none of the output contracts gets filled.



      ------------------------------
      Jerry Sileon
      KPN B.V.
      ------------------------------



    • 17.  RE: Data Action Translation Map

      Posted 06-13-2023 09:59
      Edited by Jerry Sileon 06-14-2023 03:59



      ------------------------------
      Jerry Sileon
      KPN B.V.
      ------------------------------



    • 18.  RE: Data Action Translation Map

      Posted 06-13-2023 16:19
      Edited by Muhammad Zubair Awan 06-13-2023 16:19

      Hi @Jerry Sileon without looking at the API or the complete data structure, I believe that following Output Contract should work. If this does not work can you share the full JSON response (remove any sensitive data) or the API you are using (if its platform API or public API) or the source data structure (remove any sensitive data)

      {
        "title": "Output",
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "title": "resultsOutput",
              "type": "object",
              "properties": {
                "contact_email_address": {
                  "type": "string"
                }
              },
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true
      }



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



    • 19.  RE: Data Action Translation Map

      Posted 06-14-2023 03:54

      Hi Zubair , 

      that works perfectly , thanks!! here is the total output I starred (*) all private info. Could you help me out with the total so that I can try to understand how to wright future contracts? 

      {
        "results.contact_phone_number": [
          "+3162*",
          "+3161*"
        ],
        "results.address.zip_code": [
          "280*",
          "280*"
        ],
        "results.date_updated": [
          "2019-07-05T16:04:40Z",
          "2020-02-12T15:52:39Z"
        ],
        "results.address.city": [
          "G*",
          "G*"
        ],
        "results.limited_legal_acting": [
          false,
          false
        ],
        "results.keyring.customer_id": [
          [
            "710995*",
            "2018*"
          ],
          [
            "71123*",
            "0186274*",
            "20182*"
          ]
        ],
        "results.keyring.status": [
          [
            true,
            true
          ],
          [
            true,
            true,
            true
          ]
        ],
        "results.initials": [
          "D.J.M.",
          "J."
        ],
        "results.contact_email_address": [
          "jed*@gmail.com",
          "jed*@gmail.com"
        ],
        "results.business_type": [
          "NP",
          "NP"
        ],
        "results.source_system": [
          "MDM",
          "MDM"
        ],
        "results.gender": [
          "FEMALE",
          "MALE"
        ],
        "results.keyring.supply_chain": [
          [
            "KRN",
            "BOSS"
          ],
          [
            "KRN",
            "LEV-CC",
            "BOSS"
          ]
        ],
        "results.last_name": [
          "Verb*",
          "Sil*"
        ],
        "results.customer_status": [
          "CUSTOMER",
          "CUSTOMER"
        ],
        "results.date_of_birth": [
          "1980-05-26",
          "1976-04-03"
        ],
        "results.address.house_number": [
          "26",
          "26"
        ],
        "results.type": [
          "PERSON",
          "PERSON"
        ],
        "results.address.street_name": [
          "Croc*",
          "Croc*"
        ],
        "results.customer_id": [
          "710995*",
          "7112*"
        ],
        "results.kvk_sync_available": [
          false,
          false
        ],
        "results.address.country": [
          "NLD",
          "NLD"
        ],
        "results.undefined": [
          null
        ]
      }



      ------------------------------
      Jerry Sileon
      KPN B.V.
      ------------------------------



    • 20.  RE: Data Action Translation Map

      Posted 06-14-2023 17:40

      Hi Zubair,

      I am struggling to resolve this issue, i try to map it, but the contract keeps giving me an underscore instead of a . (dot)

      reason for dot is that is segmented ( i think) in 

      results.lastname (this succeeds)

      results.address.street_name (this one i cant get i right for some reason and it keeps giving an underscore instead . (dot))

      please give any advise of how to resolve this issue

      best regards

      jerry



      ------------------------------
      Jerry Sileon
      KPN B.V.
      ------------------------------



    • 21.  RE: Data Action Translation Map

      Posted 06-14-2023 20:02

      Hi Jerry

      Try this output contract

      {
        "title": "Output",
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "title": "resultsOutput",
              "type": "object",
              "properties": {
                "contact_email_address": {
                  "type": "string"
                },
                "address": {
                  "type": "object",
                  "properties": {
                    "zip_code": {
                      "type": "string"
                    },
                    "street_name": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              },
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true
      }


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



    • 22.  RE: Data Action Translation Map

      Posted 06-15-2023 13:52

      Hi Zubair, 

      great work men , I am trying to understand what it is that makes it when you give me the solution. starting to understand how JSON works with properties and objects, as soon as I hit array whitin arrays (nested I believe) it goes wrong. my last blocker is this thing

        "results.contact_phone_number": [
          "+3161*"
        ],
        "results.address.zip_code": [
          "28*"
        ],
        "results.date_updated": [
          "2020-02-12T15:52:39Z"
        ],
        "results.address.city": [
          "GOUDA"
        ],
        "results.limited_legal_acting": [
          false
        ],
        "results.keyring.customer_id": [
          [
            "71123*",
            "01862*",
            "201829*"
          ]
        ],
        "results.keyring.status": [
          [
            true,
            true,
            true
          ]
        ],
        "results.initials": [
          "J."
        ],
        "results.contact_email_address": [
          "je*r@gmail.com"
        ],
        "results.business_type": [
          "NP"
        ],
        "results.source_system": [
          "MDM"
        ],
        "results.gender": [
          "MALE"
        ],
        "results.keyring.supply_chain": [
          [
            "KRN",
            "LEV-CC",
            "BOSS"

      please help me out one more time :-) 

      Best regards

      Jerry



      ------------------------------
      Jerry Sileon
      KPN B.V.
      ------------------------------



    • 23.  RE: Data Action Translation Map

      Posted 06-15-2023 17:45

      Hi Berry

      Are you getting an error like Cannot flatten schemas with nested arrays? AFAIK flattening does not support nested arrays. Do you really need all the data returned or a chunk of it because the other method is to use translationMap in Response to get the data you need. Refer to the examples in this article



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



    • 24.  RE: Data Action Translation Map

      Posted 06-20-2023 09:52

      Hi Zubair,

      I really tried to manage this translation mapping but failed to succeed :( 

      please have a look at my creation:

      {
        "translationMap": {"keyringValue": "$.['keyring']"},
        "translationMapDefaults": {"keyringValue": ""},
        "successTemplate": "{\"keyring\": ${keyringValue}}"
      }

      output :

      based on this raw result from the API like above searching for keyring info :

       "results.contact_phone_number": [
          "+3161*"
        ],
        "results.address.zip_code": [
          "28*"
        ],
        "results.date_updated": [
          "2020-02-12T15:52:39Z"
        ],
        "results.address.city": [
          "GOUDA"
        ],
        "results.limited_legal_acting": [
          false
        ],
        "results.keyring.customer_id": [
          [
            "71123*",
            "01862*",
            "201829*"
          ]
        ],
        "results.keyring.status": [
          [
            true,
            true,
            true
          ]
        ],
        "results.initials": [
          "J."
        ],
        "results.contact_email_address": [
          "je*r@gmail.com"
        ],
        "results.business_type": [
          "NP"
        ],
        "results.source_system": [
          "MDM"
        ],
        "results.gender": [
          "MALE"
        ],
        "results.keyring.supply_chain": [
          [
            "KRN",
            "LEV-CC",
            "BOSS"

      cheers and many thanks in advance :-)

      best regards Jerry



      ------------------------------
      Jerry Sileon
      KPN B.V.
      ------------------------------



    • 25.  RE: Data Action Translation Map

      Posted 06-21-2023 02:03

      Hi Jerry

      Can you share export of your data action? Feel free to DM me if that's easier



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



    • 26.  RE: Data Action Translation Map

      Posted 06-21-2023 16:08
      Edited by Jerry Sileon 06-21-2023 16:09

      Hi Zubair , 

      for some reason I dont see where I can DM you , silly me!!

      here is the data action export:

      {
        "name": "AA_Test_ORI - Customer Master Search v1 (Copy) (Copy) - Exported 2023-06-21 @ 21:57",
        "integrationType": "custom-rest-actions",
        "actionType": "custom",
        "config": {
          "request": {
            "requestUrlTemplate": "https://api.accer/v1/search",
            "requestType": "POST",
            "headers": {
              "Authorization": "${authResponse.token_type} ${authResponse.access_token}",
              "X-SECRET": "057cae9af31f1c8d"
            },
            "requestTemplate": "${input.rawRequest}"
          },
          "response": {
            "translationMap": {
              "values": "$..results..keyring"
            },
            "translationMapDefaults": {
              "values": "[]"
            },
            "successTemplate": "{ \"keyringList\": ${values} }"
          }
        },
        "contract": {
          "input": {
            "inputSchema": {
              "title": "Customer Master Search",
              "type": "object",
              "properties": {
                "keyword": {
                  "type": "string"
                }
              },
              "additionalProperties": true
            }
          },
          "output": {
            "successSchema": {
              "title": "keyringList",
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          }
        },
        "secure": false
      }

      and here is the translationmapping

      {
        "translationMap": {
          "values": "$..results..keyring"
        },
        "translationMapDefaults": {
          "values": "[]"
        },
        "successTemplate": "{ \"keyringList\": ${values} }"
      }

      and here is the raw response

      {
        "keyringList": [
          [
            {
              "customer_id": "7112304016",
              "supply_chain": "KRN",
              "status": true
            },
            {
              "customer_id": "0186274793",
              "supply_chain": "LEV-CC",
              "status": true
            },
            {
              "customer_id": "20182962386",
              "supply_chain": "BOSS",
              "status": true
            }
          ]
        ]
      }

      now the problem is that I do have an data action that gives me the values that I want and I am able to set them in participant data in architect. But it's not flattened.....and therefore I can't do anything with it (I believe) because it's a string collection.

      please help me out , aldough I think I am nearly there....in the end I hope I can do it all in one data action and then It should look like this :
      { "results": [ { "date_updated": "2020-02-12T15:52:39Z", "customer_id": "7112304016", "contact_phone_number": "+31610", "contact_email_address": "jed@gmail.com", "source_system": "MDM", "business_type": "NP", "address": { "street_name": "Crod", "house_number": "26", "zip_code": "28R", "city": "GO", "country": "NLD" }, "keyring": [ { "customer_id": "7112016", "supply_chain": "KRN", "status": true }, { "customer_id": "0184793", "supply_chain": "LEV-CC", "status": true }, { "customer_id": "20162386", "supply_chain": "BOSS", "status": true } ], "contact_persons": [], "kvk_sync_available": false, "initials": "J.", "last_name": "Sileon", "date_of_birth": "197603", "gender": "MALE", "customer_status": "CUSTOMER", "type": "PERSON", "limited_legal_acting": false } ], "errors": [ { "code": "backend_error", "message": "BOSS" } ] }

      many thanks in advance Zubair your help is much appreciated :-)



      ------------------------------
      Jerry Sileon
      KPN B.V.
      ------------------------------



    • 27.  RE: Data Action Translation Map

      Posted 06-21-2023 17:38

      Hey Jerry

      Change your translation map to 

      "values": "$.results[*].keyring[*]"

      and Output Contract to

      {
        "title": "Output",
        "type": "object",
        "properties": {
          "keyringList": {
            "type": "array",
            "items": {
              "title": "Items",
              "type": "object",
              "properties": {
                "customer_id": {
                  "type": "string"
                },
                "supply_chain": {
                  "type": "string"
                },
                "status": {
                  "type": "boolean"
                }
              },
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true
      }

      and see if that helps



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



    • 28.  RE: Data Action Translation Map

      Posted 06-21-2023 17:45
      now the problem is that I do have an data action that gives me the values that I want and I am able to set them in participant data in architect. But it's not flattened.....and therefore I can't do anything with it (I believe) because it's a string collection

      If you are getting JSON data, you can store it in JSON variable in Architect. Then use GetJsonObjectProperty() function to extract the values



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



    • 29.  RE: Data Action Translation Map

      Posted 06-22-2023 11:13

      that helped Zubair , as you could read I was trying to get all the data into one data action.......that is difficult in terms of trying to solve it with translation mapping. What i did is cut it in half and call two data actions instead. So the data action is published and shows values as a string collections

      for some reason I can't read these collections and also not convert them a single string.

      first i Try to do this:

      and I try let an audio action speak the zipcode just to test if its correct

      what goes wrong here.



      ------------------------------
      Jerry Sileon
      KPN B.V.
      ------------------------------



    • 30.  RE: Data Action Translation Map

      Posted 06-22-2023 15:33

      When your data action output is an array, it gets mapped to collection of that data type. You will need indexing to extract individual elements. For example your first element will be Flow.customerMaster_zipcode[0]

      You will need a Loop action in Architect to do what you need to do. For example to read all the elements, try this

      Hope this helps



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



    • 31.  RE: Data Action Translation Map

      Posted 06-27-2023 09:48
      Edited by Jerry Sileon 06-27-2023 09:48

      Thank you so much Zubair,

      my learning curves got mind blowing boosted here 

      best regards

      Jerry



      ------------------------------
      Jerry Sileon
      KPN B.V.
      ------------------------------



    Need Help finding something?

    Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources