> 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/product/features/reports/ops-dashboard.md).

# Ops 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)). [Source on GitHub](https://github.com/snapfix/docs/blob/main/product/features/ops-dashboard.md).
{% endhint %}

The **Ops dashboard** gives site admins analytics on tasks, tags, rooms and areas, users, sites and housekeeping, with filters, drill-downs, exports and **saved views**. It is a separate web app (ops\_dashboard\_fe) with its own API (ops\_dashboard\_be). The web app shows it in a frame on the "Ops Dashboard" tab of **Dashboard & Reports**, on sites where the task dashboard is switched on, and passes the site and the user's access token to it in the frame's address. The apps have no ops dashboard.

## Rules

* The tab shows only for role "Admin", and not on sites whose task dashboard setting (`taskDashboardEnabled`) is 0 ([Ops dashboard](https://docs.snapfix.com/how-the-apps-work/screens/reports/ops-dashboard.md)).
* The page has no role check of its own, so any user of such a site who knows its address can open it. The analytics API then refuses anyone who is not an admin of the site.
* The frame shows only when the site's setting is 1 and the build is a production build. Otherwise the tab shows "Ops Dashboard is not enabled" ([Ops dashboard](https://docs.snapfix.com/how-the-apps-work/screens/reports/ops-dashboard.md#layout)).
* The frame's address carries the site's ID, the user's access token and the API's address. The frame's own event log drops the query string, but its Datadog set-up keeps it, so the token can reach Datadog.
* The analytics API answers only for sites where the user is a site admin and the task dashboard is on. Any other site gets `403` "Forbidden.", and a user with no such site gets "No accessible accounts found" ([Analytics request](https://docs.snapfix.com/engineering-reference/api/reports.md#analytics-request)).
* The API accepts expired tokens while its `SKIP_JWT_EXPIRY` setting is on, which the code marks as local testing only; the production value is not in the repos \[[ASK-12](https://github.com/snapfix/docs/blob/main/ASK.md#ask-12-which-settings-do-the-production-api-servers-use)] ([Analytics request](https://docs.snapfix.com/engineering-reference/api/reports.md#analytics-request)).
* How the task dashboard is turned on for a site is not in the repos: the only code that writes the setting is a staff action that no repo calls \[[ASK-118](https://github.com/snapfix/docs/blob/main/ASK.md#ask-118-how-is-the-ops-dashboard-switched-on-for-a-site)].
* Saved views belong to the user, not the site. A user keeps up to five views, the server's limit. A view name is 1 to 100 characters and unique among the user's views; a description is up to 500 characters ([Saved view object](https://docs.snapfix.com/engineering-reference/api/reports.md#saved-view-object), [`saved-views`](https://docs.snapfix.com/engineering-reference/api/reports.md#post-apianalyticssaved-views)).
* One view can be the user's default; the frame opens on it, with the tab it saved. Without a default it opens "Overview" ([Ops dashboard](https://docs.snapfix.com/how-the-apps-work/screens/reports/ops-dashboard.md#actions)).
* Only the owner can change or delete a view. A delete marks the row deleted and frees the name ([`DELETE saved-views/{view_id}`](https://docs.snapfix.com/engineering-reference/api/reports.md#delete-apianalyticssaved-viewsview_id)).
* "Fixed range" (default "Last month") applies when no dates are entered; entering dates sets it to "Not applied" ([Ops dashboard](https://docs.snapfix.com/how-the-apps-work/screens/reports/ops-dashboard.md#inputs)).
* Charts download as JPEG, a chart's series as CSV, and the task rows behind a number as CSV or Excel ([Ops dashboard](https://docs.snapfix.com/how-the-apps-work/screens/reports/ops-dashboard.md#actions)).
* The Housekeeping tab offers eight reports: "At a Glance", "Cleaning History", "Cleans by Room Type", "Housekeeper Benchmark", "Inspector Benchmark", "Training Needs", "Activity Log" and "Back to Back Reservations" ([Housekeeping reports](https://docs.snapfix.com/product/features/housekeeping/housekeeping-reports.md)).

## Flow

```mermaid
flowchart TD
    tab["Open the Ops Dashboard tab"] --> gate{"Site setting on and a production build?"}
    gate -- no --> off["Ops Dashboard is not enabled"]
    gate -- yes --> frame["Frame loads with the site ID, token and API address"]
    frame --> view{"Default saved view?"}
    view -- yes --> saved["Apply its filters and tab"]
    view -- no --> overview["Overview with the starting filters"]
    saved --> api["The frame calls the analytics API"]
    overview --> api
    api --> admin{"Admin of every site asked for, dashboard on?"}
    admin -- no --> denied["403: the frame shows its permission message"]
    admin -- yes --> charts["Tabs, charts and filters"]
    charts --> drill["Click a number: drill-down rows, CSV or Excel"]
    charts --> views["Save, update, star or delete a saved view"]
```

## Platforms

| Capability                                                                 | Web               | iOS | Android |
| -------------------------------------------------------------------------- | ----------------- | --- | ------- |
| Overview, Tasks, Tags, Rooms and Areas, Users, Sites and Housekeeping tabs | Yes, in the frame | No  | No      |
| Filters, drill-downs and exports                                           | Yes               | No  | No      |
| Saved views, up to five per user                                           | Yes               | No  | No      |

## Screens

* [Ops dashboard](https://docs.snapfix.com/how-the-apps-work/screens/reports/ops-dashboard.md): web.

## API and data

* Chart data: [`timeseries`](https://docs.snapfix.com/engineering-reference/api/reports.md#post-apianalyticstimeseries) (Overview, Tasks and Sites), [`tag-analytics`](https://docs.snapfix.com/engineering-reference/api/reports.md#post-apianalyticstag-analytics), [`room-area-analytics`](https://docs.snapfix.com/engineering-reference/api/reports.md#post-apianalyticsroom-area-analytics) and [`user-analytics`](https://docs.snapfix.com/engineering-reference/api/reports.md#post-apianalyticsuser-analytics).
* Drill-downs: [`drill-down`](https://docs.snapfix.com/engineering-reference/api/reports.md#post-apianalyticsdrill-down) and [`drill-down/export`](https://docs.snapfix.com/engineering-reference/api/reports.md#post-apianalyticsdrill-downexport).
* Saved views: [list or create](https://docs.snapfix.com/engineering-reference/api/reports.md#post-apianalyticssaved-views), [change](https://docs.snapfix.com/engineering-reference/api/reports.md#put-apianalyticssaved-viewsview_id), [delete](https://docs.snapfix.com/engineering-reference/api/reports.md#delete-apianalyticssaved-viewsview_id), [record an opening](https://docs.snapfix.com/engineering-reference/api/reports.md#post-apianalyticssaved-viewsview_idaccess) and [set the default](https://docs.snapfix.com/engineering-reference/api/reports.md#post-apianalyticssaved-viewsview_iddefault).
* Housekeeping reports: the `/api/reports/…` endpoints in the [Housekeeping API](https://docs.snapfix.com/engineering-reference/api/housekeeping.md), starting with [`accessible-properties`](https://docs.snapfix.com/engineering-reference/api/housekeeping.md#post-apireportsaccessible-properties).
* The shared request fields and errors: [Analytics request](https://docs.snapfix.com/engineering-reference/api/reports.md#analytics-request).
* Tables: [`saved_dashboard_views`](https://docs.snapfix.com/engineering-reference/db/tables/saved_dashboard_views.md) (the saved views) and [`tPri_Parent`](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parent.md) (the site setting `fTaskDashboardEnabled`).

## Depends on

* [Dashboard](https://docs.snapfix.com/product/features/reports/dashboard.md): the other analytics tab of Dashboard & Reports.
* [Housekeeping reports](https://docs.snapfix.com/product/features/housekeeping/housekeeping-reports.md): the reports of the Housekeeping tab.
* [Tasks](https://docs.snapfix.com/product/features/tasks/tasks.md), [Checklists](https://docs.snapfix.com/product/features/checklists/checklists.md), [Rooms and areas](https://docs.snapfix.com/product/features/rooms/rooms-and-areas.md), [Site tags](https://docs.snapfix.com/product/features/console/site-tags.md) and [Site users](https://docs.snapfix.com/product/features/console/site-users.md): the data behind the tabs and counters.
* [Sign-in](https://docs.snapfix.com/product/features/account/sign-in.md): the access token the frame sends with every request.
* [Switching sites](https://docs.snapfix.com/product/features/groups/site-switching.md): a site change rebuilds the frame's address.

## Edge cases

* **Several sites:** the frame asks for the first site's data at once and lets the server build the other sites' data in the background ([`timeseries`](https://docs.snapfix.com/engineering-reference/api/reports.md#post-apianalyticstimeseries)).
* **Large ranges:** drill-downs and their exports return every matching row, with no cap.
* **Saved views:** a sixth view gets "Maximum of 5 saved views allowed. Please delete an existing view first.", and a repeated name "A view with this name already exists"; in the frame, "+ Save View" is off at the limit ([`saved-views`](https://docs.snapfix.com/engineering-reference/api/reports.md#post-apianalyticssaved-views)).
* **Missing settings:** without a site ID or token the web tab shows an empty area; its messages, such as "Parent UUID is required" or "Failed to load the dashboard. Please try again.", are set but never shown. Opened on its own, the frame shows "Dashboard Configuration Required" ([Ops dashboard](https://docs.snapfix.com/how-the-apps-work/screens/reports/ops-dashboard.md#states)).
* **Session expired:** the frame shows "Your session has expired. Please refresh the page to continue." and sends a message to the web page, which does not listen for it ([Ops dashboard](https://docs.snapfix.com/how-the-apps-work/screens/reports/ops-dashboard.md#states)).
* **Third-party scripts:** the frame loads D3 and the Datadog scripts from public CDNs without integrity hashes.
* **Housekeeping:** the housekeeping board has its own dashboard ([Housekeeping dashboard](https://docs.snapfix.com/how-the-apps-work/screens/housekeeping/dashboard.md)).


---

# 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/product/features/reports/ops-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.
