How to Export Net Promoter Score (NPS) Data from Unique Chat

How to Export Net Promoter Score (NPS) Data from Unique Chat

Net Promoter Score (NPS) is a valuable metric that helps you understand customer satisfaction and loyalty. This guide will walk you through the steps to export your NPS data from Unique Chat, both as detailed results and as a summary.

Introduction

Unique Chat allows you to collect NPS ratings from your users. Exporting this data enables you to perform deeper analyses, integrate with other systems, or generate custom reports.

Prerequisites

  • API Access Token: You need an API access token with the CHAT_FEEDBACK_READ permission. If you don't have one, please refer to guide on how to get your API access token.

  • Command-Line Tool: Basic knowledge of using curl or a similar HTTP client tool.

  • Date Range: The start date from which you want to export data, in ISO 8601 format.

Exporting NPS Detailed Results

You can export detailed NPS results in CSV format using the following steps:

Step 1: Construct the API Request

Use the following curl command template:

curl -L '<https://gateway.<base_url>/chat/net-promoter-score/export?startDate=YOUR_START_DATE'> \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d ''
  • YOUR_START_DATE: Replace this with the start date in ISO 8601 format (e.g., 2024-10-20T06:15:24.369Z).

  • YOUR_API_TOKEN: Replace this with your actual API access token.

Example

curl -L '<https://gateway.<base_url>/chat/net-promoter-score/export?startDate=2023-10-20T00:00:00.000Z'> \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer eyJhbGciOiJI...your_token_here...' \ -d ''

Step 2: Execute the Command

Run the command in your terminal. The API will return a CSV formatted output.

Step 3: Save the Output

To save the output to a file, redirect the output to a file:

curl -L '<https://gateway.<base_url>/chat/net-promoter-score/export?startDate=YOUR_START_DATE'> \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '' > nps_results.csv

Retrieving NPS Summary Data

To get a summary of your NPS data, including the overall score and percentages of promoters, passives, and detractors, follow these steps:

Step 1: Construct the API Request

Use the following curl command template:

curl -L '<https://gateway.<base_url>/chat/net-promoter-score?startDate=YOUR_START_DATE'> \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d ''

Example

curl -L '<https://gateway.<base_url>/chat/net-promoter-score?startDate=2023-10-20T00:00:00.000Z'> \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer eyJhbGciOiJI...your_token_here...' \ -d ''

Step 2: Execute the Command

Run the command in your terminal. The API will return a JSON formatted summary.

Step 3: Save or View the Output

To save the output to a file:

curl -L '<https://gateway.<base_url>/chat/net-promoter-score?startDate=YOUR_START_DATE'> \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '' > nps_summary.json

Or simply view the output directly in the terminal.

Understanding the Output

Detailed Results (CSV)

The CSV file will contain entries with the following columns:

  • score: The NPS rating given by the user (ranging from 0 to 10).

  • createdAt: The date when the rating was submitted.

Sample Output

score,createdAt 10,2023-10-21 9,2023-10-22 7,2023-10-23 ...

Summary Data (JSON)

The JSON output will include:

  • score: The calculated NPS score.

  • totalRatingCount: The total number of ratings received.

  • promoters: Percentage of promoters (ratings 9-10).

  • passives: Percentage of passives (ratings 7-8).

  • detractors: Percentage of detractors (ratings 0-6).

Sample Output

{ "score": 89.36, "totalRatingCount": 47, "promoters": "91.49%", "detractors": "2.13%", "passives": "6.38%" }

Conclusion

By following the steps in this guide, you can successfully export both detailed and summary NPS data from Unique Chat. This data can be instrumental in understanding customer satisfaction and identifying areas for improvement.

For any questions or assistance, please contact our support team at support@unique.app.

Ā 


Author

@Abimbola Idowu

Related content

Ā© 2025 Unique AG. All rights reserved. Privacy Policy – Terms of Service