Post Call Survey

Post call survey results and voice comments

The Customer Experience Post Call Survey API reference is available to try.

πŸ“˜

You will need a working API key to begin

How to get API Keys

The 8x8-api-key will be the Key generated. For Customer Experience the Secret from Admin Console is not required.

Your token will be provided by contacting 8x8. Please include in the request your CC Tenant Name and Platform. How to find my CC Tenant and Platform

Base URL

Use the following base URL during this process:

Region

  • uk is the region for customers with UK/EU based CC tenants
  • us is the region for all other customers.

Recent Calls Request

Parameters

Method: POST

Headers

NameRequiredDescriptionExample
8x8-apikeyβœ“API Credential Key from the Admin Console Processtest_key_kjdfidj238jf9123df221
tokenβœ“Provided by 8x8 representative (see above)11vf11vf-5e6f-1a2b-3c4d-123xxx123xxx
Content-Typeβœ“application/jsonapplication/json

Path

NameRequiredDescriptionExample
versionβœ“Current version v1v1

Body

NameRequiredDescriptionExample
tenantIdβœ“TenantId/Tenant name from CC Configuration Manageracmecorp01
scriptβœ“scriptID (from CC Configuration Manager) for the survey script. Only a single script can be specified at a time.[8361]
pageβœ“First page is one (1). See Pagination for more information1
rowsβœ“Number of rows per page. See Pagination for more information100
duration☐/βœ“See Time Spans for guidance. Options are today, yesterday, week, month, allhistorytoday
timeRange☐/βœ“See Time Spans for guidance."startEpochMilliseconds - endEpochMilliseconds" in UTC epoch including milliseconds Ex. Date and time (GMT): Wednesday, October 12, 2022 1:21:45 PM is Timestamp in milliseconds: 16655809050001665580905000 - 1665598905000
timezone☐IANA Time Zones. Examples America/New_York, Europe/London Wikipedia Time Zone List This changes the output format only for timeRange input. Default is GMT.America/New_York
callerName☐searches the callerName of the caller. Only a single name can be passed in the array. You can pass partial strings. "5551212" will match "7325551212"["5551212"]
tenantAgents☐AgentId(s) of the agents involved . Multiple agentsIds can be passed and calls matching any of the agents will be returned.["agAQDqmvKiRbG4ekigNSaaa" ,"ag64oyEUb_Sk6bxVB9P5zzz"]
tenantQueues☐QueueId(s) of the queues involved . Multiple queueIds can be passed and calls matching any of the queues will be returned.["591","333"]
tenantGroups☐GroupId(s) of the agents involved. Multiple groupIds can be passed and calls for agents in any of the groups will be returned.["111","588"]

Time Span For Report

For the time span of the report either duration OR timeRange must be used. If both are specified duration is used and timeRange is ignored.

πŸ“˜

duration options definitions

  • today : represents the time period 0000 to 2359 for the current date, dependent on the selected timezone
    • yesterday : represents the time period 0000 to 2359 for the previous date, dependent on the selected timezone
  • week : the value represents the time period from the start of the current week (e.g., Monday 00:00) up until the 7th day in the date sequence. The week value is dependent on the selected timezone
  • month : represents the time period from the first day of the current month concluding on the last day of the month. The month value is applicable for the selected timezone
  • allhistory : the complete history available in the data repository

πŸ“˜

timeRange examples

Date and time (UTC): "Wednesday, October 12, 2022 1:21:45 PM" to Date and time (UTC): "Wednesday, October 12, 2022 6:21:45 PM"

timeRange: "1665580905000 - 1665598905000"

Pagination

Post Call Survey pagination is controlled by page and rows

  • page is the page in the results to retrieve, initial value for the first page is 1 or "1"
  • rows is the number of records to return. Max is 5000

Pagination Example
With an initial input including

  "page": 1,
  "rows": "500",

the returned meta data will be as follows. The information here is

  • hits => this tells us there are 13466 matching rows/records
  • page => this is the page number (1) this result set
  • rows => this is the number of rows/records (500) requested

Note: data has been truncated to an empty array to limit the size of the example text

{
    "hits": 13644,
    "alertBellCount": 0,
    "sortColumn": null,
    "data": [],
    "autoRefresh": null,
    "columns": [],
    "timezone": "America/Los_Angeles",
    "sortOrder": null,
    "page": 1,
    "rows": 500
}

The request for the next page would include


    "page": "2",
    "rows": "500",

Consumer would continue to walk through the pages until, either tracking the rows returned or continuing until an empty data array is returned.

Full Request Example

curl --location --request POST 'https://api.8x8.com/customerexperience/v1/postCallSurvey/us' \
--header '8x8-apikey:{api-key}' \
--header 'token:{token}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "tenantId": "acmecorp01",
  "script": [7602],
  "page": 1,
  "rows": 10,
  "duration": "allhistory",
  "timeRange": null,
  "timezone": "America/Los_Angeles",
  "callerName": ["Andrew"],
  "tenantAgents": ["ag64oyEUb_Sk6bxVB9P5zzz","agAQDqmvKiRbG4ekigNSaaaa"],
  "tenantQueues": ["591","1196","713"],
  "tenantGroups": ["588","712"]
}'

curl --location --request POST 'https://api.8x8.com/customerexperience/v1/postCallSurvey/us' \
--header '8x8-apikey:{api-key}' \
--header 'token:{token}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "tenantId": "acmecorp01",
  "script": [8361],
  "page": 1,
  "rows": 10,
  "duration": null
  "timeRange": "1665580905000 - 1665598905000",
  "timezone": "America/Los_Angeles",
  "callerName": ["Andrew"],
  "tenantAgents": ["ag64oyEUb_Sk6bxVB9P5zzz","agAQDqmvKiRbG4ekigNSaaaa"],
  "tenantQueues": ["591","1196","713"],
  "tenantGroups": ["588","712"]
}'

Response

Response Structure

Pagination has been described above

questionLabel provides a list of the labels associated with each of the questions in the survey.

In this example the survey has 3 questions and the corresponding labels are presented. If the survey has questions added over time this will be the most recent variation.

"questionLabel": {
  "Q1": "one to four",
  "Q2": "five to nine",
  "Q3": "Please leave a comment"
}

data is an array of survey responses containing two types of data

Questions/Answers

The question responses will be Q1, Q2 and so on.

The survey allows for 3 question types

  • Scale - response will be a single digit in a defined range (1-9 largest range)
  • Yes/No - 0 is no, 1 is yes
  • Voice Comment - survey participant can leave a recorded comment.

If the value of the Qx is "NA" this indicates this question was not answered which could include that the question did not exist at the time the survey was taken.

Scale and Yes/No questions the value will be the digit selected, only valid responses are captured.

Voice Comment responses will have a link to the Voice Comment Recording. This is also accessible from the Cloud Storage Service. If the customer has transcription capabilites the transcript is also available in the Cloud Storage Service.

Survey Metadata

NameDescriptionExample
agentCallHandlingDurationThe conversation duration7241.0
agentList["ag64oyEUb_Sk6bxVB9P5ye5wa"]
callDateThe date and time that the call was made11/18/2022 14:44:16
callDateOnlyThe date that the call was made11/18/2022
callDurationDuration of call from arrival to hang-up including survey. In milliseconds."41758.0"
callerId
callerNameAndrew Cunningh
callerOriginalPhoneNumber
callerPhoneNumber5512267212
callerVoiceInput-{identifier}Link to caller voice input result. There can be multiple per surveyhttps://vcc-ce.8x8.com/analytix/api/downloadvoicecomment?vccinteractionguid=int-1848b328d06-oOoSBBJue4qnnK21rETdTqP7V-phone-00-supertenantcsm01&calldate=1668782656774&id=callerVoiceInput-b701fe24-cc90-418f-bc09-54a336116729
callIdThe unique identifier for the callint-1848b328d06-oOoSBBJue4qnnK21rETdTqP7V-phone-00-supertenantcsm01
callTimeThe time that the call was made14:44:16
callTypePossible call types are "Conference", "DAA", "Inbound", "Internal", "Outbound" and "Transfer"Inbound
columns
dialedNumber13128195068
getdigit-{identifier}"1"
groupList["588"]
holdDurationThe length of time a call was placed on hold by the agent (not the time in queue). In milliseconds"0.0"
hungupByIdentifies if the call was hung up by the "Customer", "Agent", or "System"System
muteDurationThe length of time that an agent has muted a customer0
offerTypeHow the survey was offered "stayOnCall" at the end of the call without hanging up OR "callback" where customer is called back to complete survey.stayOnCall
pcsType\
queueListList of the queues that the call has been associated with["591"]
timeInIVRThe amount of time the call was in Interactive Voice Response (IVR). Including time spent in the survey. In milliseconds"22558.0"
totalScoreThe combined score for all questions.11
transactionIdCC transactionId for the call. Note CC transationId is not unique over time."15138"
voiceComment
voiceCommentFileNames
waitTimeThe wait time duration before a caller spoke to an agent"10763.0"
{
    "hits": 2,
    "sortColumn": "timestamp",
    "data": [
        {
            "Q1": "3",
            "callDuration": "41758.0",
            "queueList": [
                "591"
            ],
            "Q2": "8",
            "agentCallHandlingDuration": "7241.0",
            "callDate": "11/18/2022 14:44:16",
            "Q3": "https://vcc-ce.8x8.com/analytix/api/downloadvoicecomment?vccinteractionguid=int-1848b328d06-oOoSBBJue4qnnK21rETdTqP7V-phone-00-supertenantcsm01&calldate=1668782656774&id=callerVoiceInput-b701fe24-cc90-418f-bc09-54a336116729",
            "muteDuration": 0,
            "timeInIVR": "22558.0",
            "callType": "Inbound",
            "callerName": "Andrew Cunningh",
            "dialedNumber": "13128195068",
            "callDateOnly": "11/18/2022",
            "offerType": "stayOnCall",
            "hungupBy": "System",
            "holdDuration": "0.0",
            "voiceComment": "",
            "agentList": [
                "ag64oyEUb_Sk6bxVB9P5ye5w"
            ],
            "pcsType": "",
            "callId": "int-1848b328d06-oOoSBBJue4qnnK21rETdTqP7V-phone-00-supertenantcsm01",
            "callerOriginalPhoneNumber": "",
            "groupList": [
                "588"
            ],
            "totalScore": 11,
            "transactionId": "15138",
            "getdigit-abb1a8b1-a369-47e5-a82b-6f5f92ff0e47": "8",
            "voiceCommentFileNames": "",
            "callerVoiceInput-b701fe24-cc90-418f-bc09-54a336116729": "https://vcc-ce.8x8.com/analytix/api/downloadvoicecomment?vccinteractionguid=int-1848b328d06-oOoSBBJue4qnnK21rETdTqP7V-phone-00-supertenantcsm01&calldate=1668782656774&id=callerVoiceInput-b701fe24-cc90-418f-bc09-54a336116729",
            "getdigit-9c320003-fa56-40c1-b816-eb816db7328b": "3",
            "callerId": "",
            "waitTime": "10763.0",
            "callTime": "14:44:16",
            "callerPhoneNumber": "5512267212"
        },
        {
            "Q1": "2",
            "callDuration": "18322.0",
            "queueList": [
                "591"
            ],
            "Q2": "8",
            "agentCallHandlingDuration": "4005.0",
            "callDate": "10/27/2022 13:53:54",
            "Q3": "NA",
            "muteDuration": 0,
            "timeInIVR": "11200.0",
            "callType": "Inbound",
            "callerName": "Andrew Cunningh",
            "dialedNumber": "13128195068",
            "callDateOnly": "10/27/2022",
            "offerType": "stayOnCall",
            "hungupBy": "System",
            "holdDuration": "0.0",
            "voiceComment": "",
            "agentList": [
                "ag64oyEUb_Sk6bxVB9P5ye5w"
            ],
            "pcsType": "",
            "callId": "int-18419b888db-G7VBDUQreh0xPFMLVd8n9uedI-phone-00-supertenantcsm01",
            "callerOriginalPhoneNumber": "",
            "groupList": [
                "588"
            ],
            "totalScore": 10,
            "transactionId": "1586",
            "getdigit-abb1a8b1-a369-47e5-a82b-6f5f92ff0e47": "8",
            "voiceCommentFileNames": "",
            "callerVoiceInput-b701fe24-cc90-418f-bc09-54a336116729": "NA",
            "getdigit-9c320003-fa56-40c1-b816-eb816db7328b": "2",
            "callerId": "",
            "waitTime": "1849.0",
            "callTime": "13:53:54",
            "callerPhoneNumber": "5512267212"
        }
    ],
    "columns": [],
    "sortOrder": "desc",
    "page": 1,
    "rows": 10,
    "questionLabel": {
        "Q1": "one to four",
        "Q2": "five to nine",
        "Q3": "Please leave a comment"
    }
}