Hi,
Just wanted to let you know about an issue I had.
The Codeless “Send Email from Template” block does not appear in the Codeless doc. So I had a look at the REST doc, where it says for the template-values
parameter : a JSON object containing values which will be used Smart and Dynamic text substitutions.
Turns out my JSON object was not accepted because it was not “flat” (i.e. it had an object within the object).
The error I got was
ResponseError: Wrong json format: Cannot deserialize value of type `java.lang.String` from Object value (token `JsonToken.START_OBJECT`)
at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: com.backendless.services.mail.SendTemplateMailMessage["template-values"]->java.util.LinkedHashMap["localizations"])
at checkStatus (/usr/local/lib/node_modules/backendless-coderunner/node_modules/backendless-request/lib/request.js:330:9)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
When trying out with a flat object, it worked. I don’t know it this is intentional. But I now need to flatten my object before sending it into the template. Would be nice to have the information in the doc, and it would be easier to be able to call an item such as object1.object2.property
in the templates Smart text.