Webhooks(Real-time updates)
Webhooks allow you to get programmatic notifications from Pipeliner about changes to your data as they happen in real-time.
Rather than quiring you to pull information via the API, webhooks will push information to your endpoint when the event happens.
Example: When the webhook is registered on Account Creation, then when the Account is created Pipeliner sends to your specified URL the JSON with the body of the newly created Account.
Registering Webhooks
Registering webhook means, that you are going to set a listener on an event if something happens. Take a look at the table below which events are supported
Account
Account.*
Account.Create Account.Update Account.Delete Account.DocumentLinked Account.OwnerChanged
Contact
Contact.*
Contact.Create Contact.Update Contact.Delete Contact.DocumentLinked Contact.OwnerChanged
Opportunity
Opportunity.* Opportunity.Create Opportunity.Update Opportunity.Delete Opportunity.DocumentLinked Opportunity.OwnerChanged Opportunity.Move (when the sales step is changed) Opportunity.Lost (when the Opportunity is Archived/LOst) Opportunity.Won (when the opportunity was won) Opportunity.Qualify (when the opportunity was created from Lead - Qualified)
Lead
Lead.* Lead.Create Lead.Update Lead.Delete Lead.DocumentLinked Lead.OwnerChanged
Lead.Lost (when the lead was Archived/Lost) Lead.BackToLead (when the opportunity was reverted to Lead)
Task
Task.* Task.Create Task.Update Task.Delete Task.DocumentLinked Task.OwnerChanged Task.Comment
Email.* Email.Create Email.Update Email.Delete Email.DocumentLinked
Appointment
Appointment.* Appointment.Create Appointment.Update Appointment.Delete Appointment.DocumentLinked Appointment.OwnerChanged Appointment.Comment
Product
Product.*
Product.Create
Product.Update
Product.Delete
Product Line Items (OpptyProductRelation)
OpptyProductRelation.* OpptyProductRelation.Create OpptyProductRelation.Update OpptyProductRelation.Delete
Custom Entity (Records)
CustomEntity.*
CustomEntity.Create
CustomEntity.Update
CustomEntity.Delete
CustomEntity.DocumentLinked
CustomEntity.OwnerChanged
Register the Webhook
Register a webhook by calling this Endpoint
Required Fields
insecure_ssl
false (Recommended) If True, remote side ssl certificate will not be validated when delivering notifications.
events
See table above to see what events you can use
url
The Server URL where the Webhook body should be sent
options
Options are described below
Webhook options
On Field change
on-field-change
Use when you want to trigger a webhook only on specific fields changes (eg. Opportunity value was changed)
Skipping webhooks
skip_keys
You can specify list of strings under "skip_keys" key in options. Whenever you make an API request with header "Webhook-Skip-Key" equal to any of the specified skip keys, the Webhook will not be triggered. This can prevent a Webhook loop. Example: Insert into every header of your Post Request the information "my integration", so Pipeliner is not sending the webhooks back whenever the record is created/updated and the record was created by request with header "my integration"
Expanding data of Linked entities
related_entity
When you want to get data about related Entity. Example: You have webhook on Opportunity. When you receive data on the Opportunity, you would like to know information about all Product Line items on the Opportunity
Api paremeters
expand, load_only, filter, filter-op
Webhook for Custom entity
custom_entity_api_name
Use when you want to trigger Webhook on Custom entities. You have to add API names of required custom entities.
Webhook throttling
chunk_size
Default:100
Defines how much data should come in one request
Webhook throttling delay
chunk_delay
Default:0
each chunk will be delayed by N * chunk_delay seconds, where N is index of chunk
Example of Option parameters
Webhooks examples
For testing our examples we are going to create a request bin when we will sent our webhooks. We are going to use this service https://requestbin.com/.
Trigger webhook when Account is created
Once the webhook was registered go to the Application and create a new account. Then check the body of created Account in requestbin application.
Trigger webhook on field change
When the Opportunity fields Opportunity value
or closing_date
are updated on the Opportunity send notification
Trigger webhook on filtered data
Listen to notifications only when the Opportunity is Opened (not won or lost). When attribute filter-op
is not defined Pipeliner automatically uses "eq" value to filter the results
Webhooks for Custom Entity records
To use webhooks for custom entity, the attribute custom_entity_api_name
should contain API names of required custom entities.
Last updated