Developer Announcements

dennisedson
HubSpot Product Team
HubSpot Product Team

Live: New subscription types for Webhooks

We're adding new Webhook subscription types for merge, restore & association change events for CRM Objects.

  • Merge: when one object is merged into the other in the CRM
  • Restore: When an object is restored (opposite of delete)
  • Association Change: When an object has an association added or removed between itself and one of the other supported webhooks objects (contact, company, deal, ticket, line_item, product)

For a list of all subscription types, please visit the Developer Documentation on Webhooks.

 

Reason

Expanding the subscription types for webhooks has been a popular request from the Developer Community.  With this more comprehensive list of subscription types, integrators will be able to better leverage the automation of webhooks to increase the efficiency of their external applications

 

Functionality

Below are the payload properties added as support for merge and association change.  No new payload properties were added for restore:

For Merge payload properties:

  • primaryObjectId: The object id of the resulting primary contact.. This object is given higher priority during the merge. It is the object on the right in the merge ui.
  • mergedObjectIds: An array of Ids that represent the secondary contacts. These objects are given lesser priority during the merge. It is the object on the left in the merge ui. This field is an array because in some cases multiple objects can be merged into one primaryObject.
  • newObjectId: the Id of the object that was created from the result of the merge. This is separate from primaryObjectId because in some cases a new object is created from the result of a merge.
  • numberOfPropertiesMoved: An integer representation of how many properties were transferred during the merge.

For Association Change payload properties:

  • associationType: The type of association. There are only certain types of associations that are possible, such as CONTACT_TO_COMPANY.  The full list can be found is available in the association change payload section in the documentation linked to above
  • fromObjectId: The Id of the object that the association begins with.
  • toObjectId: the Id of the object that the association ends with
  • associationRemoved: A boolean that will be true if the event that triggered the webhook was an association removal and false if it was an association creation.

 

1 Reply 1
LeeBartelme
HubSpot Employee
HubSpot Employee

Live: New subscription types for Webhooks

  • newObjectId: the Id of the object that was created from the result of the merge. This is separate from primaryObjectId because in some cases a new object is created from the result of a merge.

Can you clarify when a merge might result in a new object id. This is news to me.

0 Upvotes