Webhooks

Webhooks in digital pipeline

Webhooks is the notification of third-party applications by sending notifications of events that occurred in amoCRM. You can configure the HTTP addresses of your applications and associated working rules in the digital pipeline settings, in amoCRM.

More information about the technology can be found in the WebHooks REST API section. However, despite the fact that the technology used for notifying Webhooks in the digital pipeline is the same as in the settings section of your account ("Settings -> Integration"), it has several differences.

  • The first difference, a more limited list of events for which the sending of notifications will respond.

  • The second difference, from the digital pipeline, unlike the account settings, webhook is sent only once, for the event that occurred. No retry attempts.

List of possible events:

  • With an outgoing letter

  • With incoming call

  • When you receive a chat message

  • When you visit the site

  • When going to step

To create a webhook

Go to the digital pipeline settings menu from the Deals section and choose to add an automatic action for all trades, under the stage you want.

Then select "API: send webhook".

Select the event where the webhook will be sent.

Enter the URL where the webhook will be sent.


Format of the data to be sent

Webhook sends a variable to a third-party POST application that contains an array of the form {"entity": {"action": {array of entity fields}}}.

Parameters
Parameter Description
leads Essence: "Lead"
customers Essence: “Customer”
Event Settings
Parameter Description
call_in Incoming call event
chat An event with an incoming message from the chat
site_visit Event when you visit the site
mail_in Event on incoming mail
status Event in transition to the stage, only for leads
period Event with a change of period, only the buyer
Field Parameters of the Entity
Parameter Description
id id of the entity element
old_pipeline_id id of the old digital pipeline, only for leads
pipeline_id id of the new digital pipeline, only for leads
old_status_id id of the old status, only for leads
status_id id of the new status, only for leads
old_period_id id of the old period, only the buyer
period_id id of the new period, only the buyer
Example

With the incoming letter, for the lead

  1. {
  2.     "leads": {
  3.         "mail_in": {[
  4.             "id": 4921027,          
  5.             "pipeline_id": 752662,  
  6.             "status_id": 16203334  
  7.         ]}
  8.     }
  9. }

When going to the stage, for the lead

  1. {
  2.     "leads": {
  3.         "status": {[
  4.             "id": 4831596,              
  5.             "old_pipeline_id": 752662,
  6.             "pipeline_id": 752662,    
  7.             "old_status_id": 16203334  
  8.             "status_id": 16203337      
  9.         ]}
  10.     }
  11. }

When the period changes, for the buyer

  1. {
  2.     "customers": {
  3.         "period": {[
  4.             "id": 4831596,              
  5.             "old_period_id": 16203334  
  6.             "period_id": 16203337      
  7.         ]}
  8.     }
  9. }