_
PREMIUM INTEGRATION
What plan do we have?
Summary
This article will help you configure Power BI* as a premium integration using open API process. It covers the following topics:
*Requirements: Microsoft account / Power BI Desktop installed
_
Authentication
_
In Crewhu
Add and copy the token for Power BI Integration going to Settings > Integration:
_
In PowerBI
Access Home > Get Data > Web, choose the "Advanced" option and fill as the example below:
API Base address: https://api.crewhu.com/api
Key: X_CREWHU_APITOKEN
Value: Copy the Open API Access Token in Crewhu
_
Endpoints
- /v1/survey
- /v1/user
- /v1/badge
- /v1/badgehistory
- /v1/prize
- /v1/prizehistory
_
Fields
_
Survey
Field Name |
Type |
Description |
_id |
IDString |
Unique ID for this Survey |
surveyTagsCustomer |
[String] |
Tags selected by the customer who answered the survey |
surveyTagsCompany |
[String] |
Tags selected by a manager who reviewed the survey |
comment |
String |
The feedback provided by the customer |
closed |
Date |
Date/time that the survey has been answered at |
survey_type_code |
String |
Type of Survey: typResolved, typReply, typSignature |
ticket_num |
String |
Ticket number |
customer_data |
Object |
Customer data (ID, name, contact name, email, phone) |
employees |
[IDString] |
Users that have been selected by the customer |
rating |
String |
Survey rating: 5 - Positive, 0 - Neutral, -5: Negative |
rating_label |
String |
Custom rating label: POSITIVE, NEUTRAL, NEGATIVE (for instance) |
reviewed |
Boolen |
Is this survey reviewed by a manager? |
ip_address |
String |
IP address that answered the survey |
_created_at |
Date |
Date/time the customer clicked the face and first opened the survey |
_updated_at |
Date |
Date/time this survey has been modified |
summary |
String |
The ticket summary/subject |
inactive |
Boolen |
Is this survey inactive or deleted? |
_
User/Employee
Field Name |
Type |
Description |
_id |
IDString |
Unique ID for this Employee/User |
employee_id |
String |
Employee ID from the ticket system |
firstname |
String |
Employee/User first name |
lastname |
String |
Employee/User last name |
hiredate |
Date |
Date of Employee/User hiring |
picture |
String |
URL for the Employee/User picture |
location |
String |
Location which this Employee/User belongs to |
department |
String |
Department which this Employee/User belongs to |
position |
String |
Position which this Employee/User has |
managed_locations |
[String] |
Locations which this Employee/User manages |
managed_departments |
[String] |
Departments which this Employee/User manages |
_
Badge
Field Name | Type | Description |
name | string | badge name |
description | string | badge description |
imageClass | string | |
imageFile | string |
_
Badge History
Field Name | Type | Description |
badge | _id | |
badge_level | number | |
message | string | |
fromUser | _id | |
toUsers | [_id] | |
survey | _id | |
dateGiven | date | |
badgePoints | number | |
dateCancelled | date | |
userCancelled | _id | |
messCancelled | string |
_
Prizes
Field Name | Type | Description |
description | string | |
prizeURL | string | |
points | number | |
taxable | boolean | |
image | string |
_
Prizes History
Field Name | Type | Description |
prize | _id | |
user | _id | |
date_redeem | date | |
date_cancel | date | |
points | number | |
quantity | number | |
status | string |
_
Response Examples
{
"_links": {
"base": "[APIAddress]", //The API Base Address
"self": "/v1/survey?step=2&limit=100", //The current páge endpoint and parameters
"prev": "/v1/survey?step=1&limit=100", //EMPTY when first
"next": "/v1/survey?step=3&limit=100" //EMPTY when last
},
"start": 101 //The start record
"limit": 100, //The limit for each step
"size": 100, //The size of this result set
"total": 1024, //The total number of records
"results": [
...
],
}
_
Limit / Step
Default Limit: 100
Max Limit: 1000
Note:
In order to increase the limit of data, it will be necessary to do pagination in Power BI. We suggest contacting a specialist. Click here to know more about it.
_
Query Parameters
Query parameters should be passed as JSON Objects (see examples):
_updated_at: $gt (greater than), $gte (greater than or equal), $lt (less than), $lte (less than or equal)
inactive: true, false, undefined (means both active and inactive)
Comments
0 comments
Please sign in to leave a comment.