All project notes

Engineering

Webhook event contracts

Treat the meaning of an outbound event as part of the interface customers depend on.

When a lead is deleted, the outgoing CandySync webhook needs an event timestamp so the subscriber can place the change in time.
Illustrative diagram

When a webhook tells another system that a lead changed, the recipient needs enough information to interpret what happened. An event timestamp gives the recipient a time to associate with the change, including when the underlying record is deleted.

The CandySync timestamp fix is one concrete example. The repository note records that Reza changed how outgoing records were assembled to address missing timestamps on delete events. The fix shows why it is worth checking the contract for each event type, including the ones with different data available.

Source: the linked CandySync repository note.