Downloading NPS score by shipping state

I can see this filtered data in the NPS responses data, but there is no way to download NPS by shipping state so I can combine iOS and Android and look at them together.  To be specific, this view shows the NPS score average by State, so it is not as simple as adding the shipping state column to the responses download since that only gives you the raw score, not calculated NPS and not aggregated by state. 

 

0

Comments

1 comment
  • Hi Nate Larson,

    Thanks for sharing your question in the Community and glad you submitted a ticket and are already speaking with our support team. I'm happy to share their answer in this thread for others to see as well:

     

    The way this can be done until this feature is created would be to use our API, for which I have added a example call you can use: 

    curl --location --request POST 'https://app.pendo.io/api/v1/aggregation' \
    --header 'x-pendo-Integration-Key: <YOUR INTEGRATION KEY>' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "response": {
            "mimeType": "text/csv"
        },
        "request": {
            "name": "nps-metadata-table",
            "pipeline": [
                {
                    "source": {
                        "pollsSeen": {
                            "guideId": "", // Your guide ID
                            "pollId": "" // Your guide poll ID
                        },
                        "timeSeries": {
                            "period": "dayRange",
                            "first": "now()",
                            "count": -180 // Minus how many days in the past you would like to see
                        }
                    }
                },
                {
                    "identified": "visitorId"
                },
                {
                    "eval": {
                        "responseDay": "startOfPeriod(\"dayRange\", time)"
                    }
                },
                {
                    "bulkExpand": {
                        "account": {
                            "account": "accountId". // Change this to "visitorId" if the metadata field you would like to sort by is in the visitor metadata
                        }
                    }
                },
                {
                    "eval": {
                        "metadataField": "account.auto.id" // What metadata field you would like to evaluate by
                    }
                },
                {
                    "filter": "!isNil(metadataField) && metadataField != \"\""
                },
                {
                    "eval": {
                        "isPromoter": "if(response >= 9, 1, 0)",
                        "isDetractor": "if(response < 7, 1, 0)",
                        "isPassive": "if(response >= 7 && response < 9, 1, 0)"
                    }
                },
                {
                    "group": {
                        "group": [
                            "metadataField"
                        ],
                        "fields": [
                            {
                                "numPromoters": {
                                    "sum": "isPromoter"
                                }
                            },
                            {
                                "numDetractors": {
                                    "sum": "isDetractor"
                                }
                            },
                            {
                                "numPassives": {
                                    "sum": "isPassive"
                                }
                            },
                            {
                                "numResponses": {
                                    "count": null
                                }
                            },
                            {
                                "summedResponses": {
                                    "sum": "response"
                                }
                            }
                        ]
                    }
                },
                {
                    "eval": {
                        "avgScore": "summedResponses/numResponses",
                        "npsScore": "(numPromoters/numResponses) - (numDetractors/numResponses)"
                    }
                },
                {
                    "sort": [
                        "-numResponses"
                    ]
                }
            ],
            "requestId": "nps-metadata-table"
        }
    }'

    You can import this whole snippet using import text in Postman in order to edit it and modify it easily. 
    There are comments on what fields you change for the desired result. It should give you plain text in CSV format as a response. 

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post