Is there a way of controlling the web hook return?

Investigating whether I can use a web hook to process an ‘unsubscribe’ message when the original email was generated in FileMaker

I can get the return to the calling thing to be as little as;
{“success”:true,“scriptError”:0,“scriptResult”:“Thank you”,“messageRecordId”:“546”,“successMessage”:“Message Accepted”}

but would really like to be able to just return the data in the scriptResult. Otto is adding some things to the returned result, so just wondering if there is a way to modify this, by passing a flag for instance.

Hey John,

If you return a JSON object with a key of “body”, we will send only that body key. Otherwise we send the full scriptResult. Are you sending a body key right now?

-Kyle

Tx

let me try that…

and no.
this:

JSONSetElement ( "" ; "body" ; "Thank you" ; JSONString )

results in this:

{"success":true,"scriptError":0,"scriptResult":{"body":"Thank you"},"messageRecordId":"547","successMessage":"Message Accepted"}

@kyle
is this not working as you imagine or am I asking for a new thing?

Hey John,

I think I see it. We’re not quite setting those values right in OttoFMS. I’ll get a fix into our next version that should let you do it as I’ve described. Thanks for the report John!

-Kyle
(totally wrote this yesterday and forgot to click send)