Webhooks allow communication with third-party applications by sending instant web notifications every time an event occurs in your SuiteCRM. With the Webhooks Integration, you can configure HTTP URLs and associate them in workflow rules to automate the entire notification process.
#5075 - JSON body format issue - field params
The output of the post request currently looks like the following example:
{ "field_parameter": { "comp": "a basic comp", "email": "example@test.com", "Authorization": "Bearer <>" } }
When it arrives at our partner's API it is not processed as it is an incorrect format for them.
Is there any way to edit the output so that the field_parameter is omitted e.g.:
{ "comp": "a basic comp", "email": "example@test.com", "Authorization": "Bearer <>" }
Thanks
a year ago
Hello,
You can get output as per you mentioned above using following steps,
1) You can get all requested post data like $data = file_get_contents("php://input"); in your Webhook post URL file 2) After that you need to decode $data which you got in first Step like $jsonDecodeData = json_decode($data); 3) Then you can output same as you mentioned above like $outputData = $jsonDecodeData->field_parameter;
Also you can refer below link for use webhook integration json format : https://store.suitecrm.com/docs/webhook-integration/json-content-type
Regards,
Variance Infotech PVT LTD
a year ago
That is the solution we went with albeit using an intermediate server to intercept the request and transform it. Is there a post URL file in the plugin we could use instead?
a year ago
Hello,
No. Post URL file is not avaialble in our Plugin zip.
Regards,
Variance Infotech PVT LTD