Custom static directory support, self hosted installations can pass static dir path to override csat and other web-templates, js and css files. Allowing instances to be fully customizable.

- New meta JSONB field in CSAT responses to capture random adhoc data as that might be needed for custom CSAT pages.
- Add support prefilled rating for csat pages picked from query param
This commit is contained in:
Abhinav Raut
2026-04-09 00:04:00 +05:30
parent e7eac6eb94
commit 88a58c0f3b
29 changed files with 315 additions and 59 deletions
+39
View File
@@ -483,6 +483,7 @@ CREATE TABLE csat_responses (
rating INT DEFAULT 0 NOT NULL,
feedback TEXT NULL,
meta JSONB DEFAULT '{}' NOT NULL,
response_timestamp TIMESTAMPTZ NULL,
CONSTRAINT constraint_csat_responses_on_rating CHECK (rating >= 0 AND rating <= 5),
CONSTRAINT constraint_csat_responses_on_feedback CHECK (length(feedback) <= 1000)
@@ -875,3 +876,41 @@ Libredesk
'{{ .MentionedBy.FullName }} mentioned you in conversation #{{ .Conversation.ReferenceNumber }}',
true
);
INSERT INTO templates
("type", body, is_default, "name", subject, is_builtin)
VALUES (
'email_notification'::template_type,
'
<p>Your recent conversation (#{{ .Conversation.ReferenceNumber }}) has been resolved. We would love to hear your feedback.</p>
<p style="text-align: center; font-weight: bold;">How would you rate your experience?</p>
<table style="width: 100%; max-width: 400px; margin: 0 auto;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top" style="width: 20%; padding: 8px 0;">
<a href="{{ .CSATLink }}?rating=1" style="text-decoration: none; color: #555; font-size: 28px; display: block;">&#128546;</a>
<span style="font-size: 11px; color: #888;">Poor</span>
</td>
<td align="center" valign="top" style="width: 20%; padding: 8px 0;">
<a href="{{ .CSATLink }}?rating=2" style="text-decoration: none; color: #555; font-size: 28px; display: block;">&#128533;</a>
<span style="font-size: 11px; color: #888;">Fair</span>
</td>
<td align="center" valign="top" style="width: 20%; padding: 8px 0;">
<a href="{{ .CSATLink }}?rating=3" style="text-decoration: none; color: #555; font-size: 28px; display: block;">&#128522;</a>
<span style="font-size: 11px; color: #888;">Good</span>
</td>
<td align="center" valign="top" style="width: 20%; padding: 8px 0;">
<a href="{{ .CSATLink }}?rating=4" style="text-decoration: none; color: #555; font-size: 28px; display: block;">&#128515;</a>
<span style="font-size: 11px; color: #888;">Great</span>
</td>
<td align="center" valign="top" style="width: 20%; padding: 8px 0;">
<a href="{{ .CSATLink }}?rating=5" style="text-decoration: none; color: #555; font-size: 28px; display: block;">&#129321;</a>
<span style="font-size: 11px; color: #888;">Excellent</span>
</td>
</tr>
</table>
',
false,
'CSAT request',
'',
true
);