Release v1.0.23 — Mandate Invite Email Sending
Release v1.0.23 — Mandate Invite Email Sending
Released: v1.0.23
Summary
This release introduces the mandate invitation email flow — the mechanism by which letting agents notify tenants that they need to set up a Direct Debit mandate. It covers everything from token generation and email dispatch through to lifecycle tracking and resend support.
What's Included
Mandate Invitation Email
A new Inngest background job handles dispatch of mandate invitation emails. When triggered, the job sends the tenant a branded email containing:
- Their unique, tokenised mandate form link
- The agent's name and logo
- The Direct Debit amount and frequency
- An expiry notice
The email is built on the existing email template system, maintaining consistent styling and branding across all outbound communications.
tRPC Mutation
The invite flow is exposed via a new tRPC mutation (mandate.sendInvite). Consuming applications call this mutation with a mandateId to trigger an invite — or a resend if one has been sent before. The mutation enqueues the Inngest job and returns immediately.
Token Lifecycle Tracking
The mandate_form_tokens table has been extended to track the full invitation status:
sent— email dispatchedopened— tenant accessed the form linkexpired— token passed its validity window unused
This gives agents and the platform clear visibility into where a tenant is in the onboarding process.
Resend & Token Invalidation
Resending an invite is fully supported. Triggering a resend on an existing mandate:
- Marks the current token as invalidated
- Issues a new token with a fresh expiry
- Dispatches a new invitation email
This prevents multiple live links from coexisting, reducing the risk of tenant confusion or replay issues.
Upgrade Notes
- The
mandate_form_tokenstable requires migration to add thesent,opened, andexpiredstatus tracking fields. Run migrations before deploying this release. - No breaking changes to existing mandate or token APIs.
Related Documentation
- Mandate Invite Emails — full feature documentation
- Changelog — full version history