A fire-and-forget send_log write records channel, org, recipient, subject, status (sent/failed/skipped), provider key, provider id and error. Billing quantity is recorded as SMS segments rather than message count. The provider id is the join key that later delivery events (Mailgun opens, clicks, bounces) attach to.
Also called: send log · delivery attribution · who sent it · message audit
- 1The port facade calls logSend after the chain resolves.
- 2The row carries provider and provider_id so an event webhook can find the tenant that owns the message.
- 3units is the billable quantity — SMS segments, from lib/smsSegments.
- 4Logging never blocks or fails a send.
The comment on the billing field states the specific loss: 'units is the billable quantity — SMS segments, not messages. Counting rows under-bills every text over 160 characters (or 70, if it contains a single emoji), and the platform silently absorbs the difference.' The attribution half exists because with a fallback chain, 'which provider sent it' stops being knowable from configuration alone.
- With fallbacks in play, configuration no longer tells you who delivered a message.
- Counting messages instead of segments under-billed every long text.
See it on your own jobs
Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.
or keep browsing features →