SendGrid stats API deferred definition

Viewed 17

In the SendGrid stats API documentation, it states the response property stats.metrics.deferred refers to "The number of emails that temporarily could not be delivered". I'm looking for a more precise definition, as I expect this is based on an interpretation or two.

For example, when I export the activity for a given time period, I can see activity where event=deferred in the export while the stats.metrics.deferred does not have a value for the same time period.

One thing I noticed is that it appears "unable to get mx info" causes 4 deferrals before soft bouncing the message. I can understand why these deferrals would likely not want to be counted due to the reasoning behind them and that they ultimately were soft bounced.

The second thing I noticed is that we do have a few instances where it appears minor throttling occurred, as I see a deferral for "450 4.5.9 Greylisted, please try again later" that ultimately was delivered after being deferred a 2nd time; causing a ~90 seconds delay.

The second item mentioned not being counted in the deferred stats is making me think that "temporarily could not be delivered" has a more technical answer; hoping someone has already looked into this.

1 Answers

I am not 100% sure on this, so if you want to properly check why deferrals were not appearing in your stats, I would get in touch with SendGrid support.

My interpretation of why this happened is that the stats should ultimately add up to be 100% of the emails you sent. In your explanation, you had several emails that were deferred and ultimately bounced or were delivered. Since those emails had reached a different termination state, they were described as that state in the stats. I would guess that if you ran your stats request before those emails entered their final state and were still being retried, they would show as deferrals in the report.

If you want to track emails as they go through the states, I recommend looking into the Event Webhook, which will be fired as emails enter different states.

Related