cerb icon indicating copy to clipboard operation
cerb copied to clipboard

Notification banner that new reply came in

Open nicholsk18 opened this issue 1 year ago • 3 comments

Is there a way we can have a banner pop up if a new reply comes in while staff is working on a ticket or composing a reply already? That way they can read updated information before sending their reply?

nicholsk18 avatar Nov 08 '23 19:11 nicholsk18

Hi @nicholsk18!

Prior to automations in 10.x, there was a concept of "proactive bot behaviors" where a bot could notify a worker about something without them having to initiate. It was similar to notifications but with interactions.

There currently isn't a way to proactively start an automation interaction, but it's something we're implementing.

What you're saying makes perfect sense. Even though a validator can check for a duplication of effort before or after composing a message, nothing catches duplicated effort during a reply.

My ideal solution here would be proactive interactions for automations, so the capability could be used in many different scenarios (including this one). An automation on the mail.sent event could check if there are other active drafts on the same record, and send them an interactive notification while they're still replying.

Websockets would be the most efficient way to check for proactive interactions. That could also fall-back to just polling the server every 30 seconds or so (like auto-saving drafts).

Related to #482

jstanden avatar Nov 09 '23 23:11 jstanden

Hmm... Just some thoughts without further tests: check before sending the draft, if a newer incoming action was recorded. How: use an automation for the event mail.draft.validate, which reads the draft. In the automation, read the drafts ticket record too. Now compare the 'create timestamp' of the draft (@jstanden, would it make sense to add this field for such a scenario? Or even the idea itself? ) against 'latest_incoming_activity' of the ticket to knew if something happened after starting the draft. I know, this isn't exactly what was asked for, but could work as a workaround meanwhile

beatbesmer avatar Nov 11 '23 18:11 beatbesmer

Thanks for the suggestion! So anything with drafts won't work for our specific issue. In our case, we talking about customers submitting tickets. In our case, they don't use Cerb directly so no drafts will ever be saved on their behalf. What our staff wants is, while they are replying to a ticket, if a reply from a customer comes in, to show a banner or something informing them of this. Since notifications don't show up when new actions happen before a refresh, and widgets don't auto refresh I assumed a bit that this is not possible yet in cerb. But if there is a way to refresh all of those without a staff taking any action do let me know, because that's what our staff wants :)

nicholsk18 avatar Nov 11 '23 20:11 nicholsk18