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 defaultDocumentation Index
Fetch the complete documentation index at: https://docs.wellapp.ai/llms.txt
Use this file to discover all available pages before exploring further.
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.
| Naming | Value |
|---|---|
| Object | TaskTemplate |
Resource type (JSON:API type) | task_template |
| Collection / records root | โ (not a records root) |
| REST base | /v1/task-templates |
| Entity class | TaskTemplate |
Internal object. Not currently exposed on the public REST API. The operations below describe the intended contract.
API operations
| Operation | Method & path | Status |
|---|---|---|
| List | GET /v1/task-templates | ๐ก Planned |
| Retrieve | GET /v1/task-templates/{id} | ๐ก Planned |
| Create | POST /v1/task-templates | ๐ก Planned |
| Update | PATCH /v1/task-templates/{id} | ๐ก Planned |
| Delete | DELETE /v1/task-templates/{id} | ๐ก Planned |
Data model
Attributes
| Field | Type | Required | Constraints | Allowed values | Description |
|---|---|---|---|---|---|
| task_template_id | uuid | โ Yes | unique | โ | Public-facing UUID identifier for the template. Generated by gen_random_uuid() at INSERT. Exposed on the API as the resource id. |
| slug | text | โ Yes | unique | โ | Human-readable stable identifier used as the upsert key in the seed pipeline (ON CONFLICT slug). Examples: connect-bank-account, connect-email. Must be unique across all non-deleted templates. |
| title | text | โ Yes | โ | โ | Display title shown to the user for the task. Copied into the child Task row at seed time and kept in sync by migration. |
| markdown_content | text | โ Yes | โ | โ | Full instructional body rendered to the user when they open the task. Written in Markdown; may include HTML comment directives for media embedding (e.g. <!-- media: file.png | alt: ... -->). |
| action_type | ๐ system โ enum (task_action_type_enum) | โช No | โ | connect_email, connect_gmail (tombstone โ historical only), connect_bank, connect_accounting, connect_provider, chrome_extension_fetch, go_to_invoices, go_to_transactions, go_to_workflows, confirm_subworkspace, connect_extension, connect_tools, build_canvas, manual_upload | The CTA action triggered by the task card button. Drives frontend routing at click time. NULL means no automated CTA; the task is informational only. Uses a native Postgres enum; stored values are the enum VALUE strings listed below. |
| initial_status | ๐ system โ enum (task_status_enum) | โช No | โ | ice_log, open, in_progress, done, blocked, cancelled, archived | Optional override for the status assigned to the per-workspace Task row when it is materialised by the seed pipeline. When NULL the seed pipeline defaults to ice_log. Used to promote high-priority templates (e.g. confirm-subworkspace) directly to open. |
| sort_order | integer | โ Yes | default 0; NOT NULL | โ | Controls the display order of templates / their materialised tasks (ascending). Default 0; migrations set explicit sequential values (1โN). Has a dedicated index idx_task_templates_sort. |
| token_reward | integer | โ Yes | CHECK (token_reward >= 0); default 200 | โ | Gamification reward copied into the child Task at seed time. Checked to be non-negative via a DB CHECK constraint (token_reward >= 0). |
| created_at | ๐ system โ timestamptz | โ Yes | โ | โ | Row creation timestamp. Set by the MikroORM onCreate hook; never updated. |
| updated_at | ๐ system โ timestamptz | โช No | โ | โ | Timestamp of the last mutation. Set by the onCreate hook and refreshed by the onUpdate hook on every subsequent write. |
| deleted_at | ๐ system โ timestamptz | โช No | โ | โ | Soft-delete sentinel. NULL when the template is active. Set by the seed pipeline when a template is retired (e.g. open_setup_flow templates retired in Migration20260521). Rows with deleted_at IS NOT NULL are excluded from all active queries and task backfills. |
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
apps/api/src/database/entities/TaskTemplate.ts ยท domain: automation ยท tier: Activity