We are sending emails from Service Cloud by making a callout to Transactional API of Marketing Cloud. We are then writing the events response back to Service Cloud Logs(of emails/SMS sent) and update the status of Logs to sent/opened/bounced etc after the response from SFMC Event notification service(ENS).
We have a callback Salesforce sites which listens for the response and the business logic to then create a platform event. There is a trigger on this platform event which updates the status of Logs(as received from ENS). We are implementing the logic of retries(3 times) and resume checkpoint.
The issue we are facing is more often than not, the response from ENS is faster than logs being inserted into salesforce and even after retries the status is not updated for some of the logs, because the response sent by ENS is not able to find the logs to associate itself.
How could we avert this and make sure that all the responses from ENS is updated to correct Logs in CRM.