Skip to main content

Get Workflow

POST 

/workflow/get

Retrieves one workflow by workflowId, including its stages, actions, visibility, and preferences. The workflow must be visible to you (through one of your teams or roles, your company, or because it has no visibility restriction) unless it is the company's only active workflow or you have company-wide workflow:manage permission. Terros staff can get any company's workflow. rollback summarizes account rollback: whether it is enabled, its target and protected stages, default stage, and allowed roles. Use /workflow/list to discover workflow IDs.

Checkpoints and pre-actions:

  • actions[].checkpoints (legacy): { [stageId]: { behavior: "always" | "ask" | "never" } }. Before the action, the account passes through these stages as stage-only history entries; nobody is credited for them.
  • actions[].hooks.pre: [{ type: "action", actionId, behavior: "always" | "ask" }]. The listed actions are recorded just before this one, each with its own conditions checked and its own stats credited to the user. The app runs "always" pre-actions automatically and offers "ask" ones.
  • To migrate an action, for each checkpoint stage in stage order with behavior "always" or "ask", add a pre-action with the same behavior whose actionId is the action that moves accounts into that stage (its toStageId), then remove checkpoints. A "never" checkpoint has no pre-action. Preview with dryRun first.
  • isMigrated: whether the company's legacy setup (account statuses, dispositions, event outcomes) has been fully migrated to this workflow. It says nothing about checkpoints or pre-actions.
  • migrationMappings: [{ sourceStage, targetId }], mapping a legacy account status, disposition, event outcome, or metric ID to the stage or action that replaced it. Imports, CRM syncs, plans, programs, and reports still read it, so keep it.

Request​

Responses​

Success