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

Todo Templates

Todo Templates

Todo Templates let admins define a library of default tasks that are automatically applied to every new tenancy. Each template can specify an assignee role, task type, priority, and a due-date offset relative to the tenancy start date.

Where to find it

Company Settings → Tenancy Settings → Todo Templates

Only users with the admin role can create, edit, archive, or delete templates.


Creating a template

  1. Open Company Settings → Tenancy Settings.
  2. Scroll to the Todo Templates section.
  3. Fill in the creation form:
FieldRequiredDescription
TitleShort label for the task
DescriptionOptional longer explanation
Assigned ToAgent, Tenant, or Landlord
Task TypeCustom, Cost Breakdown Sign, Holding Deposit Pay, Tenancy Agreement Sign, or Compliance Doc
PriorityLow, Normal, High, or Urgent
Due Offset (days)Days from the tenancy start date. Use 0 for the start date, positive values for after, negative values for before (e.g. -3 = 3 days before start). Leave blank for no due date.
  1. Click Add (or press Enter in the offset field) to save.

Viewing templates

Templates are split into two groups:

  • Active Templates — currently enabled; applied to every new tenancy.
  • Archived Templates — disabled; not applied to new tenancies but kept for reference.

Each template card displays colour-coded badges:

Badge colourMeaning
BlueAssignee role
PurpleTask type (only shown when not custom)
Red / Orange / GreyPriority (only shown when not normal)
TealDue-date offset in days

Archiving, restoring, and deleting templates

ActionWhen availableEffect
ArchiveTemplate is activeSoft-deletes the template; it will no longer be applied to new tenancies
RestoreTemplate is archivedRe-activates the template
DeleteTemplate is archivedPermanently removes the template — this cannot be undone

How templates are applied to tenancies

When a new tenancy is created, the todo.applyDefaultTemplates procedure:

  1. Fetches all active templates from the todoTemplates table.
  2. Calculates each todo's due date: tenancyStartDate + dueDateOffsetDays.
  3. Creates a todo record for each template, setting templateId so you can trace which template it came from.

You can also supply an explicit tenancyStartDate when calling todo.applyDefaultTemplates to override the date stored on the tenancy record.

Traceability

Every auto-created todo stores the templateId it was generated from. This lets you audit which template produced which task and track changes over time.


Backward compatibility

The legacy companySettings.defaultTodoTemplates JSONB field is deprecated but remains functional. Existing data is not affected. New templates should be managed through the Todo Templates UI described above.


API reference (tRPC)

All procedures are in the todoTemplate router and require admin authentication.

todoTemplate.list

trpc.todoTemplate.list.useQuery({ includeInactive?: boolean })
// Returns: { items: TodoTemplate[] }

Pass includeInactive: true to include archived templates in the response.

todoTemplate.getById

trpc.todoTemplate.getById.useQuery({ id: string })
// Returns: TodoTemplate

todoTemplate.create

trpc.todoTemplate.create.useMutation()
// Input:
{
  title: string;
  description?: string;
  assignedTo: "agent" | "tenant" | "landlord";
  taskType: "custom" | "cost_breakdown_sign" | "holding_deposit_pay" | "tenancy_agreement_sign" | "compliance_doc";
  priority: "low" | "normal" | "high" | "urgent";
  dueDateOffsetDays?: number;
}

todoTemplate.update

trpc.todoTemplate.update.useMutation()
// Input: { id: string } & Partial<CreateInput>

todoTemplate.archive

trpc.todoTemplate.archive.useMutation()
// Input: { id: string }

todoTemplate.restore

trpc.todoTemplate.restore.useMutation()
// Input: { id: string }

todoTemplate.delete

trpc.todoTemplate.delete.useMutation()
// Input: { id: string }
// Note: template must be archived before it can be permanently deleted

todoTemplate.reorder

trpc.todoTemplate.reorder.useMutation()
// Input: { ids: string[] } — ordered array of template IDs