# How to enable self-registration in Client Portal?

For **root administrators**: allow new users to create a portal account without manual user creation in Constructor.

## When you'll need this

- Clients should register themselves in **Support Portal**.
- You need a registration form with extra fields (organization, tax ID, etc.).

## What's important to know

- Registration requires a **Client Portal role** and **portal URL** (easiest under **Settings → Client Portal → Instance & access** after enabling Client Portal settings).
- **Mailgun must be configured** for transactional email (**Settings → Email** in Constructor, checklist steps 1–2). Without it, registration returns an error and the account is **not** created.
- After registration, the user must **confirm their email** via the link in the message before they can sign in. Until confirmation, login shows “confirm your email”, not “invalid credentials”.
- Users with the Client Portal role **cannot** sign in to Constructor.
- Registration fields are **client fields** with **Show on Client Portal registration** enabled.

## Before you start

- [x] You are signed in as **root**.
- [x] Client Portal is deployed on its own URL.
- [x] **Mailgun** is set up and at least one sending domain/account is active (same stack used for password reset and credential emails).

## Step-by-step

### 1. Role for portal users

1. Open **Settings → Users → Roles**.
2. Create or edit a role (e.g. seeded **`client_portal`** or your portal customer role).
3. Enable the **Client Portal** module (access to the Support Center).
4. In **Operator Panel**, turn the module **on** (top toggle).
5. Under Operator Panel **Settings**, enable **View** only (not **Save**) for: **Themes**, **Statuses**, **Dialogue statuses**, **Priorities**, **Metrics**. Without these, the ticket list filters and badges may fail to load.
6. Under **Additional Operator Panel settings**, enable **Access** for **View CSAT** and **Remove CSAT** — without these, portal users cannot save a rating after the ticket is closed.
7. **Do not** enable Client Portal for operator or Constructor administrator roles.
8. Save the role and note its **id** (needed in step 2).

On new instances, Engine seed applies the same permission set to `client_portal`. For existing roles, configure steps 4–6 manually.

→ Details: [Configure roles](/en/settings/how-to/configure-roles.md)

### 2. Portal URL and self-registration

1. Under **Settings → Instance settings**, enable **Client Portal settings (Constructor)** (category **Client Portal**).
2. Open **Settings → Client Portal → Instance & access**.
3. Set **Client Portal URL** (`https://…`).
4. Turn on **Enable self-registration** and pick **Role for new users** from step 1 (if the list is empty, use the **Settings → Roles** link in the warning).
5. Click **Save**.

**Alternative (root):** same keys manually in **Instance settings** — `client_portal_url`, `portal_registration_enabled`, `portal_registration_role_id`. → [Configure instance settings](/en/settings/how-to/configure-instance.md)

### 3. Registration form fields

1. Open **Settings → Bots → Client fields** (or **Client fields** in the menu).
2. For each field on the registration form, enable **Show on Client Portal registration**.
3. Click **Save** in the page header.

→ Details: [Configure client fields](/en/settings/how-to/configure-client-fields.md)

### 4. Verification

1. Open the portal URL in a private/incognito window.
2. Confirm **Create account** is available.
3. Register a test user — you should see **check your email** (no automatic login).
4. Open the confirmation link from the inbox, then sign in and create a ticket.

## Related materials

- [Administrator hub](/en/clientportal/admin-hub.md)
- [What is Client Portal](/en/clientportal/explanation/what-is-client-portal.md)
- [How to register (end user)](/en/clientportal/how-to/register-account.md)
