Skip to content

Phases

A workflow's phases live in workspace/<WorkflowName>_<id>/phases.ts, exported as an array of HailerPhaseUpdatePayload. ws-config phases push applies them via phase.create / phase.update / phase.remove.

typescript
export const phases: HailerPhaseUpdatePayload[] = [
  { _id: "70a1...", name: "Lead", isInitial: true, color: "#3498db" },
  { _id: "70a2...", name: "In Progress" },
  { name: "Done", isEndpoint: true },   // new phase — no _id → created on push
];

Phase order is the array order — reorder the entries to reorder phases (the order property is server-managed and ignored). Removing a phase deletes it (snapshot-guarded, prompts unless --force). New phases (no _id) are created empty via phase.create, then all their properties are applied in a follow-up phase.update.

Properties

PropertyTypeDescription
namestringPhase name.
descriptionstring?Phase description.
colorstring?Phase color (hex).
keystring?Custom stable identifier.
isInitialboolean?The entry phase for new activities.
isEndpointboolean?A terminal/completed phase.
fieldsstring[]?Field ids shown while an activity is in this phase.
possibleNextPhasestring[]?Phase ids an activity may move to from here.
possibleNextPhaseSettingsRecord<string, { text?; name?; description? }>Per-transition labels/config, keyed by target phase id.
primaryDateField"created" | "updated" | "completedOn"Which date drives calendar/timeline placement.
primaryNumericFieldstring?Field id used as the phase's primary numeric metric.
followersstring[]?User ids that follow activities in this phase.

Announcements

PropertyTypeDescription
enableAnnouncementboolean?Post a feed announcement when activities enter this phase.
announcementFieldsstring[]?Field ids included in the announcement.
announcementFieldsOrderstring[]?Order of those fields.
announcementRecipientsstring[]?Explicit recipient ids.
announcementToOwnerboolean?Notify the activity owner.
announcementToOwnerTeamboolean?Notify the owner's team.
announcementAllowPrivateReplyboolean?Allow private replies to the announcement.

Field options & webhooks

PropertyTypeDescription
fieldOptions{ eventDateField?: string; dueDateField?: string }Field ids used as the event/due dates for this phase.
webhooksEnabledboolean?Fire a webhook when activities enter this phase.
webhookUrlstring?Webhook target URL.

Read-only / managed by the server

The SDK strips these before writing phases.ts and before hashing — editing them has no effect:

  • _id (kept only for matching), uid, created.
  • order — position is controlled by the array order in phases.ts, not this field.
  • membersphase members cannot be updated through the SDK; there's no supported phase.update path for them (noted directly in the SDK's normalizePhase). Manage phase membership in the Hailer UI.
  • webhookAdded, webhookUpdated — server-managed webhook state.

Command

ws-config phases push — creates, updates, and deletes phases per workflow.

Hailer Developer Documentation