Skip to main content
TaskTemplate is a global, workspace-independent catalogue of onboarding and activation tasks that Well ships as canonical seed data. Each template defines the human-readable content (title, markdown body), the CTA action type that drives the frontend button, a display sort order, and an optional initial status that overrides the default ice_log when the seed pipeline materialises a per-workspace Task from the template. Templates have no workspace foreign key; they are append-only canonical rows managed exclusively by the syncTaskTemplates seed function and data migrations — users never write to this table. A Task row is the per-workspace materialisation of a template; many Tasks may reference the same TaskTemplate via template_pk.
Internal object. Not currently exposed on the public REST API. The operations below describe the intended contract.

API operations

Data model

Attributes

System-computed

  • task_template_id — generated by gen_random_uuid() at INSERT; never written by callers
  • sort_order default 0 — migrations set explicit sequential values; entity TypeScript default = 0
  • token_reward default 200 — entity TypeScript default = 200; DB DEFAULT 200
  • created_at — set by MikroORM onCreate hook (new Date()); never updated
  • updated_at — set by MikroORM onCreate hook and refreshed by onUpdate hook on every write
  • deleted_at — set to a timestamp by the syncTaskTemplates seed function when a template is retired; NULL for active rows
  • initial_status default — when NULL the Task seed pipeline defaults the child task status to ice_log; the column itself has no DB DEFAULT
  • action_type — seeded and updated exclusively by syncTaskTemplates and data migrations; the TypeScript OptionalProps declaration means MikroORM treats it as server-side defaulted (nullable native enum)

Example

Source: apps/api/src/database/entities/TaskTemplate.ts · domain: automation · tier: Activity