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.
XMLContent Type
HTTP POST/PUT Request Data passed to Webhook URL Using XML Content Type.
HTTP POST Request Data:-
<root>
<auth_parameter>
<username>admin</username>
<password>admin</password>
</auth_parameter>
<field_parameter>
<first_name>John</first_name>
<last_name>Smith</last_name>
</field_parameter>
</root>
HTTP PUT Request Data:-
<root>
<auth_parameter>
<username>admin</username>
<password>admin</password>
</auth_parameter>
<field_parameter>
<first_name>John</first_name>
<last_name>William</last_name>
<responseId>123</responseId>
</field_parameter>
</root>
For Testing Authentication & Add/Update Data on third-party application,
if(isset($_REQUEST['authentication']) && $_REQUEST['authentication'] == '1'){
//code to be executed if condition is true;
//return json encoded array
//For example,
if(success) {
echo json_encode(array("msg"=>"Authentication Successfully");
}else{
echo json_encode(array("msg"=>"Authentication Failed"));
}
}else{ For getting HTTP POST/PUT Request Data in Webhook URL , Use file_get_contents function in your Webhook URL file $data = file_get_contents("php://input"); $fieldData = simplexml_load_string($data); //converts a well-formed XML string into an object.
//code to be executed for add/update data on third-party application
//return json encoded array
//For example,
if(success){
echo json_encode(array("code"=>"1","msg"=>"Record Added Successfully",'responseRecordId'=>’123’));
}else{
echo json_encode(array("code"=>"0","msg"=>"Record Not Added Successfully"));
}
}
Saving Comment...
Other add-ons of interest
Integrations
webhook url
webhook api
webhook call
webhook callback
webhook connector
connect other apps
apps connector
slack webhook
shopify webhooks
google connector
quickbooks post
bitbucket webhook
stripe webhook
zapier webhook
microsoft teams webhook
sendgrid webhook
facebook webhook
facebook api
maichimp webhook
woocommerce webhooks
line webhook
webhook online
trello webhook