Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.wellapp.ai/llms.txt

Use this file to discover all available pages before exploring further.

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.
NamingValue
ObjectTaskTemplate
Resource type (JSON:API type)task_template
Collection / records rootโ€” (not a records root)
REST base/v1/task-templates
Entity classTaskTemplate
Internal object. Not currently exposed on the public REST API. The operations below describe the intended contract.

API operations

OperationMethod & pathStatus
ListGET /v1/task-templates๐ŸŸก Planned
RetrieveGET /v1/task-templates/{id}๐ŸŸก Planned
CreatePOST /v1/task-templates๐ŸŸก Planned
UpdatePATCH /v1/task-templates/{id}๐ŸŸก Planned
DeleteDELETE /v1/task-templates/{id}๐ŸŸก Planned

Data model

Attributes

FieldTypeRequiredConstraintsAllowed valuesDescription
task_template_iduuidโœ… Yesuniqueโ€”Public-facing UUID identifier for the template. Generated by gen_random_uuid() at INSERT. Exposed on the API as the resource id.
slugtextโœ… Yesuniqueโ€”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.
titletextโœ… 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_contenttextโœ… 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_uploadThe 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, archivedOptional 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_orderintegerโœ… Yesdefault 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_rewardintegerโœ… YesCHECK (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

{
  "data": {
    "type": "task_template",
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "attributes": {
      "slug": "connect-bank-account",
      "title": "Connect your bank account",
      "markdown_content": "# Connect your bank account\n\nSee every transaction in one place...",
      "action_type": "connect_bank",
      "initial_status": "open",
      "sort_order": 1,
      "token_reward": 200,
      "created_at": "2026-03-11T10:00:00.000Z",
      "updated_at": "2026-04-13T10:00:00.000Z",
      "deleted_at": null
    }
  }
}
Source: apps/api/src/database/entities/TaskTemplate.ts ยท domain: automation ยท tier: Activity