Legacy Dev Forum Posts

 View Only

Sign Up

Getting Null Values if I use Translation MAP

  • 1.  Getting Null Values if I use Translation MAP

    Posted 06-05-2025 18:45

    AshaIT | 2024-03-20 15:38:48 UTC | #1

    Hi All,

    I am getting null when I get response using below Input, Output contract and Translation map with Success template. But when I use raw result i am getting back data but not in fields template. Please let me know anything I need to change below:

    Input Contract

    { "title": "Request", "type": "object", "properties": { "AccountID": { "type": "string" } }, "additionalProperties": true }

    output Contract

    { "title": "Response", "type": "object", "properties": { "AccountBalance": { "type": "array", "items": { "title": "CurrentBalance", "type": "string" } }, "Invoice": { "type": "array", "items": { "title": "DueDate", "type": "string" } }, "Premise": { "type": "array", "items": { "title": "PremiseID", "type": "string" } } }, "additionalProperties": true }

    Response Configuration

    { "translationMap": { "AccountBalance": "[$.CurrentBalance]", "Invoices": "[$.DueDate]", "Premise": "[$.PremiseID]" }, "translationMapDefaults": { "AccountBalance":"[]", "Invoices":"[]", "Premise":"[]" }, "successTemplate": "{\n \"AccountBalance\" : ${AccountBalance}\n, \"Invoices\" : ${Invoices}\n, \"Premise\" : ${Premise}\n }" }

    Thanks for help !!


    Jason_Mathison | 2024-03-20 16:24:51 UTC | #2

    You would need to post an example of the response from the endpoint to be able to help you troubleshoot. Feel free to redact anything sensitive.

    --Jason


    AshaIT | 2024-03-20 17:06:37 UTC | #3

    When I click Jason In response I get the following response:

    "d.AccountBalance.CurrentBalance": "123.45",

    "d.Invoices.results.DueDate": [ "/Date(246000000)/", "/Date(76500000)/", "d.Contracts.results.Premise.PremiseID": [ "789101112", "131415161"


    Jason_Mathison | 2024-03-21 12:55:08 UTC | #4

    Can you give us the output from the "Execute" step? That is the actual response from the endpoint. Note that you can also see the results of your translation map JsonPath extractions.

    Once you have that output, you can test your translation map entries in a JSON path tester, like https://www.javainuse.com/jsonpath

    Chances are you can find your issues there and debug your jsonpath to get it right.

    --Jason


    system | 2024-04-21 12:53:12 UTC | #5

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