forked from pipeline-looker-blocks/zendesk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsatisfaction_ratings.view.lkml
144 lines (128 loc) · 3.15 KB
/
satisfaction_ratings.view.lkml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
view: satisfaction_ratings {
sql_table_name: zendesk_stitch.satisfaction_ratings ;;
dimension: comment {
description: "CSAT comment submitted by the ticket requester (customer who initiated the ticket)"
label: "Comment"
type: string
sql: ${TABLE}.comment ;;
}
dimension: id {
primary_key: yes
description: "CSAT ID for the rating submitted by the ticket requester (customer who initiated the ticket)"
label: "ID"
type: number
hidden: yes
sql: ${TABLE}.id ;;
}
dimension: rating {
description: "CSAT rating submitted by the ticket requester (customer who initiated the ticket)"
label: "Rating"
type: string
sql: ${TABLE}.score ;;
}
dimension: reason {
description: "Customers who select 'Bad, I'm unsatisfied' are presented with a drop-down menu of possible reasons for their negative response"
label: "Reason"
type: string
sql: ${TABLE}.reason ;;
}
dimension_group: time_created_at {
description: "Timestamp when the rating was created, in the timezone specified by the Looker user"
group_label: "Time Created At"
label: "Created At"
type: time
timeframes: [
raw,
time,
date,
time_of_day,
week,
month,
quarter,
hour_of_day,
day_of_week,
day_of_week_index,
day_of_month,
year,
week_of_year,
month_num,
quarter_of_year
]
sql: ${TABLE}.created_at ;;
}
dimension: ticket_id {
type: number
hidden: yes
sql: ${TABLE}.ticket_id ;;
}
dimension: assignee_id {
description: "The id of the agent assigned at the time of the rating."
type: string
hidden: yes
sql: ${TABLE}.assignee_id ;;
}
dimension: requester_id {
description: "The id of the requester (customer who initiated the ticket and who submitted the rating)"
type: string
hidden: yes
sql: ${TABLE}.requester_id ;;
}
dimension: group_id {
description: "The id of the group assigned at the time of the rating"
type: string
hidden: yes
sql: ${TABLE}.group_id ;;
}
### MEASURES
measure: count {
description: "Count satisfaction ratings"
type: count
drill_fields: [default*]
}
measure: count_satisfied {
description: "Count ratings marked as \"good\" by the requester"
type: count
filters: {
field: rating
value: "good"
}
drill_fields: [default*]
}
measure: count_dissatisfied {
description: "Count ratings marked as \"bad\" by the requester"
type: count
filters: {
field: rating
value: "bad"
}
drill_fields: [default*]
}
measure: count_offered {
description: "Count ratings marked as \"offered\" by the requester"
type: count
filters: {
field: rating
value: "offered"
}
drill_fields: [default*]
}
measure: count_unoffered {
description: "Count ratings marked as \"unoffered\" by the requester"
type: count
filters: {
field: rating
value: "unoffered"
}
drill_fields: [default*]
}
set: default {
fields: [
id,
time_created_at_time,
ticket_id,
rating,
reason,
comment
]
}
}