i was wondering on basis of which fields i can determine that my webhook already received an event so that i can make my consumer idempotent.
It is not clear from the documentation (Accounts Dashboard | HubSpot). I thought eventId would be sufficient, but the documentations says it is not guaranteerd to be unique. But to what extent? Within a given timeframe, for a given objectId?
eventId: The ID of the event that triggered this notification. This value is not guaranteed to be unique.
Hi, @Jdb8 Thanks for your question. I’d like to invite some of our community members who have expertise in this area to the conversation — hey @james-portant@SNigam@zach_threadint how would you solve for this situation?
I assume you could do a bit of extra processing and create a unique identifier by combining multiple fields:
Hi, @Jdb8 Thanks for your follow-up. I understand you’re looking for a definitive answer about webhook event idempotency, and I appreciate that this is blocking your progress.
To clarify, the HubSpot Community is a peer-to-peer support forum where community members help each other based on their experiences. The fact that no other members have responded further likely indicates this is a specialized area where many don’t have direct experience to share.
The HubSpot documentation clearly mentions that eventId is not guaranteed to be unique. This lack of specification concerning any timeframe or conditions typically means developers should prepare for the possibility of duplicate eventIds
The workaround I suggested (combiningeventId withobjectId,subscriptionType, andtimestamp to create a composite unique identifier) remains the most reliable approach I’m aware of. Many developers use similar patterns when working with webhook systems that don’t guarantee unique event identifiers.
If you need an official clarification beyond what’s in the public documentation, I’d recommend:
Testing the behavior in your dev environment
Implementing the composite key approach as a safety measure
If available to you, submitting a ticket through your HubSpot support channel
I hope this helps you move forward with your implementation, and if you discover a solution, please consider sharing it back with the community to help others facing similar challenges.