> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Forms & Workflow Wizard Templates

> Manage multi-step wizard templates — browse custom, system, and migrated wizards, and create new templates with name, module, and type configuration.

The Wizard Templates page at `/fw/wizards` displays the organization's wizard templates organized in tabs: My Templates (custom templates), System Templates, and Migration. Users with appropriate permissions can create, edit, and delete templates.

## Overview

The Wizard Templates page presents organization-owned wizard templates in a responsive card grid. Each card shows the associated module badge, active/inactive status badge, name, description, step count, and estimated total time. Cards have a dropdown menu for Edit and Delete actions (gated by `pf.wizards.edit` and `pf.wizards.admin` permissions respectively). The "New Wizard" button navigates to `/fw/wizards/new` (gated by `pf.wizards.create`).

## Who it's for

Access follows your organization's role and module configuration. All authenticated users can view the Wizard Templates list.

Individual actions are permission-gated:

* **Create**: `pf.wizards.create` (`PERMISSIONS.PF.WIZARDS_CREATE`)
* **Edit**: `pf.wizards.edit` (`PERMISSIONS.PF.WIZARDS_EDIT`)
* **Delete**: `pf.wizards.admin` (`PERMISSIONS.PF.WIZARDS_ADMIN`)

## Finding and managing wizard templates

**Viewing templates:**

1. Navigate to `/fw/wizards`.
2. The **My Templates** tab loads organization wizard templates.
3. Switch to **System Templates** to view platform-provided templates.
4. Switch to **Migration** for any migration utilities.

**Editing a wizard:**

1. Open the dropdown on a template card and select **Edit** (requires `pf.wizards.edit`).
2. The browser navigates to `/fw/wizards/:id/edit`.

**Deleting a wizard:**

1. Open the dropdown on a template card and select **Delete** (requires `pf.wizards.admin`).
2. A confirmation dialog warns that the action is permanent.
3. Confirm to delete. The template and all its configuration are removed.

**Cloning a system template:**
System templates show a clone action in `SystemTemplatesSection`; on success the browser navigates to the editor for the cloned template.

* **`is_active`** — Controls whether the wizard template is available for use. Starts as `false` on creation.
* **Module** — The platform core the wizard is associated with (displayed as an uppercase badge).
* **Step count / estimated time** — Derived from `template.steps`; total estimated time is the sum of `estimated_time_minutes` across all steps.
* **System templates** — Platform-provided templates surfaced by `SystemTemplatesSection`; SME should confirm scope.

## Creating a wizard

The New Wizard page at `/fw/wizards/new` presents a creation form for multi-step wizard templates. After creation the browser redirects automatically to the Wizard Builder (`/fw/wizards/:id/edit`) so steps and fields can be configured. Requires `pf.wizards.create`.

The page collects the minimum metadata required to create a wizard template record: name, optional description, module, and wizard type. The new template is created with `is_active: false` and an empty `steps` array.

Before you start: choose the target **Module** that this wizard will serve and a **Wizard Type** that reflects its purpose. The wizard name must be at least 3 characters long.

1. Navigate to `/fw/wizards/new` or select **New Wizard** from the Wizard Templates page.
2. Enter a **Wizard Name** (required, minimum 3 characters).
3. Optionally enter a **Description**.
4. Select a **Module** from the dropdown (defaults to `fw` — Forms & Workflows).
5. Select a **Wizard Type** from the dropdown (defaults to `custom`).
6. Select **Create & Configure**. The wizard template record is saved and the browser redirects to `/fw/wizards/:id/edit` for step configuration.

* **Module** — Associates the wizard with a platform core (e.g., `rh`, `hr`, `fa`, `cl`). Determines where the wizard appears and which data contexts are available.
* **Wizard type** — Classifies the wizard's purpose: `onboarding`, `admission`, `configuration`, `setup`, `workflow`, or `custom`.
* **`DEFAULT_WIZARD_CONFIG`** — Applied at creation; SME should confirm which defaults are set.

## Related

<Columns cols={2}>
  <Card title="Forms & Workflow" icon="diagram-project" href="/fw/overview">
    Forms & Workflow core overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index" />
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/fw\.tsx
  * src/cores/fw/pages/WizardTemplatesPage.tsx
  * src/platform/wizards/pages/WizardCreatePage.tsx
  * src/platform/wizards/hooks/useWizardTemplates.ts
  * src/platform/wizards/hooks/useWizardTemplateMutation.ts
  * src/platform/permissions/constants.ts
</Accordion>
