> ## 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.

# Contract Wizard

> Step-by-step wizard for creating a new partner contract in the CE core at /ce/partners/:partnerId/contracts/wizard.

The Contract Wizard is a full-page, step-by-step wizard for creating a new partner contract. It is accessible at `/ce/partners/:partnerId/contracts/wizard`.

## Overview

The Contract Wizard hosts a `ModuleWizardRenderer` (PF-41 platform wizard framework) for the `partner_contract` wizard type in the `ce` module. The wizard supports draft persistence, a Cancel button (returns to the partner detail page), and a Save & Exit option. On successful completion the wizard calls `useCreatePartnerContract`, submits the contract payload to the API, and navigates back to `/ce/partners/:partnerId`. If validation fails before submission a toast error is shown listing the validation issues. A loading skeleton is rendered if `partnerId` or `organizationId` is not yet resolved.

Contract fields submitted include: `contract_name`, `contract_type`, `start_date`, `end_date`, `value`, `auto_renew`, `renewal_notice_days`, `terms_summary`, `document_id`, `status` (defaulting to `draft`), and `notes`.

## Who it's for

Required permission: `ce.contracts.create` (route-level gate).

## Before you start

* You need the `ce.contracts.create` permission.
* You must have an existing partner record; the wizard is launched from a specific partner's page.
* Your organization must be active.

## Steps

<Steps>
  <Step title="Launch the wizard">Navigate to `/ce/partners/:partnerId/contracts/wizard` from the partner detail page or a partner action.</Step>
  <Step title="Complete each wizard step">Fill in contract name, type, dates, value, auto-renewal settings, terms summary, and any other required fields across the wizard steps.</Step>
  <Step title="Save and exit (optional)">Click Save & Exit to persist a draft and return later.</Step>
  <Step title="Submit the contract">Click Create Contract on the final step. The wizard validates the data and, on success, creates the contract and returns to the partner detail page.</Step>
  <Step title="Cancel">Click Cancel or the back arrow at any time to return to the partner detail page without saving.</Step>
</Steps>

## Key concepts

* **PF-41 wizard framework** — the wizard uses `ModuleWizardRenderer` from the platform wizard layer; step registration is handled by `registerPartnerContractWizardSteps`.
* **Draft persistence** — `enableDraftPersistence` is set; incomplete wizard data is saved locally.
* **Contract status** — defaults to `draft` on creation; SME: confirm available status transitions.

## Related

<Columns cols={2}>
  <Card title="Community Engagement" icon="bullhorn" href="/ce/overview">
    Community Engagement core overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index">
    Documentation coverage and governance.
  </Card>
</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/ce.tsx
  * src/cores/ce/wizards/partner-contract/PartnerContractWizardPage.tsx
  * src/cores/ce/wizards/partner-contract/registerPartnerContractWizardSteps.ts
  * src/cores/ce/wizards/partner-contract/partnerContractWizardValidation.ts
  * src/cores/ce/wizards/partner-contract/types.ts
</Accordion>
