Class: Events::ProblematicDeliveryDetected

Inherits:
ApplicationEvent
  • Object
show all
Defined in:
app/events/events.rb

Overview

Published by ProblematicDeliverySweep when a parcel shipment first
matches a problematic-delivery criterion (carrier exception with no
later delivered scan, delivered to a pickup location in lieu of the
address, past estimated delivery with no delivered scan, or shipped with
no carrier pickup scan). One event per (shipment-or-delivery, reason) per
7-day alert window — the sweep's cache claim gates re-publication.
Nothing subscribes: ProblematicDeliveryDigestWorker polls the sweep daily
and reads this stream only to mark rows NEW. The stream is the audit
trail and the hook for future reactions (CRM activity, Slack, ...).
data: { shipment_id:, delivery_id:, tracking_number:, reason: }

Method Summary

Methods inherited from ApplicationEvent

#data