# NPS

<figure><img src="/files/GDL5DbHWhssPjELUGBgG" alt="" width="281"><figcaption><p>The NPS template bot.</p></figcaption></figure>

## Template overview &#x20;

Use this template to gather valuable feedback about your business using the NPS score system. Users will be asked about their satisfaction with your services, their likelihood to recommend you to others, and suggestions for improvement. Based on their ratings, a Net Promoter Score (NPS) will be calculated.

{% hint style="info" %}
Learn more about the NPS system [here](https://www.netpromoter.com/know/).
{% endhint %}

Keep reading to learn how you can customize this template for yourself!

## How to customize this template&#x20;

{% hint style="info" %}
Make sure to always [update the NLP](https://docs.chatlayer.ai/understanding-users/natural-language-processing-nlp#updating-the-nlp) after loading a template!
{% endhint %}

To save your users' ratings and feedback, this chatbot uses [Tables](/navigation/tables.md) to store the NPS ratings.

<figure><img src="/files/1IDTqn7dji9Gsm3rJMzA" alt=""><figcaption><p>The Table to store NPS ratings.</p></figcaption></figure>

### Flow: NPS

#### Block: Check rating

This block checks the rating a user gives, after which it is stored as the variable `{nps}`. If they give a rating of 9 or higher, the user will be classified as a 'promoter' in the variable {`respondent}` and redirected to the *Promoter response* block asking them why they like your services (response stored as the `{positive_feedback}` variable.&#x20;

If they gave a rating from 7 to 8, they will be classified as 'passive'; if they gave a rating lower than 7, they are classified as 'detractor'. Both passives and detractors will be redirected to the *Improvement Feedback* block. There the bot asks them what can improved (response stored as `{negative_feedback}`).

#### Block: Add record to Table

<figure><img src="/files/zAJjEQewvvgYr0wbP5Mo" alt="" width="323"><figcaption><p>Add record to Table block.</p></figcaption></figure>

This Action block adds the gathered values to the ratings table.

***

That's it, now your bot can easily collect NPS ratings and feedback from your users!&#x20;

{% hint style="success" %}
Once you have collected ratings from enough users you can use these to calculate your business' overall Net Promoter Score. You can learn how to calculate this score [here](https://customergauge.com/blog/how-to-calculate-the-net-promoter-score#:~:text=program%20more%20reliable-,The%20NPS%20Calculation%20Formula,is%20a%20score%20of%2040.).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chatlayer.ai/start-quickly/bot-templates/nps.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
