How to track delivery between systems (CRM → ESP → inbox)?

Still have a question, spotted an error, or have a better explanation or a source we should cite?

You hit send from your CRM, the ESP picks it up, and the email lands (or doesn't) in someone's inbox. Three separate systems, three potential failure points, and most teams have no idea where things broke when something goes wrong.

The fix is a correlation ID: a unique identifier you create in the CRM when you trigger the send, then pass through every system downstream. Think of it as a tracking number for the email's entire trip. Here's how to set that up.

Step 1: Create the ID at the source (CRM)

When your CRM fires a trigger (a form submission, a deal stage change, whatever), generate a unique ID right there. Something like evt_20240611_crm_8a3f2 works fine. Log it in your CRM against the contact record and the automation that fired it. This is your anchor point for everything that follows.

Step 2: Pass the ID to the ESP

When your CRM calls the ESP's API to send the email, include that ID in the request. Most ESPs let you pass custom fields or metadata alongside the send request. Postmark supports a Metadata field for exactly this. Twilio SendGrid has a custom_args object. Mailgun uses h:X-Mailgun-Variables. Whatever your ESP calls it, that's where the correlation ID lives.

Step 3: Set up webhook callbacks from the ESP

Now configure your ESP to send webhook events back to your CRM (or a central log) when things happen: delivered, bounced, opened, clicked, complained. The webhook payload should include your correlation ID. When your CRM receives the callback, it updates the contact record with the outcome. Now you've got a closed loop.

Step 4: Log everything in one place

If you have multiple CRM automations firing across different segments, a central log (a simple database table, a Datadog stream, even a Google Sheet for small operations) becomes very useful. You're looking for four things per send: time from CRM trigger to ESP receipt, time from ESP receipt to delivery attempt, delivery or failure outcome, and engagement events afterward. Any gap in that timeline tells you exactly where to look.

What to watch for

The most common failure point isn't the send itself. It's the handoff between systems, where a failed API call silently drops the event and nothing in either system flags it. That's why logging at the CRM side (before the API call) and the ESP side (after receipt) is worth doing separately. If the CRM log shows a trigger but the ESP has no record of it, the API call failed. If the ESP shows a send but no delivery, check for a bounce or a filtering issue downstream.

Tools like Mailtrap are also handy for testing this in a staging environment before you wire it up in production. You can watch the full chain fire without touching real inboxes.

If you're not sure where to start debugging a live delivery gap, our email header analyzer can help you read what actually happened at the inbox end of the chain. Or if you're genuinely stuck, the SOS hotline is free and we'll walk through it with you.

Contributors

Who worked on this answer

Every name links to their profile. Every company links to their site. Real people, real accountability.

Ask an AI · tailored to your setup

Build your cross-system tracking plan

We use CRM connected to ESP and I'm trying to trace delivery failures back to their source. Based on my setup, help me: 1) What should my correlation ID format look like and where exactly do I log it? 2) What field name does ESP use for passing custom metadata in the API request? 3) Which webhook events should I subscribe to in order to get full delivery visibility? 4) What does a complete end-to-end log entry look like for a single triggered send?

Edit the yellow boxes, then send to the AI of your choice.