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

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

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 ''

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:

Sample Output

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

Summary Data (JSON)

The JSON output will include:

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.