On this page
Customer satisfaction survey API concepts and usage
Customer satisfaction survey API concepts and usage
This API can be used to retrieve data collected by the Movidesk customer satisfaction survey. You can use this API to bring customer satisfaction data into your reporting or business intelligence solution, without the need to manually export the Survey results report in Movidesk. This includes data collected for surveys questions that were later disabled.
If you are using other customer satisfaction surveys in addition to the Movidesk survey, you can also take advantage of the API to preserve data integrity. Retrieve the applicable Movidesk survey questions via the API to ensure questions remain consistent across survey tools.
Cross-language analysis is also made easy thanks to multi-language support. Movidesk links survey responses to a language agnostic question, which removes the need to manually identify and map different translations as being the same question.
All API endpoint URLs in this article use the following base URL:
https://api.movidesk.com/public/v1
Object properties
This API retrieves information on three objects linked to the customer satisfaction survey. Questions are the primary objects, with every Language and Response object linking back to a specific question.
This structure facilitates data analysis by maintaining the Question a constant even if the text of the question is slightly adjusted, or if the question is displayed in different languages.
Languages can only be accessed as a property of Questions.
Responses are retrieved via a separate URL and link back to a Question via the questionId property.
|
|
Note The API behaves the same way whether a Question is enabled or disabled. The isActive property indicates which Questions are currently active in the survey. |
Objects
Question
A record that determines the response type, whether the question is active in the customer satisfaction survey, and links the text in the Language objects with the Responses from customers.
|
|
Note In order to preserve data integrity, the question type cannot be changed after the question is created. |
JSON Paths
question
|
Property |
Type |
Max length |
Required? |
Description |
|
id |
string |
|
|
Unique identifier of the question |
|
languages |
Languages array |
|
|
List of Languages containing the text of the question in a specific language |
|
isActive |
bool |
|
|
The question is not included in the customer satisfaction survey if set to |
|
type |
int |
1 |
|
Question type: |
Language
A translation of the language agnostic Question. Even if your survey only has one language, the actual text of the question will be stored in a Language object.
JSON Paths
question.languages
|
Property |
Type |
Max length |
Required? |
Description |
|
cultureId |
String |
5 |
|
Culture code indicating the language of the text: English = en-US |
|
description |
String |
|
|
Question text |
Response
A customer response to a Question on the customer satisfaction survey. It includes both a numerical response value and an optional a free text comment.
|
|
Tip You can use obtain additional information about a Response’s ticket by using the ticket API to retrieve data based on the ticketID returned. |
JSON Paths
response
|
Property |
Type |
Max length |
Required? |
Description |
|
id |
String |
|
|
Unique identifier of the response |
|
questionId |
String |
|
|
id of the Question object related to this response |
|
clientId |
String |
|
|
Ref. code of the customer that responded to the survey question |
|
type |
Int |
1 |
|
Question type: |
|
ticketId |
Int |
|
|
Sequential id of the ticket related to this response. This number can be found in Ticket > Ticket details if using a custom ticket numbering scheme |
|
responseDate |
UTC datetime |
|
|
Date and time of the response |
|
commentary |
String |
|
|
Free text comments entered by the customer |
|
value |
Int |
2 |
|
Numerical value corresponding to the customer response. Varies based on type: type=1: Satisfied=1, Dissatisfied=2; |
Retrieve survey questions
Retrieves all properties of the customer satisfaction questions, which can be filtered by question type using the type parameter.
GET: /survey/questions
|
Parameters |
Location |
Type |
Required? |
Description |
|
token |
Query string |
String |
Yes |
Movidesk API token found in Configurations > Account > Parameters |
|
type |
Query string |
Int |
|
type of the questions that will be retrieved |
This example is a request for the list of customer satisfaction survey questions, which returns a full list of questions and question properties. Note how inactive questions, which are not displayed in the survey, are also included in the response.
The response also includes both properties of the Languages associated with the question.
Sample request
GET: https://api.movidesk.com/public/v1/survey/questions?token=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Sample response
[
{
"id": "WkWr",
"languages": [
{
"cultureId": "en-US",
"description": "How would you rate the support you received for this ticket?"
},
{
"cultureId": "es",
"description": "¿Qual su avaliación para este atendimiento?"
},
{
"cultureId": "pt-BR",
"description": "Qual sua avaliação para esse atendimento?"
}
],
"isActive": true,
"type": 1
},
{
"id": "W3xx",
"languages": [
{
"cultureId": "en-US",
"description": "How likely is it that you would recommend this company to a friend or colleague?"
},
{
"cultureId": "es",
"description": "¿Qué tan probable es que recomiendes Movidesk a un amigo o colega?"
},
{
"cultureId": "pt-BR",
"description": "Qual a probabilidade de você recomendar esta empresa para um amigo ou colega?"
}
],
"isActive": false,
"type": 3
}
]
Retrieve survey responses
Retrieves all properties of a set of customer satisfaction survey responses.
GET: /survey/responses
|
Parameters |
Location |
Type |
Required? |
Description |
|
token |
Query string |
String |
Yes |
Movidesk API token found in Configurations > Account > Parameters |
|
limit |
Query string |
Int |
|
Limit on the amount of responses to be returned, between 1 and 100. Default value is 100 |
|
startingAfter |
Query string |
String |
|
The id of a response, which is used as a cursor for pagination For example, if your previous request returned 100 responses, ending with response id=DwlOGG, your next call can include |
|
type |
Query string |
Int |
|
type of question for the responses that will be retrieved |
|
clientId |
Query string |
|
|
clientId of the responses that will be retrieved |
|
ticketId |
Query string |
|
|
Sequential id of the ticket related to the responses that will be retrieved |
|
responseDateGreaterThan |
Query string |
UTC datetime |
|
Filter date or date and time. The API will only return responses with a responseDate greater than this |
|
responseDateLessThan |
Query string |
UTC datetime |
|
Filter date or date and time. The API will only return responses with a responseDate less than this |
|
hasMore |
Return JSON |
Boolean |
|
Returns |
|
items |
Return JSON |
Responses array |
|
Array containing all Response objects retrieved, up to the maximum number set in limit |
This example is a request for the list of customer satisfaction survey responses from the customer with Ref. code (clientId) 489983039. In the example we are also limiting the request to responses entered by the customer after 5:00 PM UTC on January 15, 2020.
The API returns all responses matching the request, one of which includes a customer comment. Note that hasMore=false, so there is no need to request the next page on the list.
|
|
Tip The responseDateGreaterThan and responseDateLessThan parameters accept either a UTC date in the format |
Sample request
GET: https://api.movidesk.com/public/v1/survey/responses?token=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&responseDateGreaterThan=2020-01-15T17:00:00&clientId=489983039
Sample response
{
"hasMore": false,
"items": [
{
"id": "DwlOGG",
"questionId": "WkWr",
"type": 1,
"clientId": "489983039",
"ticketId": 28,
"responseDate": "2020-01-28T23:17:21.0128707",
"commentary": null,
"value": 1
},
{
"id": "61rVAq",
"questionId": "WkWr",
"type": 1,
"clientId": "489983039",
"ticketId": 11,
"responseDate": "2020-01-17T17:10:00.7760219",
"commentary": "Jack walked us through every step, which probably saved us a whole week of troubleshooting.",
"value": 1
}
]
}