DOCUMENT EVENT TRIGGERED
Offer submitted · Counter offer sent · Amendment proposed · Reinstatement proposed
System creates ViewReminder record↓
STATE 1 — ViewReminder Record Created
offer_id
document_type
party_email
party_role
document_triggered_at = NOW
reminder_count = 0
resolved = false
Scheduled automation runs every 30 minutes (sendViewReminders)↓
DECISION: Is offer still active?
(status is not rejected, withdrawn, or terminated)
No → Mark resolved = true → STOP
Yes — offer is active↓
DECISION: Has party viewed the document?
(viewer_email found in the document-type viewed_by array)
Yes → Mark resolved = true → STOP
No — engagement gap detected↓
DECISION: Time since document_triggered_at ≥ 12 hours AND reminder_count = 0?
No → Wait for next automation cycle
Yes↓
STATE 2 — Send First Reminder Email
reminder_count = 1
first_reminder_sent_at = NOW
last_reminder_sent_at = NOW
Email contains: property address, document type, direct portal link, party role context.
↓
DECISION: Time since last_reminder_sent_at ≥ 24 hours AND reminder_count = 1?
No → Wait for next automation cycle
Yes — still not viewed↓
STATE 3 — Send Second Reminder Email
reminder_count = 2
last_reminder_sent_at = NOW
Subject line escalated: "URGENT — Document awaiting your review"
↓
DECISION: Time since last_reminder_sent_at ≥ 72 hours AND reminder_count = 2?
No → Wait for next automation cycle
Yes — still not viewed↓
STATE 4 — Send Final Reminder Email
reminder_count = 3
last_reminder_sent_at = NOW
Subject line: "Final Notice — Document review required." CC listing agent if party is seller or buyer.
↓
DECISION: Does party view the document at any later point?
No further automated remindersYes → Mark resolved = true → STOP
↓
REMINDER CYCLE COMPLETE
reminder_count = 3, resolved = false
Agent notified of persistent non-engagement by party.