Multiple webhook events are being received with different event-id

Hi

While creating an item or updating an item by creating a new variation in Square Dashboard item details page, multiple webhook events (catalog.version.updated) are being triggered with the different event-id.

{
  "merchant_id": "ML1JH8P4XX72D",
  "type": "catalog.version.updated",
  "event_id": "e3cf084f-301d-3d07-bc24-f6f6cab5c800",
  "created_at": "2024-03-16T14:49:03.005779809Z",
  "data": {
    "type": "catalog_version",
    "id": "",
    "object": {
      "catalog_version": {
        "updated_at": "2024-03-16T14:49:00.631Z"
      }
    }
  }
}
{
  "merchant_id": "ML1JH8P4XX72D",
  "type": "catalog.version.updated",
  "event_id": "fc74ad90-598e-3725-aee8-931eef2362b7",
  "created_at": "2024-03-16T14:49:04.564658887Z",
  "data": {
    "type": "catalog_version",
    "id": "",
    "object": {
      "catalog_version": {
        "updated_at": "2024-03-16T14:49:02.311Z"
      }
    }
  }
}

Also i couldn’t see any difference between the versions.

Is it a normal behaviour or any issue??.

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Payments API Webhooks
Webhook Event Logs
Monitor Sold-out Item Variations or Modifiers

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

Yes, this is normal behavior. The Catalog API sends a catalog.version.updated webhook event whenever any change is made to the catalog, including creating or updating an item. Each change triggers a separate event with a unique event ID, even if the changes are made in quick succession. The updated_at timestamp in the event data indicates when each change was made. If you’re seeing multiple events with very close updated_at timestamps, it’s likely because multiple changes were made to the catalog in a short period of time.

This answer was reviewed by @Bryan-Square.

I completely agree that the events will be triggered whenever any change is made to the catalog. But the problem we are facing is multiple events are getting triggered for a single change.

Please check and let me know if you need any further details