Signature Expiry Sweep & Agent Alerts
Signature Expiry Sweep & Agent Alerts
To keep the signature workflow moving and prevent stale requests from going unnoticed, the platform runs a daily expiry sweep that automatically expires overdue signature tokens and notifies the responsible agent.
How it works
1. Daily sweep schedule
Every day at 07:00 UTC, a scheduled batch job queries all signatures records where:
status = 'pending'
It then applies one of two actions depending on the tokenExpiresAt value.
2. Expiry on the due date
If a pending signature's tokenExpiresAt is before today, the sweep:
- Updates the signature record:
status → 'expired' - Creates an in-app notification for the agent (
requestedById) on that record, informing them the token has expired and prompting them to re-send the signature request.
3. Pre-expiry reminder (T‑2 days)
If a pending signature's tokenExpiresAt is exactly 2 days from today, the sweep:
- Sends an in-app reminder notification to the requesting agent.
- The status remains
'pending'— no change is made to the record.
This gives agents an opportunity to chase the signatory before the token becomes invalid.
Notification summary
| Trigger | Recipient | Notification type | Status change |
|---|---|---|---|
Token expired (tokenExpiresAt < today) | Requesting agent (requestedById) | Expiry alert — re-send prompt | pending → expired |
| Token expiring in 2 days | Requesting agent (requestedById) | Pre-expiry reminder | None |
Affected entities
signatures— records are read and (where applicable) updated tostatus = 'expired'.notifications— new in-app notification records are created for the relevant agent.users— the agent identified byrequestedByIdon the signature record is the notification recipient.
Agent actions
When an agent receives an expiry or pre-expiry notification, they should:
- Open the relevant deposit / check-out case.
- Review the signature request and confirm the correct signatory details.
- Re-send (or resend) the signature request to generate a fresh token.
There is no automated re-send — the agent must trigger this manually.
Compliance context
Keeping signature requests current is important for maintaining an auditable, time-stamped record of consents under the Renters' Rights Act. Expired tokens mean an unsigned document; the sweep ensures agents are never left unaware of outstanding signatures that could delay or invalidate a deposit deduction process.