![Ringle](assets/ringle-logo.png)

# Switching tenants and workspaces

## Purpose
If your account belongs to more than one business, the switcher at the top of the sidebar moves the whole portal from one tenant to another: dashboard, analytics, conversations, and settings. This doc also explains where demo workspaces live; they are not part of this switcher.

## Prerequisites
- A portal account with at least one tenant membership. With a single membership the switcher still shows your business but there is nothing to switch to.
- The demo account used here (Demo Owner) belongs to two tenants: Demo Auto Shop and Demo Ecommerce Store.

## Steps

### Step 1

![switching-tenants-and-workspaces, step-01](screenshots/tenant-dashboard/step-01.png)

**Action:** Sign in. Look at the top of the left sidebar, directly under the Ringle logo.

**What you should see:** A button shows the active business: its avatar (initials or logo), its name, and its `@slug` (here "Demo Auto Shop" with `@demo-autoshop`). Every page you open is scoped to this tenant until you switch.

### Step 2

![switching-tenants-and-workspaces, step-02](screenshots/switching-tenants-and-workspaces/step-02.png)

**Action:** Click the business button to open the switcher.

**What you should see:** A menu opens. It lists every business your account can access, each with its avatar, name, and slug. The active one is highlighted with a check mark. Below a divider, a Business Settings entry opens workspace access management for the current tenant.

### Step 3

*Screenshot not available (switching to the second business currently fails on prod, see Troubleshooting)*

**Action:** Click another business in the list (here Demo Ecommerce Store).

**What you should see:** The switcher button and the page header should update to the selected business, and everything in the portal should then belong to it: dashboard cards, analytics sessions, conversation designs, and settings. If you were editing a conversation flow when you switched, the portal returns you to the conversations list. That stops you from editing under a stale tenant. On prod today the switch does not complete for this account: the switcher drops to "Select Business" and the selected business never loads.

### Step 4

![switching-tenants-and-workspaces, step-01](screenshots/demo-workspace-dashboard/step-01.png)

**Action:** Open one of your demo workspaces (from the Demos area or a workspace link you were given).

**What you should see:** Demo workspaces do not appear in the tenant switcher. They have their own home under `/demos/...` with a separate sidebar. At the top of that sidebar is their own workspace selector (the "Guide Evidence Shop" dropdown in the screenshot) for hopping between the demo workspaces you can access. Tenant pages and demo workspace pages are two separate worlds, scoped by two separate selectors.

## Troubleshooting
- Only one business is listed: your account has a single membership. Ask an admin of the other business to grant you access, or submit an access request (see the tenant signup and access requests doc).
- The switcher reads "Select Business" with nothing chosen: this is the platform admin state. Admins see every tenant in the list and must pick one explicitly; nothing is auto-selected for them.
- Pages show stale or missing data right after a switch: give it a moment, then reload the page once. The dashboard cards in particular can lag behind a switch.
- You switched while editing a conversation flow and lost the editor: this is intentional; the portal redirects to the conversations list on switch so you cannot save a flow into the wrong tenant. Reopen the flow under the correct business.
- Picking the second business drops the switcher to "Select Business" and never loads it: this is a current prod bug. The request to change the active business returns success, but the portal does not fetch the new business and does not update the header. A page reload lands you back on the first business. There is no user workaround right now; the switch has to be fixed server-side and in the switcher component.

## Notes
- Source component: `components/tenant-management/TenantContextSwitcher.jsx` in the portal app. It renders in the portal chrome on every tenant page rather than at its own route.
- Regular members see the tenants from their own memberships. Platform admins (GlobalAdmin) see all tenants in the same switcher, and additionally have an enter control ("View as this tenant") on the admin Tenants page; entering that way adds a "Viewing as admin" banner with an Exit button above the navigation. That page is covered in the platform admin guide.
- Demo workspaces are switched from the demo workspace sidebar selector, not from this component. See the demo workspace docs for that area.
