> 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/staff/cs-dashboard.md).

# CS dashboard

{% 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. [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/screens/staff/cs-dashboard.md).
{% endhint %}

Staff review the paying sites in one table, with their dates, risk score, users, groups and activity, and generate two spreadsheets: an activity report and a user list.

* **Where:** admin app `/cs-dashboard`; menu "CS Dashboard"
* **Who:** anyone signed in to the admin app ([Access](https://docs.snapfix.com/how-the-apps-work/screens/staff.md#access)). The table's call checks no staff flag, so any signed-in user gets every paying site with its admins' contact details. The report calls check no staff flag either, and their files open for anyone who has the link.
* **Feature:** [Usage dashboards](https://docs.snapfix.com/product/features/staff/usage-dashboards.md)

## Layout

1. **Title.** "CS Dashboard". Under it, "For more details regarding the dashboard please refer to this guide" and a link, "document", that opens an outside guide in a new tab.
2. **Menus, on the right.** "Actions" with a menu button, and "Add/Remove columns" with a menu button.
3. **Banner.** "This CS Dashboard is for ANNUAL accounts only". The table holds every live site whose customer type starts with `paying_`; nothing limits it to annual accounts \[[ASK-206](https://github.com/snapfix/docs/blob/main/ASK.md#ask-206-should-the-cs-dashboard-list-annual-accounts-only)].
4. **Table.** One row per site, highest risk score first, 10 rows per page by default (10, 20, 50 or 100), with a quick jump box. The figures come from a copy the server rebuilds when it is more than 12 hours old, so they can be up to 12 hours old ([`GET /cs-dashboard`](https://docs.snapfix.com/engineering-reference/api/staff.md#get-cs-dashboard)).

| Column                                                                                                                  | Shown at first | Shows                                                           |
| ----------------------------------------------------------------------------------------------------------------------- | -------------- | --------------------------------------------------------------- |
| "UUID"                                                                                                                  | No             | The site's ID; has a search box                                 |
| "Account"                                                                                                               | Yes, always    | The site's name; has a search box                               |
| "First Invoice Date", "Renewal Date", "Created Date"                                                                    | Yes            | Dates as `MM/dd/YYYY`, so the year can be wrong around New Year |
| "Risk Score"                                                                                                            | Yes, always    | The score with its unit, such as "40%"                          |
| "Super Admin"                                                                                                           | No             | The username of the site's first admin                          |
| "Address"                                                                                                               | No             | The address, in full in a tooltip                               |
| "Users", "Active Users", "Groups"                                                                                       | No             | Counts                                                          |
| "Active Groups", "Activity"                                                                                             | Yes            | Counts                                                          |
| "Manual Tasks", "Scheduled tasks", "Schedules", "Tags", "Follow and Assign", "Checklist", "NFC", "Reports", "Time/Cost" | No             | Counts                                                          |

The activity counts ("Activity", "Manual Tasks", "Scheduled tasks", "Tags", "Follow and Assign", "Checklist", "NFC" and "Time/Cost") cover January 2019 to December 2023 only, and "Schedules" and "Reports" are always 0. Every column except "UUID", "Super Admin" and "Address" sorts, in the browser.

## Inputs

| Field          | Type                             | Required | Default               | Rules and messages                                                 |
| -------------- | -------------------------------- | -------- | --------------------- | ------------------------------------------------------------------ |
| UUID search    | Text                             | No       | Empty                 | Keeps the loaded rows whose ID contains the text, ignoring case.   |
| Account search | Text                             | No       | Empty                 | Keeps the loaded rows whose name contains the text, ignoring case. |
| Columns        | Checkboxes, under "Show Columns" | No       | As in the table above | Every column except "Account" and "Risk Score".                    |

The two searches apply together. Each search box has the placeholder "Search name", whatever the column, with "Search" (off while the box is empty) and "Reset" (off while no search is set). The [Activity Report](#activity-report) dialog has the report's two dates.

## Actions

| Action                                     | Who              | What happens                                                                                                                                | API                                                                                                                                                                            |
| ------------------------------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Open the page                              | Anyone signed in | Loads the table.                                                                                                                            | [`GET /cs-dashboard`](https://docs.snapfix.com/engineering-reference/api/staff.md#get-cs-dashboard)                                                                            |
| Search, sort, show or hide columns         | Anyone signed in | Changes the view of the loaded rows.                                                                                                        | None                                                                                                                                                                           |
| "Generate Activity Report" (Actions menu)  | Anyone signed in | Opens [Activity Report](#activity-report).                                                                                                  | None                                                                                                                                                                           |
| "Generate" (Activity Report)               | Anyone signed in | Starts the activity spreadsheet for the two dates and shows its link. The server picks the sites.                                           | [`POST ?action=kpi_job_chats_created_day_xlsx_v2_webadmin`](https://docs.snapfix.com/engineering-reference/api/staff.md#post-actionkpi_job_chats_created_day_xlsx_v2_webadmin) |
| "Generate User List Report" (Actions menu) | Anyone signed in | Starts the user list spreadsheet, with a spinner over the whole page; on success opens [User List Report](#user-list-report) with its link. | [`POST ?action=paying_sales_trial_account_users_webadmin`](https://docs.snapfix.com/engineering-reference/api/staff.md#post-actionpaying_sales_trial_account_users_webadmin)   |
| "document"                                 | Anyone signed in | Opens the outside guide in a new tab.                                                                                                       | None                                                                                                                                                                           |

## States

* **Loading:** the table shows its spinner until the rows arrive; the whole page shows a spinner while the user list report starts.
* **Empty:** an answer with no sites leaves the table without rows.
* **Error:** a failed table load shows no message and leaves the table empty, like a result with no sites. A failed report shows the server's message; the Activity Report dialog stays as it was, and the User List Report dialog does not open.
* **No permission:** none in the app.

## Dialogs and sheets

### Activity Report

Opened from the Actions menu.

| Field      | Type | Required | Default                 | Rules and messages                                                                                                                            |
| ---------- | ---- | -------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Start Date | Date | Yes      | Seven days before today | Days after yesterday cannot be picked. Once the end date changes, days more than three months before it cannot be picked either.              |
| End Date   | Date | Yes      | Yesterday               | Days after yesterday cannot be picked. Once the start date changes, days more than three months and one day after it cannot be picked either. |

Each three-month limit is set only when the other date changes, and dates already picked are not checked again, so a longer range can still be sent. "Generate" is disabled while a date is empty or the start is after the end, with no message saying why. "Cancel" closes the dialog; while the request runs, it is disabled and the dialog cannot be closed.

After a success the dates and "Generate" give way to the warning "Copy this URL and paste it into a new browser tab. It will not be immediately available so you may have to click on Refresh 1-2 mins later and the Excel file will become available." and the file's link, with a copy button. The file has a random name, but it opens for anyone who has the link. Only "Cancel" is left.

### User List Report

Opens once "Generate User List Report" succeeds, already showing the same warning and link, with only "Cancel". The file lists the users of the paying and sales-trial sites with their email addresses and mobile numbers, and its link opens for anyone who has it.


---

# 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/staff/cs-dashboard.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.
