Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Data Actions Configuration Response translation map error

    Posted 05-30-2025 16:09

    Hello!

    I am quite new to data actions, and I have never worked with a custom configuration response before. I am running the /api/v2/externalcontacts/contacts API to create a contact person in a bot flow, and I need to get the new external contact's id to use for another data action. This is what my Response section currently looks like:

    Whenever i try to run it, I get the following error:

    I have tried several things to get this to work, and I just can't get it to work. Does anyone have an idea as to what I am doing wrong?


    #API/Integrations

    ------------------------------
    Brandon Doss
    Workforce Management Analyst
    Abeka
    ------------------------------


  • 2.  RE: Data Actions Configuration Response translation map error

    Posted 06-02-2025 11:48

    Hi Brandon,

    I am going to move this to the Genesys Cloud Developer Community to see if they can help with this one



    ------------------------------
    Sam Jillard
    Online Community Manager/Moderator
    Genesys - Employees
    ------------------------------



  • 3.  RE: Data Actions Configuration Response translation map error

    Posted 06-03-2025 22:13
    Edited by Luke Swain 06-03-2025 22:15

    Hi Brandon,

    Looks like there is an issue with the formatting there. Try this instead.

    {
      "translationMap": {
        "type": "${ExternalContactID}"
      },
      "translationMapDefaults": {
        "type": "null"
      },
      "successTemplate": "${rawResult}"
    }

    In the above example, type would need to be a value in the Input section, of type string. If it is another type, you would need to modify the above to suit, all I have done here is add default value. Just make sure you check type is defined in the input contracts section.
    Hope this helps!

    ------------------------------
    Luke Swain

    CX Orchestration Support Analyst



  • 4.  RE: Data Actions Configuration Response translation map error

    Posted 06-04-2025 11:30

    Hello Luke,

    So I've updated the format and made sure that the value is in the input section. This is what my input and output sections look like now:

    Request Body Template:

    {
      "firstName": "${input.FullName}",
      "address": {
        "address1": "${input.Address}"
      },
      "personalEmail": "${input.EmailAddress}",
      "externalOrganization": {
        "id": "8b4976dc-43f8-4a4d-919e-45f1783e8d51"
      },
      "id": " "
    }

    Response:

    {
      "translationMap": {
        "id": "${ExternalContactID}"
      },
      "translationMapDefaults": {},
      "successTemplate": "${rawResult}"
    }
    Whenever I test it, it is still giving me the same error. I put the translationMapDefaults back in and set it to null, but it just returns the output for ExternalContactID as blank even though the output JSON has the id in it as seen below:
    {
      "firstName": "Darth Vader",
      "externalOrganization.selfUri": "/api/v2/externalcontacts/organizations/8b4976dc-43f8-4a4d-919e-45f1783e8d51",
      "modifyDate": "2025-06-04T15:27:00Z",
      "selfUri": "/api/v2/externalcontacts/contacts/de3e11c5-fd35-49d9-bcbc-6e126fe06291",
      "division.id": "*",
      "address.address1": "333 Deathstar Drive",
      "externalOrganization.id": "8b4976dc-43f8-4a4d-919e-45f1783e8d51",
      "id": "de3e11c5-fd35-49d9-bcbc-6e126fe06291",
      "type": "Curated",
      "personalEmail": "email@emial.com",
      "createDate": "2025-06-04T15:27:00Z"
    }


    ------------------------------
    Brandon Doss
    Workforce Management Analyst
    Abeka
    ------------------------------



  • 5.  RE: Data Actions Configuration Response translation map error

    Posted 06-05-2025 02:25
    Edited by Luke Swain 06-05-2025 02:25

    Ok so we are getting somewhere, with that setup - it is expected that it will just return the raw response, that is what that ${rawResult}section does :).

    You just need to tell Genesys what to put where, and it would depend on what you are trying to output. Let's say you want the first name.

    {
      "translationMap": {
        "type""${ExternalContactID}"
      },
      "translationMapDefaults": {
        "type""null"
      },
      "successTemplate":"{\"firstName\":${firstName},\"modifyDate\":${modifyDate}}"
    }
    The above should work in theory, but it is untested, the above example would need an output contract of type string called firstName and another string called modifyDate.
    Hope that helps.



    ------------------------------
    Luke Swain
    ------------------------------