Data Action to retrieve fromName in route api call

Hey everyone!
I'm new here, so thanks in advance for your patience with me.

I'm trying to write a data action that gets the From Name for an inbound email based on the route triggered in the architect flow.

I'm using the api /api/v2/routing/email/domains/{domainName}/routes
but I'm not sure how to narrow the results to just the route triggering the flow.

Any pointers would be great!

Hi Peter_Douglas

If you provide an example of the response from that endpoint, can you identify what you want, but you don't know how to create the Json path for it?
In that case, please provide an example of the output and what you are trying to extract from it. https://www.javainuse.com/jsonpath is the tool I normally use to work through the jsonpath I need in my translation map.

If the issue is that the endpoint return a lot of details and you don't know which route is the right one, then this room may not be able to help you. There is a general platform room that might be able to help you, or you might need to contact support in order to figure out how to accomplish your goal.

--Jason

Thanks Jason!

Here's an example api response for the domain "testdomain.com":

{
  "entities": [
    {
      "id": "533311c5-4ebc-4fa8-ba1f-3d068b5637a8",
      "pattern": "testemail",
      "priority": 0,
      "skills": [],
      "fromName": "Support Team",
      "historyInclusion": "Include",
      "allowMultipleActions": true,
      "selfUri": "/api/v2/routing/email/domains/navan.com/routes/533311c5-4ebc-4fa8-ba1f-3d068b5637a8"
    },
    {
      "id": "0ff78e27-23d8-4aa5-93b4-2dbd20de405e",
      "pattern": "othertestemail",
      "priority": 0,
      "skills": [],
      "fromName": "Escalation Team",
      "historyInclusion": "Include",
      "allowMultipleActions": true,
      "selfUri": "/api/v2/routing/email/domains/navan.com/routes/0ff78e27-23d8-4aa5-93b4-2dbd20de405e"
    },
   ]
}

If the route in the inbound email flow is othertestemail@testdomain.com, what's the quickest way to get the fromName value?

I have never used this API, so I am just guessing based on the documentation... Can you pass othertestemail@testdomain.com in as the "pattern" query parameter to narrow down the results to only the correct entry?

Assuming that works to filter the results, then something like
entities[0].fromName
in your translationMap should get what you are looking for.

--Jason

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