> 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/site-reports.md).

# Site reports

{% 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/site-reports.md).
{% endhint %}

**Site reports** make the **Performance report**, a spreadsheet at site level for comparing performance month by month or quarter by quarter. Site admins open it from "Site Reports" in the side menu. While a **multi-site** is selected, the menu item and the page are called "Multi-Site Reports", and the page reports on the multi-site's sites one at a time, picked in its header. The list shows all of the user's performance reports. The page is web only.

## Rules

* The side menu shows "Site Reports" to role "Admin" while no multi-site is selected, and "Multi-Site Reports" to every user while a multi-site is selected \[[ASK-119](https://github.com/snapfix/docs/blob/main/ASK.md#ask-119-who-should-see-site-reports-and-multi-site-reports)] ([Site reports](https://docs.snapfix.com/how-the-apps-work/screens/reports/site-reports.md)).
* The route admits role "Admin" and group admins of the selected site, so a group admin can open the page by its address. Anyone else goes to `/fix`. A site change to a site where the user is not role "Admin" sends the user to `/fix`, group admins included ([Site reports](https://docs.snapfix.com/how-the-apps-work/screens/reports/site-reports.md#actions)).
* The page has one report type and two filters: groups and the created date ([Site reports](https://docs.snapfix.com/how-the-apps-work/screens/reports/site-reports.md#inputs)).
* Without a multi-site, the group filter lists every group the user belongs to, across all their sites, not only the selected site's \[[ASK-117](https://github.com/snapfix/docs/blob/main/ASK.md#ask-117-should-site-reports-on-one-site-list-only-that-sites-groups)]. With a multi-site, it lists the groups of the site chosen in the header ([Site reports](https://docs.snapfix.com/how-the-apps-work/screens/reports/site-reports.md#inputs)).
* The report ignores the chosen dates and covers the same number of days up to today ([`performance_report_excel`](https://docs.snapfix.com/engineering-reference/api/reports.md#post-actionperformance_report_excel)).
* Creating a report skips the group permission check that [Task reports](https://docs.snapfix.com/product/features/reports/task-reports.md) makes, and the server checks no role or group membership ([Site reports](https://docs.snapfix.com/how-the-apps-work/screens/reports/site-reports.md#actions)).
* The list holds every performance report of the user, with no date limit; the filters do not change it ([`performance_reports`](https://docs.snapfix.com/engineering-reference/api/reports.md#post-actionperformance_reports)). Only a delete takes a report off it.
* While a report made in the last 24 hours is below 100%, the list is asked for again after 3, 6, 9 and 12 seconds, then every 10 seconds ([Site reports](https://docs.snapfix.com/how-the-apps-work/screens/reports/site-reports.md#states)).
* Download, delete and the public file link work as on [Task reports](https://docs.snapfix.com/product/features/reports/task-reports.md#the-list).

## Flow

```mermaid
flowchart TD
    menu["Side menu: Site Reports, or Multi-Site Reports"] --> page["Open the page"]
    page --> groups["Load the group filter"]
    groups --> pick["Pick the Performance report card"]
    pick --> create["Create"]
    create --> queued["Report row added, spreadsheet built after the answer"]
    queued --> poll["The list asks again, every 3 to 10 seconds"]
    poll --> done["100%: Download"]
```

## Platforms

| Capability                        | Web                                         | iOS | Android |
| --------------------------------- | ------------------------------------------- | --- | ------- |
| Performance report, with its list | Yes, "Site Reports" or "Multi-Site Reports" | No  | No      |
| Site selector for a multi-site    | Yes, in the page header                     | No  | No      |

## Screens

* [Site reports](https://docs.snapfix.com/how-the-apps-work/screens/reports/site-reports.md): web, for one site or a multi-site.

## API and data

* [`performance_report_excel`](https://docs.snapfix.com/engineering-reference/api/reports.md#post-actionperformance_report_excel) makes the report, [`performance_reports`](https://docs.snapfix.com/engineering-reference/api/reports.md#post-actionperformance_reports) lists the user's reports, and [`delete_user_report`](https://docs.snapfix.com/engineering-reference/api/reports.md#post-actiondelete_user_report) deletes one.
* The group filter: [`GET /v1/app/parents/list/businesses`](https://docs.snapfix.com/engineering-reference/api/groups.md#get-v1appparentslistbusinesses), with the site only while a multi-site is selected.
* Tables: [`report_userreports`](https://docs.snapfix.com/engineering-reference/db/tables/report_userreports.md).

## Depends on

* [Task reports](https://docs.snapfix.com/product/features/reports/task-reports.md): the same layout, list and file rules.
* [Groups](https://docs.snapfix.com/product/features/groups/groups.md): the groups the filter offers.
* [Switching sites](https://docs.snapfix.com/product/features/groups/site-switching.md) and [Multi-Site Console](https://docs.snapfix.com/product/features/console/multi-site-console.md): the single-site and multi-site views.
* [Site users](https://docs.snapfix.com/product/features/console/site-users.md) and [Group members](https://docs.snapfix.com/product/features/groups/group-members.md): the site admin and group admin roles the page uses.

## Edge cases

* **No report yet:** "No data available", with "0 of 0" ([Site reports](https://docs.snapfix.com/how-the-apps-work/screens/reports/site-reports.md#states)).
* **A failed report:** its "Download" does nothing.
* **First multi-site visit:** the console's welcome popup, "Welcome to your Multi-Site Console!", shows on the page ([Site reports](https://docs.snapfix.com/how-the-apps-work/screens/reports/site-reports.md#layout)).
* **Refused users:** the page shows no text to a refused user, though the language file has one for each view \[[ASK-119](https://github.com/snapfix/docs/blob/main/ASK.md#ask-119-who-should-see-site-reports-and-multi-site-reports)].


---

# 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/site-reports.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.
