> 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/notifications/feedback-surveys.md).

# Feedback surveys

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

**Feedback surveys** ask people what they think of Snapfix. They run through **Survicate**, an outside survey tool, on the web and in both mobile apps: the web asks Survicate to show a survey on nine pages, and the apps report ten screens to it. Which surveys exist, and who sees them, is set in Survicate, not in these repos. Both apps also hold Snapfix's own **NPS survey** (how likely people are to recommend Snapfix) and **product feedback survey** (four questions), but nothing opens either of them today \[[ASK-10](https://github.com/snapfix/docs/blob/main/ASK.md#ask-10-which-differences-between-the-ios-and-android-apps-are-intended)]. Each survey carries the signed-in person's details to Survicate.

## Rules

### Survicate on the web

* Survicate is switched on in the web build (web\_app\_v2 @ 0989b8e685, `src/app/shared/config.ts:120`).
* Each page with a survey asks Survicate to show its own survey by name, such as `WebGroupListingScreen` on the Fix page, and forces the display (`src/app/shared/types/survicate.type.ts:1`; `src/app/services/survicate/survicate.service.ts:202-205`). The pages are listed under [Screens](#screens).
* The Fix page asks once the browser is idle, at most three seconds after it loads, then waits two seconds more (`src/app/pages/fix/fix.component.ts:300-337`).
* A survey closes when the person moves to another page (`src/app/app.component.ts:132-137`).
* A survey that a person closed without answering, or that closed on a page change, is held back for them in that browser until they sign in again (`survicate.service.ts:110-120`, `:214-226`).
* Nothing in the code holds back a survey after an answer; whether it shows again depends on its settings in Survicate \[[ASK-165](https://github.com/snapfix/docs/blob/main/ASK.md#ask-165-should-a-web-survey-come-back-after-it-was-answered)].
* Before each survey the web sends Survicate the person's ID, name, email address, phone number, device and app details, language and time zone. Several pages add the site's ID, name and customer type and the person's role \[[ASK-116](https://github.com/snapfix/docs/blob/main/ASK.md#ask-116-may-the-survey-tool-receive-users-contact-details-and-site-names)] (`survicate.service.ts:130-200`, `fix.component.ts:320-337`).

### Survicate in the apps

* Both apps start Survicate when they launch and report ten screens as the person enters and leaves them; Survicate decides whether a survey shows (ios @ aa31967ac8, `Appdelegate/AppDelegate.swift:154`, `Managers/SurvicateManager.swift:4-17`; android @ 86068bfeea, `app/src/main/java/gmail/com/snapfixapp/MyApplication.java:153`, `app/src/main/java/gmail/com/snapfixapp/activity/BusinessListingActivity.java:453`). The screens are listed under [Screens](#screens).
* Both apps send Survicate the person's name, email address and phone number, the site's ID, name and customer type, the person's role, and the group and task in view \[[ASK-116](https://github.com/snapfix/docs/blob/main/ASK.md#ask-116-may-the-survey-tool-receive-users-contact-details-and-site-names)] (ios @ aa31967ac8, `Managers/SurvicateManager.swift:66-180`; android @ 86068bfeea, `BusinessListingActivity.java:5113-5177`, `app/src/main/java/gmail/com/snapfixapp/helper/SurveyHelper.kt:13-57`).
* Signing out clears the person's details from Survicate on both apps (ios @ aa31967ac8, `Managers/SurvicateManager.swift:108-111`; android @ 86068bfeea, `app/src/main/java/gmail/com/snapfixapp/activity/MyProfileActivity.kt:2340-2355`).

### Snapfix's own surveys

* Neither app opens its NPS or product feedback survey. On iOS their only trigger is commented out with the note "Commented as added survicate for replacement"; Android's sheets are never created, and its check was switched off in 6.10.41 "because of new survicate lib" \[[ASK-10](https://github.com/snapfix/docs/blob/main/ASK.md#ask-10-which-differences-between-the-ios-and-android-apps-are-intended)] ([NPS survey](https://docs.snapfix.com/how-the-apps-work/screens/notifications/nps-survey.md); android @ 86068bfeea, `app/src/main/java/gmail/com/snapfixapp/fragment/GroupListingFragment.java:1117-1123`).
* What they would do: when the server marks a survey due for the person, inside its daily window, the group list would show it. The NPS survey asks for a score from 1 to 10, not the usual 0 to 10 \[[ASK-163](https://github.com/snapfix/docs/blob/main/ASK.md#ask-163-if-the-in-app-nps-survey-stays-should-it-run-from-0-to-10)], then an optional reason. The product feedback survey asks one choice question and three text questions. The steps, limits and texts are in the [NPS survey](https://docs.snapfix.com/how-the-apps-work/screens/notifications/nps-survey.md) and the [Product feedback survey](https://docs.snapfix.com/how-the-apps-work/screens/notifications/feedback-survey.md).
* The server's survey routes have no caller ([Notifications API](https://docs.snapfix.com/engineering-reference/api/notifications.md)).
* The pre-registration questionnaire at sign-up is a different survey: see [Survey setup](https://docs.snapfix.com/product/features/staff/survey-setup.md).

### Limits and plans

* No plan or role limits who sees a survey in the code; Survicate's own targeting decides.

## Flow

```mermaid
flowchart TD
  open["Person opens a page or screen with a survey"] --> plat{"Platform"}
  plat -- web --> idle["The page asks Survicate for its survey; the Fix page waits for idle, then 2 seconds"]
  idle --> held{"Closed without an answer in this browser since the last sign-in?"}
  held -- yes --> none["No survey"]
  held -- no --> traits["Person's details sent, survey shown if Survicate has one"]
  traits --> leave{"Page change or close?"}
  leave -- yes --> closed["Closed, held back until the next sign-in"]
  plat -- "iOS or Android" --> report["The app reports the screen to Survicate"]
  report --> decide["Survicate decides whether a survey shows"]
  own["Snapfix's own NPS and product feedback surveys"] --> never["Never opened today"]
```

## Platforms

| Capability                                | Web                                                                                                                                         | iOS                                                                                                                                                     | Android                                                                                                                                                            |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Survicate                                 | Yes, nine pages ask for their survey                                                                                                        | Yes, ten screens reported                                                                                                                               | Yes, ten screens reported                                                                                                                                          |
| Held back after closing without an answer | Until the next sign-in                                                                                                                      | Set in Survicate                                                                                                                                        | Set in Survicate                                                                                                                                                   |
| Person's details sent to Survicate        | Yes \[[ASK-116](https://github.com/snapfix/docs/blob/main/ASK.md#ask-116-may-the-survey-tool-receive-users-contact-details-and-site-names)] | Yes \[[ASK-116](https://github.com/snapfix/docs/blob/main/ASK.md#ask-116-may-the-survey-tool-receive-users-contact-details-and-site-names)]             | Yes \[[ASK-116](https://github.com/snapfix/docs/blob/main/ASK.md#ask-116-may-the-survey-tool-receive-users-contact-details-and-site-names)]                        |
| NPS survey                                | No                                                                                                                                          | Built, never opens \[[ASK-10](https://github.com/snapfix/docs/blob/main/ASK.md#ask-10-which-differences-between-the-ios-and-android-apps-are-intended)] | Built as a sheet, never opens \[[ASK-10](https://github.com/snapfix/docs/blob/main/ASK.md#ask-10-which-differences-between-the-ios-and-android-apps-are-intended)] |
| Product feedback survey                   | No                                                                                                                                          | Built, never opens \[[ASK-10](https://github.com/snapfix/docs/blob/main/ASK.md#ask-10-which-differences-between-the-ios-and-android-apps-are-intended)] | Built as a sheet, never opens \[[ASK-10](https://github.com/snapfix/docs/blob/main/ASK.md#ask-10-which-differences-between-the-ios-and-android-apps-are-intended)] |

## Screens

Web pages that ask Survicate for a survey:

* [Fix](https://docs.snapfix.com/how-the-apps-work/screens/tasks/fix.md): `WebGroupListingScreen`.
* [Group tasks](https://docs.snapfix.com/how-the-apps-work/screens/tasks/group-tasks.md): `WebTaskListingScreen`, and `WebRoomTaskListingScreen` and `WebAreaTaskListingScreen` for a room's or an area's tasks.
* [Task detail](https://docs.snapfix.com/how-the-apps-work/screens/tasks/task-detail.md): `WebTaskScreen`.
* [Planned tasks](https://docs.snapfix.com/how-the-apps-work/screens/planner/planned-tasks.md): `WebSchedulerScreen`.
* [Asset registers](https://docs.snapfix.com/how-the-apps-work/screens/assets/registers.md), [Asset list](https://docs.snapfix.com/how-the-apps-work/screens/assets/asset-list.md) and [Asset detail](https://docs.snapfix.com/how-the-apps-work/screens/assets/asset-detail.md): `WebAssetRegListingScreen`, `WebAssetListingScreen` and `WebAssetScreen`.
* [Dashboard](https://docs.snapfix.com/how-the-apps-work/screens/reports/dashboard.md): `WebDashboardScreen`.
* [Task reports](https://docs.snapfix.com/how-the-apps-work/screens/reports/task-reports.md) and [Asset reports](https://docs.snapfix.com/how-the-apps-work/screens/reports/asset-reports.md): `WebReportsTasksScreen` and `WebReportsAssetsScreen`.

App screens reported to Survicate, the same on iOS and Android:

* [Group list](https://docs.snapfix.com/how-the-apps-work/screens/groups/group-list.md) (`GroupListingScreen`), [Group tasks](https://docs.snapfix.com/how-the-apps-work/screens/tasks/group-tasks.md) (`TaskListingScreen`), [Task detail](https://docs.snapfix.com/how-the-apps-work/screens/tasks/task-detail.md) (`TaskScreen`) and [Checklist](https://docs.snapfix.com/how-the-apps-work/screens/checklists/checklist.md) (`ChecklistPopup`).
* [Asset registers](https://docs.snapfix.com/how-the-apps-work/screens/assets/registers.md) (`AssetRegisterListingScreen`), [Asset list](https://docs.snapfix.com/how-the-apps-work/screens/assets/asset-list.md) (`AssetListingScreen`) and [Asset detail](https://docs.snapfix.com/how-the-apps-work/screens/assets/asset-detail.md) (`AssetScreen`).
* [Chats](https://docs.snapfix.com/how-the-apps-work/screens/chat/chats.md) (`ChatListingScreen`), [Planned tasks](https://docs.snapfix.com/how-the-apps-work/screens/planner/planned-tasks.md) (`SchedulerScreen`) and the [rooms list](https://docs.snapfix.com/how-the-apps-work/screens/rooms.md) (`RoomListingScreen`).

Snapfix's own surveys, which never open:

* [NPS survey](https://docs.snapfix.com/how-the-apps-work/screens/notifications/nps-survey.md) and [Product feedback survey](https://docs.snapfix.com/how-the-apps-work/screens/notifications/feedback-survey.md).

## API and data

* Survicate is outside Snapfix: the web and the apps talk to it directly, and no Snapfix endpoint carries the surveys or the person's details.
* The web reads the person's role for the traits with `GET /v1/app/user/get-role` ([Users API](https://docs.snapfix.com/engineering-reference/api/users.md)).
* Snapfix's own surveys would use `survey_check` and `survey_feedback`, which have no caller, like the NPS actions and `/v1/app/user/survey` ([Notifications API](https://docs.snapfix.com/engineering-reference/api/notifications.md)).
* Tables: [`tPri_UserSurvey`](https://docs.snapfix.com/engineering-reference/db/tables/tpri_usersurvey.md) says whether a survey is due for a person; no code in the repos creates its rows \[[ASK-10](https://github.com/snapfix/docs/blob/main/ASK.md#ask-10-which-differences-between-the-ios-and-android-apps-are-intended)]. [`tPri_Log_Survey`](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_survey.md) would receive the answers through `survey_feedback`, and [`tPri_Log_NPS`](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_nps.md) those of the uncalled `nps_feedback` (php-apis @ 238ca4414e, `htmlphp/api/snapfix/class/class.functions.php:27389`, `:35441`).

## Depends on

* [Groups](https://docs.snapfix.com/product/features/groups/groups.md), [Tasks](https://docs.snapfix.com/product/features/tasks/tasks.md), [Chat](https://docs.snapfix.com/product/features/chat/chat.md), [Checklists](https://docs.snapfix.com/product/features/checklists/checklists.md), [Planned tasks](https://docs.snapfix.com/product/features/planner/planned-tasks.md), [Asset registers](https://docs.snapfix.com/product/features/assets/asset-registers.md), [Rooms and areas](https://docs.snapfix.com/product/features/rooms/rooms-and-areas.md), [Dashboard](https://docs.snapfix.com/product/features/reports/dashboard.md) and [Task reports](https://docs.snapfix.com/product/features/reports/task-reports.md): the pages and screens that ask for surveys.
* [Sign-in](https://docs.snapfix.com/product/features/account/sign-in.md): signing in again clears what the web holds back, and signing out clears the apps' details in Survicate.
* [Switching sites](https://docs.snapfix.com/product/features/groups/site-switching.md): the site in a survey's details is the one selected when it shows.
* [Marketing popups](https://docs.snapfix.com/product/features/notifications/marketing-popups.md): the web's Fix page checks for popups at the same moment.

## Edge cases

* **Answered surveys on the web:** nothing in the code stops an answered survey from showing again \[[ASK-165](https://github.com/snapfix/docs/blob/main/ASK.md#ask-165-should-a-web-survey-come-back-after-it-was-answered)].
* **Shared browser:** what the web holds back applies only to the person who closed the survey; another person's sign-in clears it (`survicate.service.ts:110-120`, `:214-226`).
* **Personal data:** the web and both apps send names, email addresses and phone numbers to Survicate \[[ASK-116](https://github.com/snapfix/docs/blob/main/ASK.md#ask-116-may-the-survey-tool-receive-users-contact-details-and-site-names)].
* **Offline:** the web and the apps have no offline rule for Survicate. Snapfix's own iOS surveys would lose an answer sent offline, and accept a box of spaces as an answer.
* **Several sites:** the site in the details is the selected one; on the web's Fix page, the stored site.
* **Time zones:** the web sends the device's time zone and time with each survey.


---

# 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/notifications/feedback-surveys.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.
