I was debugging why the data we had in one system did not match the data we had in DatoCMS for a particular record in our “Offer” model. I determined that our system had the correct information (expiration_datetime) and had the system update the record in Dato using the content management API with the correct data and then publish those changes. It did correctly update the record in the model, but two publish webhook events fired:
The first one had the old expiration_datetime field value of “2024-12-31T23:59:00-05:00”. Here is the meta data for that webhook:
The next publish webhook had the correct value for the expiration_datetime field of “2024-12-30T08:58:02-05:00”
Here is the meta data for that webhook request:
Why would we receive two of these requests? And why would one contain the wrong data? I’ve excluded the full webhook payload because it can be quite large. But, I can provide it if needed.
With webhook calls 137271943 and 137271949, it looks like there were actually some changes? Can you try running the two of them through a diff and see if those are intentional?
For example, the system_facets field was null in 137271943 and became an array of record links in 137271949. A few other fields (legacy_id, tracking, and content also changed).
Is this something your script might be doing? If it’s changing relationships, is it possible that it’s causing some cascading changes?
I don’t want to dive into your private schema here in public, but if you can’t figure it out based on a diff, could you please email us at support@datocms.com with some details about the use case here (like how your script interacts with this model and its related fields).