> For the complete documentation index, see [llms.txt](https://docs.airdev.co/canvas/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.airdev.co/canvas/5.0/canvas-library/popups/net-promoter-score-nps-popup.md).

# Net Promoter Score (NPS) Popup

## Overview

This popup is helpful to track retention and loyalty from your users. A few use cases include:

* Tracking how likely are your customers to recommend you
* Hear feedback from users about their experience using your application

## Structure

* This block will include a **NPS Score** data type that includes 3 data fields:
  * **Feedback** (text):  Used to capture qualitative feedback provided by the user
  * **NPS score** (number):  NPS score (between 1-10) submitted by the user
  * **User** (user): User who submitted the NPS
* **nps\_scores\_template (of type number)** reusable element
  * This reusable includes the UI and logic for selecting and submitting an NPS score. When **Group Main select option** is clicked, it will display the selected number in the reusable element and trigger a custom workflow to create an entry for the submitted NPS score in the database.
  * If using **nps\_scores\_template** as part of a form UI and not in the NPS Score Popup then please remove the custom workflow trigger *save nps score* from the workflow when *Group main selection option is clicked*. In the form's save button, you'll simply reference **nps\_scores\_template's number** to save the NPS score.
* This block uses the **Toolbox plugin**'s list of numbers element

## How to set up

* Add a workflow on the page to show **Popup NPS score**
  * In this workflow, before the show popup step, add a new workflow step to *trigger custom workflow from a reusable element*. Select **nps\_scores\_template** for the reusable element and select *reset nps score*.
* Add additional workflows to **Button Submit**
  * For example, you may want to send an email or display these records in the admin portal
