> For the complete documentation index, see [llms.txt](https://docs.snapfix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snapfix.com/how-the-apps-work/screens/groups/site-switcher.md).

# Site switcher

{% hint style="info" %}
Draft, written by an agent and not yet checked by a person ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). Platforms: web, iOS and Android. [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/screens/groups/site-switcher.md).
{% endhint %}

Pick the site to work in. Each site shows its red, amber and green task counts, its new activity and its on-call users; the web also lists the multi-site and has a "Site Console" button on each row.

![Site switcher](https://3653879137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsVVGa79QbcEkJ7n8srxe%2Fuploads%2Fgit-blob-53cda2cf010e3ac98c0d3448932ce8240c199ada%2Fsite-switcher.png?alt=media)

* **Where:** web: the site name at the top of the side menu; iOS: the site name in the top bar (screen `SelectParentVC`); Android: the site name in the top bar (bottom sheet)
* **Who:** any signed-in user. The list holds the sites the user belongs to. All three leave churned sites out: the web's list comes from [`GET /v1/app/parents`](https://docs.snapfix.com/engineering-reference/api/console.md#get-v1appparents), which drops them. The web still has a churn banner and blocks task status changes on a churned site, which the list gives no way to open.
* **Feature:** [Switching sites](https://docs.snapfix.com/product/features/groups/site-switching.md)

## Layout

### Web

The top of the side menu shows the current site's (or multi-site's) image and name with an arrow. The menu lists, in this order:

1. **The multi-site**, if the user has one, first and labelled "MULTI-SITE".
2. **The sites**, one row each: the image with a badge for new task activity ("99+" above 99); the name; "On Call" with up to six on-call users' pictures and "+n" for the rest; the red, amber and green counts ("99999+" above that); and the "Site Console" button, a settings icon on sites the user administers and an info icon on the others. The current site's row is highlighted and its image has a check badge.

With no sites, the menu shows "No data available".

### iOS

A sheet with a search field and one row per site: the name, the on-call users' pictures (tap for the list), the red, amber and green counts, the unread count, a chat button, and a settings button (a gear on sites the user administers, an info icon on the others).

### Android

A bottom sheet with a search field and one row per site: the name, the on-call users as overlapping pictures (tap for the list), the red, amber and green counts ("--" until they load), and a settings button. The chat button in the row layout is always hidden.

## Inputs

| Field  | Type | Required | Default | Rules and messages                          |
| ------ | ---- | -------- | ------- | ------------------------------------------- |
| Search | Text | No       | Empty   | iOS and Android: filters the sites by name. |

## Actions

| Action                                    | Who               | What happens                                                                                                                                                                                                                                                               | API                                                                                                                                                                                                                                                                                       |
| ----------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Open the menu (web)                       | Anyone            | Loads the sites' new-activity counts and their on-call users.                                                                                                                                                                                                              | [`POST /v1/app/parents/get-updates`](https://docs.snapfix.com/engineering-reference/api/console.md#post-v1appparentsget-updates), [`POST /v1/app/user/on-call`](https://docs.snapfix.com/engineering-reference/api/users.md)                                                              |
| Open the sheet (apps)                     | Anyone            | Shows the sites from the device, then loads their counts and on-call users. iOS also loads the unread counts.                                                                                                                                                              | [`?action=webcust_list_parents_v2`](https://docs.snapfix.com/engineering-reference/api/console.md#post-actionwebcust_list_parents_v2); iOS: [`?action=read_parent_jobs_new_updates`](https://docs.snapfix.com/engineering-reference/api/tasks.md#post-actionread_parent_jobs_new_updates) |
| Choose a site                             | Anyone            | Makes it the current site and clears a multi-site choice. Web: stays on the page when it can show the site, else goes to Fix; the current site does nothing. Apps: switch to the site and its groups.                                                                      | -                                                                                                                                                                                                                                                                                         |
| Choose the multi-site (web)               | Multi-site users  | Opens the Multi-Site Console at `/multi-site/my_sites` ([My sites](https://docs.snapfix.com/how-the-apps-work/screens/console/my-sites.md)).                                                                                                                               | -                                                                                                                                                                                                                                                                                         |
| "Site Console" (web)                      | Shown to everyone | Selects the site and opens `/account/{site}`: [Site details](https://docs.snapfix.com/how-the-apps-work/screens/console/site-details.md) for admins; non-admins are sent back to Fix. On the multi-site it opens `/multi-site/my_sites`.                                   | -                                                                                                                                                                                                                                                                                         |
| Settings button (apps), chat button (iOS) | Anyone            | Settings opens the site's settings, telling the next screen whether the user is an admin. Chat switches to the site and opens its chat.                                                                                                                                    | -                                                                                                                                                                                                                                                                                         |
| On-call users                             | Anyone            | Web: a side panel with the site's on-call users, with contact details when the site shows them. iOS and Android: the on-call list. What being on call changes is open \[[ASK-36](https://github.com/snapfix/docs/blob/main/ASK.md#ask-36-what-does-being-on-call-change)]. | -                                                                                                                                                                                                                                                                                         |

## States

* **Loading:** web shows a spinner in the side menu while the sites load, and a progress bar in the menu while the counts load. Android shows "--" for counts not yet loaded.
* **Empty:** web shows "No data available".
* **Error:** when the web gets no sites, or the list fails, it shows "Your login was successful but it appears that you are not assigned to any Site or Group." with "Reload" and "Log out".
* **No permission:** none; see "Site Console" in [Actions](#actions).
* **Offline (mobile):** the sites come from the device; counts and on-call users load when online.

## Dialogs and sheets

* **Congratulations** (web): when the server reports sites the user was just given, once per session: "Congratulations {first name}!", "You now have access to" and the site, with "Ok" for a first site or "Go to Site".
* **On call** (web side panel; iOS and Android lists).
* **Not assigned** (web alert): the error above.

## Platform differences

* **Multi-site:** only the web lists it; the Multi-Site Console is web only.
* **Site Console:** the web shows the button on every site; the apps have a settings button on each site, and iOS also a chat button.
* **Unread count:** iOS shows it per site; web shows the new-activity badge.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snapfix.com/how-the-apps-work/screens/groups/site-switcher.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
