Receiving Error - Flatten: Too many results matched criteria

Hi, I'm still pretty new to creating custom Data Actions. I am trying to connect to our warehouse tracking API via a data action, but am receiving the error: Flatten: Too many results matched criteria..

{
  "message": "Too many results matched criteria.",
  "code": "too.many.results",
  "status": 400,
  "messageParams": {},
  "contextId": "7ac28481-acea-43a8-8fcb-079c0c89bd18",
  "details": [
    {
      "errorCode": "ACTION.PROCESSING"
    }
  ],
  "errors": []
}

If I uncheck the flatten results box, it returns the correct response.

I saw in some other posts that using a translation map to update the success template might be the way to fix this, but I haven't been able to get it to work : Response configuration for data actions - Genesys Cloud Resource Center

Would someone be able to point me in the right direction? Also if you need any additional information, please let me know.


This thread might get you going in the right direction:

The goal was to make data actions easy to use, and one of those simplifying assumptions was to consider anything other than 1 result as a failure. Getting flattened list of results back can be difficult or even impossible to correctly handle in architect, so we don't support that by default. There are a variety of ways it can be handled, for example the whole JSON response can be escaped an passed back to architect like is discussed here:

--Jason

Hi Jason, long time no talk :smile: good to hear from you.

So based on based on the articles you sent and some good ole trial and error, I revised the output contract and added the translationMap and successTemplate and it appears to be working now.

Thanks for your help!


Hey Craig,

Great to see you on Genesys Cloud! Glad I got you close enough that you could get this wrapped up. Please let me know if there was any documentation or UI improvements that would have made this easier to figure out.

--Jason

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