feat: add assignment reason to routing insights (#17984)
* add assignment reason * add routing reason to csv export
This commit is contained in:
1 parent
eaff9e8c89
commit
982a715c4b
3 files changed
+23
No files matched your search
@@ -2798,6 +2798,7 @@
|
||||
"routing_form_insights_booking_status": "Booking Status",
|
||||
"routing_form_insights_booking_at": "Booking At",
|
||||
"routing_form_insights_submitted_at": "Submitted At",
|
||||
"routing_form_insights_assignment_reason":"Assignment Reason",
|
||||
"access_denied": "Access Denied",
|
||||
"salesforce_route_to_owner": "Contact owner will be the Round Robin host if available",
|
||||
"salesforce_do_not_route_to_owner": "Contact owner will not be forced (can still be host if it matches the attributes and Round Robin criteria)",
|
||||
|
||||
@@ -374,6 +374,19 @@ export function RoutingFormResponsesTable({
|
||||
</div>
|
||||
),
|
||||
}),
|
||||
columnHelper.accessor("routedToBooking", {
|
||||
id: "assignmentReason",
|
||||
header: t("routing_form_insights_assignment_reason"),
|
||||
size: 250,
|
||||
cell: (info) => {
|
||||
const assignmentReason = info.getValue()?.assignmentReason;
|
||||
return (
|
||||
<div className="max-w-[250px]">
|
||||
{assignmentReason && assignmentReason.length > 0 ? assignmentReason[0].reasonString : ""}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
}),
|
||||
columnHelper.accessor("createdAt", {
|
||||
id: "submittedAt",
|
||||
header: t("routing_form_insights_submitted_at"),
|
||||
|
||||
@@ -247,6 +247,9 @@ class RoutingEventsInsights {
|
||||
user: {
|
||||
select: { id: true, name: true, email: true, avatarUrl: true },
|
||||
},
|
||||
assignmentReason: {
|
||||
select: { reasonString: true },
|
||||
},
|
||||
},
|
||||
},
|
||||
createdAt: true,
|
||||
@@ -584,6 +587,11 @@ class RoutingEventsInsights {
|
||||
email: true,
|
||||
},
|
||||
},
|
||||
assignmentReason: {
|
||||
select: {
|
||||
reasonString: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -612,6 +620,7 @@ class RoutingEventsInsights {
|
||||
"Attendee Name": response.routedToBooking?.attendees[0]?.name || "",
|
||||
"Attendee Email": response.routedToBooking?.attendees[0]?.email || "",
|
||||
"Attendee Timezone": response.routedToBooking?.attendees[0]?.timeZone || "",
|
||||
"Assignment Reason": response.routedToBooking?.assignmentReason[0].reasonString || "",
|
||||
"Routed To Name": response.routedToBooking?.user?.name || "",
|
||||
"Routed To Email": response.routedToBooking?.user?.email || "",
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user