Post request details

Webhooks are sent to the target URL using a POST request and contain details of the action record and related subject. Where relevant, the source attribute is also included.

For example, the webhook opportunity_destroy_item would fire in response to the action created when an opportunity item is destroyed. This action would have:

  • subject - opportunity

  • source - opportunity item

  • action type - destroy

It would trigger the following webhook POST request JSON body:

{
"action": {
"id":1364,
"subject_id":100,
"subject_type":"Opportunity",
"source_id":689,
"source_type":"OpportunityItem",
"member_id":1,
"Action_type":"destroy_item",
"name":"April Order (test)",
"description":"Testing",
"member": { … },
"source": { … },
"subject": { … },
"created_at":"2019-04-17T14:38:36.881Z",
"updated_at":"2019-04-17T14:38:36.881Z"
}
}

The source and subject attributes will contain a JSON object representing the data in the respective record. For example, if the subject related to an Activity record, this attribute would contain an Activity record with the same attributes found when retrieving that type of record via an API call - please note that whilst all main object attribute values will be returned, this does not always automatically extend to associations. Webhook payloads are designed to be light touch and as such if you require association attribute values you may need to perform a GET API operation for the desired record.

For guidance on what will be contained in request body, you can query Action records via the API to see example values from your data - visit our API Documentation for more.

The page for each specific subject lists the possible sources that might be included in the POST request body and you can find the full index of pages on the link below:

Request retry and logging

When the hook is triggered, a POST request will be sent to the specified URL. If the POST request fails it will begin a cascading re-try at the following intervals: 60s, 15m, 1h, 4h and 8h. This means that a webhook will be attempted a total of 6 times over a 13 hour and 16 mins time period. Should the final attempt fail no further attempts will be made.

The Webhook Log can be queried to ascertain the success or failure of a POST request, where a request has been retried multiple log entries will be seen. Each log entry contains the first 255 characters of any response received from the destination server along with the HTTP response code. If the server fails to respond due to network timeout or other non-HTTP reasons, the response code will be set to ‘999’ and the response will contain a description of the error.

The Webhook Log will contain a maximum 7 day history and will be automatically truncated.

Suspending webhooks

If you would like to temporarily suspend a webhook, update the webhook record and set its Active attribute to FALSE. To reenable the webhook, update it and set the Active attribute to TRUE. This will not affect any queued webhook POST requests, but will prevent further requests being enqueued.

For further details see: API Documentation - Webhooks

Did this answer your question?