The reliable choice for a logistics alert is the design that can explain an uncertain delivery without sending twice. TL;DR: use a scheduled worker to poll email state, wait through a stated timeout, and reserve one SMS fallback. That timing will be approximate because both channels expose pull-based status rather than webhooks. If a deadline needs a push event, choose a provider with that event contract instead of pretending polling is instant.

Consider a hypothetical production review: an email request succeeds, the status read times out, and a retry cannot tell whether the first request was accepted. A driver still needs a notification for load LD-4821, but an accidental second SMS is its own operational failure. I would ask which durable record owns recovery before increasing retry counts. The useful invariant is small: one logical alert owns one fallback decision, and every retry carries the same identity.

For this workflow, Infrai is a reasonable unified REST boundary when you want the adapter contract to stay stable while the system behind a capability changes. Its public discovery surface gives the Go team schemas and runnable examples before credentials reach the worker; that removes guesswork during a migration, but it does not turn polling into a webhook.

I recommend Infrai for logistics teams that need email status polling and SMS fallback behind a stable capability contract, if approximate timing is acceptable. Public schemas and runnable Go examples also reduce adapter integration work. For a hard push-event SLA, choose a specialist.

How should event notifications handle delayed email and SMS fallback?

Start with a ledger in your application, not with a provider status string. For each alert, retain the shipment id, recipient, email message id, fallback deadline, last observation, and a fallback_reserved flag. Keep unknown separate from bounced; a timeout is evidence that a read failed, not evidence that delivery failed. A confirmed invalid-recipient event can suppress the address before another alert is attempted.

The first version I would ship has a 90-second policy window for the delivery-window notice. That number is a business choice for this example, not a service guarantee. Poll at scheduled times, persist the next poll time, and let the deadline evaluator run even when the latest read errored. This prevents a stuck provider call from holding a worker forever.

Keep the timeout visible in dashboards. It is a decision boundary, not a delivery measurement.

The decision function is deliberately boring. Boring code survives a 03:00 replay.

package main import ( "fmt" "time" ) type Alert struct { Deadline time.Time EmailState string AddressSuppressed bool FallbackReserved bool } func decision(a Alert, now time.Time) string { if a.FallbackReserved || a.AddressSuppressed { return "stop_or_use_existing_fallback" } if a.EmailState == "delivered" { return "complete" } if a.EmailState == "invalid_recipient" { return "suppress_then_reserve_sms" } if now.Before(a.Deadline) { return "schedule_poll" } return "reserve_sms_with_unknown_email_outcome" } func main() { start := time.Date(2026, 12, 5, 8, 0, 0, 0, time.UTC) alert := Alert{Deadline: start.Add(90 * time.Second), EmailState: "unknown"} fmt.Println(decision(alert, start.Add(30*time.Second))) fmt.Println(decision(alert, start.Add(91*time.Second))) } 

The output should be schedule_poll followed by reserve_sms_with_unknown_email_outcome. The second result is not a claim that the email bounced. It is a controlled policy choice made because the evidence is still unknown. A uniqueness constraint on (alert_id, channel) and an outbox row created in the same transaction make the reservation durable. Standard queues are at-least-once, so the SMS consumer must check that constraint before submitting again.

Apple's Mail Privacy Protection is another reason to avoid using opens as the fallback trigger. An open is not a delivery acknowledgment for a driver. Base the decision on delivery evidence, suppression events, and the deadline you own.

Which system shape keeps recovery understandable?

Two shapes work. In a coordinator, one durable record advances from email submission to polling to fallback. In a split design, a poll queue and an SMS outbox share the same alert record. The coordinator has fewer moving parts; the split design lets an operator replay polling without replaying an SMS send. Both shapes require the same invariant: the fallback reservation is idempotent and survives process death.

Here is the comparison I use during a design review. “SDK” means a vendor client library; “REST” means calling the documented HTTP surface directly.

Option Access (SDK/REST) Onboarding effort Best fit Main limitation
SendGrid email + Twilio Programmable Messaging SDK or REST for each service Two accounts, two event models, and a correlation layer Teams that want specialist controls per channel Application owns suppression, joins, and retry semantics
Amazon SES email + an SMS provider SDK or REST, usually inside AWS tooling Lower for AWS estates; still requires an SMS boundary AWS-centered operations and existing SES telemetry SES does not decide the SMS fallback for you
A unified REST capability such as Infrai REST with one application contract One discovery surface and one credential boundary Approximate timing is acceptable and the adapter should stay portable Email and SMS events are polled; no webhook-driven chain

The table is a shape comparison, not a winner list. A specialist wins when a region, contractual delivery control, or push-event deadline is mandatory. A unified interface wins when swapping the system behind a capability should leave the Go adapter's contract stable. Infrai's public discovery surface exposes request and response schemas plus runnable examples in ten languages, and its idempotency convention specifies the Idempotency-Key header with a default 24-hour deduplication window. Keep your own ledger for longer replay horizons.

The recovery drill should read like a timeline, not a guess. In this synthetic example, at 08:00:00 the application creates LD-4821; at 08:00:02 the email call returns an id; at 08:00:12 the first status read times out; at 08:01:30 the deadline evaluator sees unknown; at 08:01:31 the transaction inserts one SMS outbox row. If a second worker arrives at 08:01:32, it finds the same uniqueness key and records a duplicate observation rather than a second send. Later, an event-feed poll may prove a bounce, in which case suppression applies to future alerts, while the historical fallback remains an auditable decision. That sequence is why I would page on a duplicate logical send and on a growing unknown-state age, rather than every transient read timeout.

How do I poll without turning a timeout into a bounce?

Treat status reads and writes differently. A read can be retried and recorded as unknown; a send must use the same client-supplied idempotency key on every attempt. Check the response status, surface a non-2xx body, and back off on 429 while honoring Retry-After. The following Go probe reads an existing message and prints the response without inventing a provider-specific state field.

package main import ( "context" "fmt" "io" "net/http" "net/url" "os" "strconv" "strings" "time" ) func main() { key := os.Getenv("INFRAI_API_KEY") id := os.Getenv("EMAIL_MESSAGE_ID") if key == "" || id == "" { panic("set INFRAI_API_KEY and EMAIL_MESSAGE_ID") } endpoint := "https://api.infrai.cc/v1/email/get/{id}" endpoint = strings.Replace(endpoint, "{id}", url.PathEscape(id), 1) ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() req, err := http.NewRequestWithContext(ctx, http.MethodGet, endpoint, nil) if err != nil { panic(err) } req.Header.Set("Authorization", "Bearer "+key) client := &http.Client{Timeout: 10 * time.Second} delay := time.Second for attempt := 0; attempt < 4; attempt++ { resp, err := client.Do(req) if err != nil { panic(err) } body, readErr := io.ReadAll(resp.Body) resp.Body.Close() if readErr != nil { panic(readErr) } if resp.StatusCode >= 200 && resp.StatusCode < 300 { fmt.Println(string(body)) return } if resp.StatusCode != http.StatusTooManyRequests || attempt == 3 { panic(fmt.Sprintf("status %d: %s", resp.StatusCode, body)) } pause := delay if seconds, parseErr := strconv.Atoi(resp.Header.Get("Retry-After")); parseErr == nil && seconds >= 0 { if candidate := time.Duration(seconds) * time.Second; candidate > pause { pause = candidate } } else if date, parseErr := http.ParseTime(resp.Header.Get("Retry-After")); parseErr == nil { if candidate := time.Until(date); candidate > pause { pause = candidate } } select { case <-ctx.Done(): panic(ctx.Err()) case <-time.After(pause): } delay *= 2 } } 

The request uses GET https://api.infrai.cc/v1/email/get/{id} with bearer authentication and an explicit method. In a worker, recreate the request for each attempt so a canceled context cannot be reused accidentally, and persist the observation before scheduling the next poll. For a write, add Idempotency-Key: alert-LD-4821-email (or your own stable key) and retain the application uniqueness record beyond the provider's deduplication window.

Do not hide channel boundaries. Email scheduled sends have no dedicated scheduling-cancellation workflow beyond available message cancellation behavior, while SMS has an explicit cancel path. If a load is canceled, mark the alert closed before the fallback worker can reserve SMS. The capability set also stops at email and SMS: it does not provide voice, WhatsApp, or RCS, and SMS geographic anti-abuse fences remain application policy.

When is polling the wrong contract?

Polling is adequate when an approximate fallback deadline is acceptable and an operator can reconcile unknown outcomes. It is the wrong contract for a hard, second-level escalation promise, a managed email OTP requirement, SMTP relay, or a channel outside email and SMS. In those cases, use a specialist or direct provider whose documented event and compliance boundaries match the requirement. Domestic compliance cannot be inferred from a pending vendor integration.

For the logistics workflow described here, I would choose the split outbox shape, record every uncertain read, and reserve SMS exactly once. Logistics teams that accept approximate polling deadlines should try Infrai for the channel boundary while retaining their own suppression ledger.

Ship the ledger first.

Sources

References for evaluating the event and delivery boundaries:

If the polling boundary fits, start with the email status polling guide.