Hari_Kaviti | 2024-07-23 13:44:59 UTC | #1
Hi, API retuns two claim IDs as below ,how to capture return both.
{ "claimID": "202409315407", "supplierID": "1447337548", "serviceStartDate": "2024-03-01", "serviceEndDate": "2024-03-01",
}, { "claimID": "202412400731", "supplierID": "1447337548", "serviceStartDate": "2024-03-01", "serviceEndDate": "2024-03-01", } ]
My output contact is below
How to differentiate same name variables having different values and capture both variables values.
Hari_Kaviti | 2024-07-24 13:17:28 UTC | #2
Below is my configration
{ "translationMap": { "claimID": "$[0].claimID", "claimID2": "$[1].claimID", "amountBilled": "$[0].amountBilled" }, "translationMapDefaults": { "claimID": "\"UNKNOWN\"", "claimID2": "\"UNKNOWN\"", "amountBilled": "\"UNKNOWN\"" }, "successTemplate": "{\n \"claimID\":${claimID}\n, \n \"amountBilled\":${amountBilled}\n, \n \"claimID\":${claimID2}\n }" }
but in output claimID2 is empty. Any ideas please
zubair | 2024-07-25 20:33:29 UTC | #3
Hi, Your output contract only has claimID and you are mapping two values to claimID in your successTemplate.
You will need to add another output contract claimID2 and then in your successTemplate change "claimID":${claimID2} to "claimID2":${claimID2}
Alternatively, you can change the output contract claimID from String to Array and in your Translation map change "claimID": "$[0].claimID" to "claimID": $[*].claimID and get rid of claimID2
system | 2024-08-24 20:34:23 UTC | #4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 27364