Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I struggle to get a Zuora API call right in the rRest client. The API wants a JSON body as input..
HTTP POST body:
"{
\"queryString\": \"select id, name, subscriptionid from Rateplan where id='abcdef123456' \"
}"
=> this works OK. But then getting the variable from database with tFlowIterate, it doesn't work:
1:
"{
\"queryString\": \"select id, name, subscriptionid from Rateplan where id=\" + ((String)globalMap.get("rateplan_id")) + \"
}"
=> invalid assignment
2:
"{
\"queryString\": \"select id, name, subscriptionid from Rateplan where id=\" + ((String)globalMap.get(\"rateplan_id\")) + \"
}"
=> malformed POST body content
3,4, 5 => other issues
What's the correct format of using global variable in the POST BODY?
Try this.....
"{ \"queryString\": \"select id, name, subscriptionid from Rateplan where id='" + ((String)globalMap.get("rateplan_id")) + "'\" }"
You are concatenating Strings. When you close the JSON String before concatenation, you do not need to escape the ". You also missed the single quotes (').
Try this.....
"{ \"queryString\": \"select id, name, subscriptionid from Rateplan where id='" + ((String)globalMap.get("rateplan_id")) + "'\" }"
You are concatenating Strings. When you close the JSON String before concatenation, you do not need to escape the ". You also missed the single quotes (').
thanks, seems to work. I tried also with single quotes, but this was probably the point of confusion I suppose:
"When you close the JSON String before concatenation, you do not need to escape the "."