rating.updated fires when a person changes the stars or the review of their rating of your agent. Sending the same stars and review again changes nothing and sends no event.
Read the payload
Thedata object is the RatingEvent schema, the same as rating.created. It carries the rating as it is now stored. The envelope around it is the same on every event and is described in the event catalog.
Handle the event
Replace the rating you stored forcontact.id. Use updated_at to ignore an older event that arrives after a newer one.

