Skip to content

Commit 1edf925

Browse files
committed
NPS endpoint
description
1 parent 5f2a9a9 commit 1edf925

File tree

1 file changed

+153
-5
lines changed

1 file changed

+153
-5
lines changed

source/includes/_activity.md

Lines changed: 153 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ agent_interactions | average number of agent replies per case | number
660660
agents_involved | average number of agents responding per case | number
661661

662662

663-
663+
<br/><br/><br/><br/><br/>
664664

665665

666666
**Case Volume**
@@ -736,7 +736,7 @@ value | count of active cases | number
736736
date_from | date interval | string
737737

738738

739-
739+
<br/><br/><br/><br/><br/>
740740

741741

742742
**Case Classifications**
@@ -806,30 +806,178 @@ volume | count of classifications | number
806806

807807
## NPS
808808

809-
Access your teams NPS performance metrics - including overall score, count of detractors, promoters, passives, and your average response rate.
809+
Access your teams NPS performance metrics - including overall score, count of detractors, promoters, passives, and your average response rate. Reminder to retrieve your forms (see GET Forms above) to retrieve a list of the NPS Surveys your team are using. The ID for your form will be used to generate the following queries.
810810

811811
![Source Volume](../images/activity/activity_nps.png)
812812

813813
<br/><br/>
814814

815815
**NPS Summary**
816816

817-
Description:
817+
Return the summary metrics for the specified NPS Survey.
818+
819+
```text
820+
curl -H "Content-Type: application/json" -H "Auth-Api-Token: 12345678-1234-1234-1234-123456789" https://api.lexer.io/v1/activity/reports -d '
821+
{
822+
"type": "nps_summary",
823+
"date_from": "2018-04-01T00:00:00+11:00",
824+
"date_to": "2018-04-30T23:59:59+11:00",
825+
"form": 123,
826+
"nps_category": "all"
827+
}'
828+
```
818829

819830
**Endpoint**
820831
`https://api.lexer.io/v1/activity/reports`
821832

822833
**Type:** nps_summary
823834

835+
```json
836+
{
837+
"total_sent": 16,
838+
"total_received": 12,
839+
"total_promoters": 9,
840+
"total_passives": 1,
841+
"total_detractors": 2,
842+
"nps_score": 58.333333333333336
843+
}
844+
```
845+
846+
Property | Description | Type |
847+
---------|-------------|------|
848+
total_sent | count of surveys sent | number
849+
total_received | count of responses received | number
850+
total_promoters | count of 9-10 score responses | number
851+
total_passives | count of 7-8 score responses | number
852+
total_detractors | count of <7 score responses | number
853+
nps_score | average nps score | number
854+
855+
856+
857+
858+
<br/><br/>
859+
824860
**NPS Volume**
825861

826-
Description:
862+
Return the daily volume of NPS scores and responses for each day in your query range.
863+
864+
```text
865+
curl -H "Content-Type: application/json" -H "Auth-Api-Token: 12345678-1234-1234-1234-123456789" https://api.lexer.io/v1/activity/reports -d '
866+
{
867+
"type": "nps_volume",
868+
"date_from": "2018-04-01T00:00:00+11:00",
869+
"date_to": "2018-04-30T23:59:59+11:00",
870+
"form": 123,
871+
"nps_category": "all"
872+
}'
873+
```
827874

828875
**Endpoint**
829876
`https://api.lexer.io/v1/activity/reports`
830877

831878
**Type:** nps_volume
832879

880+
```json
881+
[
882+
{
883+
"date": "2018-04-01T13:00:00+00:00",
884+
"timestamp": 1522587600,
885+
"data": {
886+
"total_sent": 0,
887+
"total_received": 0,
888+
"total_promoters": 0,
889+
"total_passives": 0,
890+
"total_detractors": 0,
891+
"nps_score": 0.0
892+
}
893+
},
894+
{
895+
"date": "2018-04-02T13:00:00+00:00",
896+
"timestamp": 1522674000,
897+
"data": {
898+
"total_sent": 0,
899+
"total_received": 0,
900+
"total_promoters": 0,
901+
"total_passives": 0,
902+
"total_detractors": 0,
903+
"nps_score": 0.0
904+
}
905+
},
906+
{
907+
"date": "2018-04-03T13:00:00+00:00",
908+
"timestamp": 1522760400,
909+
"data": {
910+
"total_sent": 0,
911+
"total_received": 0,
912+
"total_promoters": 0,
913+
"total_passives": 0,
914+
"total_detractors": 0,
915+
"nps_score": 0.0
916+
}
917+
},
918+
{
919+
"date": "2018-04-04T13:00:00+00:00",
920+
"timestamp": 1522846800,
921+
"data": {
922+
"total_sent": 0,
923+
"total_received": 0,
924+
"total_promoters": 0,
925+
"total_passives": 0,
926+
"total_detractors": 0,
927+
"nps_score": 0.0
928+
}
929+
},
930+
{
931+
"date": "2018-04-05T13:00:00+00:00",
932+
"timestamp": 1522933200,
933+
"data": {
934+
"total_sent": 0,
935+
"total_received": 0,
936+
"total_promoters": 0,
937+
"total_passives": 0,
938+
"total_detractors": 0,
939+
"nps_score": 0.0
940+
}
941+
},
942+
{
943+
"date": "2018-04-06T13:00:00+00:00",
944+
"timestamp": 1523019600,
945+
"data": {
946+
"total_sent": 0,
947+
"total_received": 0,
948+
"total_promoters": 0,
949+
"total_passives": 0,
950+
"total_detractors": 0,
951+
"nps_score": 0.0
952+
}
953+
},
954+
{
955+
"date": "2018-04-07T13:00:00+00:00",
956+
"timestamp": 1523106000,
957+
"data": {
958+
"total_sent": 0,
959+
"total_received": 0,
960+
"total_promoters": 0,
961+
"total_passives": 0,
962+
"total_detractors": 0,
963+
"nps_score": 0.0
964+
}
965+
}
966+
]
967+
```
968+
969+
Property | Description | Type |
970+
---------|-------------|------|
971+
date | date time in UTC | string
972+
timestamp | date time in Epoch time | number
973+
total_sent | count of surveys sent | number
974+
total_received | count of responses received | number
975+
total_promoters | count of 9-10 score responses | number
976+
total_passives | count of 7-8 score responses | number
977+
total_detractors | count of <7 score responses | number
978+
nps_score | average nps score | number
979+
980+
833981

834982
## Errors
835983

0 commit comments

Comments
 (0)