> 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/notifications/nps-survey.md).

# NPS survey

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

Asks "How likely are you to recommend Snapfix to a friend or colleague?" as a score from 1 to 10, then "Why did you give us this score?". The screen never opens in the current app \[[ASK-10](https://github.com/snapfix/docs/blob/main/ASK.md#ask-10-which-differences-between-the-ios-and-android-apps-are-intended)].

**Not shown in the current app.** The survey opens only from the group list's survey check (`checkForNPS`), which runs when the `CHECK_NPS` notification arrives. The only observer of that notification is commented out with the note "Commented as added survicate for replacement", and so are the only two posts, which would have sent it when the user went back from a task list or an asset list to the group list (ios @ aa31967ac8, `SnapFix/BusinessListingVC.swift:1458`, `:3070-3076`, `:3130-3139`; `SnapFix/HomeVC.swift:544`; `SnapFix/Asset/AssetList/AssetListVC.swift:403`). No other code opens `NpsRatingVC`. Survicate surveys run instead: both apps start the Survicate SDK and report their screens to it, the group list among them, and which surveys it shows is set in Survicate, not in these repos (ios @ aa31967ac8, `Appdelegate/AppDelegate.swift:154`, `Managers/SurvicateManager.swift:59-60`, `SnapFix/BusinessListingVC.swift:234`; android @ 86068bfeea, `app/build.gradle:391`, `app/src/main/java/gmail/com/snapfixapp/MyApplication.java:153`, `app/src/main/java/gmail/com/snapfixapp/activity/BusinessListingActivity.java:453`) \[[ASK-10](https://github.com/snapfix/docs/blob/main/ASK.md#ask-10-which-differences-between-the-ios-and-android-apps-are-intended)].

* **Where:** iOS: over the [group list](https://docs.snapfix.com/how-the-apps-work/screens/groups/group-list.md), when the survey check finds an NPS survey due ([Actions](#actions)).
* **Who:** nobody today. The check would show it to the signed-in users the server marks as due, while the device's time is inside the server's daily window. The app checks no role (`SnapFix/BusinessListingVC.swift:3078-3092`; `SnapFix/NPS/Models/NPSCheckDataModel.swift:2-22`).
* **Feature:** [Feedback surveys](https://docs.snapfix.com/product/features/notifications/feedback-surveys.md)

## Layout

The survey has three steps, each shown over the dimmed group list. A cross at the top right of every step closes the whole survey (`SnapFix/BusinessListingVC.swift:3130-3139`; `SnapFix/PMFS/PMFSBaseVC.swift:58-63`).

1. **Score** (`SnapFix/Storyboards/NpsSB.storyboard:24-305`): "How likely are you to recommend Snapfix to a friend or colleague?"; ten buttons in one row, "1" to "10", with the chosen one marked; "Not at all likely" at the left end and "Extremely likely" at the right; "Submit"; and "Remind Me Later".
2. **Reason** (`:309-449`): "Why did you give us this score?"; a text box with a counter below it, "0/500" while empty; and "Done".
3. **Thank you** (`:456-555`): "Thank you for submitting your score!" with "We appreciate your feedback." below it, and an animation that plays once.

## Inputs

| Field                             | Type                            | Required          | Default | Rules and messages                                                                                                                                                                                                                                                                                                                                                                                                     |
| --------------------------------- | ------------------------------- | ----------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Score                             | One of ten buttons, "1" to "10" | Yes, for "Submit" | None    | "Submit" stays off until a score is chosen. Each button's place in the row, which matches its number, is the score, so 0 cannot be chosen; the usual NPS scale runs from 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)] (`SnapFix/NPS/NpsRatingVC.swift:34-68`; `NpsSB.storyboard:62-151`, `:290-299`). Sent as `nps_score`. |
| "Why did you give us this score?" | Text, several lines             | No                | Empty   | Up to 500 characters; typing stops at 500. The counter shows the length as "n/500". Empty is accepted, and the text is sent as typed, as `text_feedback` (`SnapFix/NPS/NpsRatingNotesVC.swift:24`, `:36-42`, `:79-88`).                                                                                                                                                                                                |

## Actions

| Action                       | Who                                             | What happens                                                                                                                                                                                                                                                                                                                                                                                                            | API                                                                                                                                             |
| ---------------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Choose a score               | A user the survey opened for                    | Marks the score and turns "Submit" on.                                                                                                                                                                                                                                                                                                                                                                                  | None                                                                                                                                            |
| "Submit"                     | Same                                            | Opens the reason step (`SnapFix/NPS/NpsRatingVC.swift:71-77`).                                                                                                                                                                                                                                                                                                                                                          | None                                                                                                                                            |
| "Done" (reason step)         | Same                                            | Sends the score and the reason as `survey_data`, with `survey` "nps". On success the thank-you step opens. A refused answer shows the server's message in a toast, and any other failure "Something went wrong. Please try again."; the reason step stays open (`SnapFix/NPS/NpsRatingNotesVC.swift:60-67`; `SnapFix/PMFS/PMFSBaseVC.swift:92-134`).                                                                    | php-apis `?action=survey_feedback`, in the [Notifications API](https://docs.snapfix.com/engineering-reference/api/notifications.md) (no caller) |
| "Remind Me Later"            | Same                                            | Closes the survey, then sends `remind_me_later` 1 (`NpsRatingVC.swift:79-85`).                                                                                                                                                                                                                                                                                                                                          | As for "Done"                                                                                                                                   |
| Cross (score or reason step) | Same                                            | Closes the survey, then sends `user_dismiss` 1. The score and the reason are not sent (`NpsRatingVC.swift:87-93`; `NpsRatingNotesVC.swift:69-76`).                                                                                                                                                                                                                                                                      | As for "Done"                                                                                                                                   |
| Cross (thank-you step)       | Same                                            | Closes the survey (`SnapFix/NPS/NpsCompletedVC.swift:38-42`).                                                                                                                                                                                                                                                                                                                                                           | None                                                                                                                                            |
| Survey check                 | The app, when `CHECK_NPS` arrives (never today) | Asks the server whether a survey is due. The answer gives the survey (`nps` or `pmfs`), whether it is pending, and a daily window as "HH:mm" start and end times. The NPS survey opens when the answer is `nps`, the survey is pending and the device's time is inside the window. A blank start or end counts as any time; a time the app cannot read counts as outside (`SnapFix/BusinessListingVC.swift:3070-3139`). | php-apis `?action=survey_check`, in the [Notifications API](https://docs.snapfix.com/engineering-reference/api/notifications.md) (no caller)    |

## States

* **Loading:** none. Each step appears at once.
* **Empty:** none.
* **Error:** a failed send shows a toast ([Actions](#actions)). After "Remind Me Later" or a cross the survey has already closed.
* **No permission:** none. The server decides who gets the survey.
* **Offline (mobile):** the check does not run. "Done" does nothing and shows nothing, and the reason step stays open. "Remind Me Later" and the cross close the survey and send nothing (`SnapFix/PMFS/PMFSBaseVC.swift:116-134`).

## Dialogs and sheets

None. The steps are views pushed in turn inside one survey screen.

## Platform differences

iOS only. Android has the same survey, with the same 1-to-10 scale and texts, as a bottom sheet (`NPSBottomSheet`), but no code creates it, and its survey check is commented out with the note "Commented in v6.10.41 because of new survicate lib" (android @ 86068bfeea, `app/src/main/java/gmail/com/snapfixapp/bottomSheet/NPSBottomSheet.java:49-69`, `app/src/main/res/layout/bottomsheet_nps.xml:56-383`, `app/src/main/java/gmail/com/snapfixapp/fragment/GroupListingFragment.java:1117-1123`). Unlike iOS, the sheet trims the reason and sends `survey_data` as JSON text rather than as an object (`NPSBottomSheet.java:250-260`).


---

# 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/notifications/nps-survey.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.
