by Variance InfoTech Pvt Ltd

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.

Free 30 day trial
Try it Now

#5075 - JSON body format issue - field params

Closed Bug? created by Verified Purchase a year ago

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

  1. varianceinfotech member avatar

    Variance InfoTech Pvt Ltd Provider

    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

  2. Languagenut member avatar

    Verified Purchase

    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?

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...