rating.deleted fires when a person takes their rating of your agent back. A later rating by the same person arrives as rating.created again.
Read the payload
Thedata object is the RatingDeletedEvent schema from the API contract. The envelope around it is the same on every event and is described in the event catalog.
Handle the event
Remove the rating you stored forcontact.id.

