Skip to main content
All Docs
FeaturesPurple PepperUpdated April 7, 2026

Background Jobs (Inngest Functions)

Background Jobs (Inngest Functions)

The platform uses Inngest to run reliable background jobs and scheduled cron tasks. All functions are registered in src/app/api/inngest/route.ts via the Inngest serve() handler.

Registered Functions

Core Platform

FunctionTriggerPurpose
usageAggregateEventAggregates usage metrics
webhookDeliverEventDelivers outbound webhooks
auditCleanupCronPurges old audit log entries
inviteEmailEventSends user invitation emails

eSigning

FunctionTriggerPurpose
eSigningRequeueEventRequeues failed eSigning requests
signableWebhookProcessEventProcesses Signable webhook callbacks

Tenancy Lifecycle

FunctionTriggerPurpose
actionRequiredScanCronScans for tenancy actions that require attention
actionRequiredNotifyEventSends notifications for required actions
endTenancyScanCronIdentifies tenancies approaching their end date

Renewal Notifications

FunctionTriggerPurpose
renewalNotificationScanCronScans for upcoming renewals
renewalNotificationSendEventDispatches renewal notification emails

Payments

FunctionTriggerPurpose
paymentCompletedSyncEventSyncs completed payment records
autoChargeOverdueCron — daily 9 AMAuto-charges past_due subscriptions that have a stored payment method

Offer Workflow

FunctionTriggerPurpose
offerInvitationEmailFnEventSends offer invitation emails to applicants
offerSubmittedAgentNotifyFnEventNotifies agents when an offer is submitted

Rent Guarantee Insurance (RGI)

FunctionTriggerPurpose
rgiPolicyActivateEventActivates an RGI policy after completion

Compliance

FunctionTriggerPurpose
complianceCertDistributeEventDistributes compliance certificates to relevant parties

AML / Identity Checks (Blinc-UK)

FunctionTriggerPurpose
amlCheckInitiateEventSends an AML identity check request to the Blinc-UK API
amlCheckProcessResultEventProcesses the AML check result returned via Blinc-UK webhook

Added in v0.3.1 — these functions were previously unregistered and silently dropped all events.

Referencing (Blinc-UK)

FunctionTriggerPurpose
blincUkWebhookProcessEventProcesses Blinc-UK referencing webhook callbacks and updates reference request statuses

Added in v0.3.1 — previously unregistered.

Billing Webhooks (Calmony Pay)

FunctionTriggerPurpose
calmonyPayCheckoutCompletedEventHandles checkout.session.completed → links the new subscription to the organisation
calmonyPayInvoiceSyncEventProcesses invoice.paid and invoice.payment_failed events
calmonyPayPaymentSyncEventResolves pending overdue payments on payment_intent.succeeded
calmonyPaySubscriptionSyncEventSyncs subscription lifecycle events: created, updated, and deleted

Added in v0.3.1 — all four functions were previously unregistered, meaning billing webhooks from Calmony Pay were silently dropped.

GDPR Data Retention

FunctionTriggerPurpose
dataRetentionScanCron — Sundays 4 AMScans all tables with a configured retention policy and inserts records into data_retention_flags for deletion processing, per GDPR Article 5(1)(e)

Added in v0.3.1 — previously unregistered. A SQL bug referencing a non-existent eligible_at column was also fixed in this release.


How Functions Are Registered

All functions must be explicitly listed in the functions array passed to serve() in src/app/api/inngest/route.ts:

// src/app/api/inngest/route.ts
import { amlCheckInitiate } from "@/inngest/functions/aml-check-initiate";
// ... other imports

export const { GET, POST, PUT } = serve({
  client: inngest,
  functions: [
    amlCheckInitiate,
    // ... all other functions
  ],
});

Important: Creating a new function file under src/inngest/functions/ is not sufficient — the function must also be imported and added to the functions array, otherwise events will be silently dropped.


Adding a New Background Job

  1. Create your function file in src/inngest/functions/your-function.ts using inngest.createFunction().
  2. Export the function as a named export.
  3. Import it in src/app/api/inngest/route.ts.
  4. Add it to the functions array inside serve().
  5. Dispatch events using inngest.send() from your application code.