RocketChat / RocketChat/Rocket.Chat

Visitor Abandonment does not work when the visitor never enters a first message

Open
#22,696 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

We are using Enterprise edition and we are relying on Visitor Abandonment to close open rooms when the visitor does not respond to our Bot. In our case, we have configured our Bot to send a welcome event when the user opens the widget. We do that with a Livechat Trigger in combination with a setting in our Dialogflow.App that triggers a welcome event when the chat initially starts.

Our issue is that after our welcome event, often our visitors will just close the tab, or ignore the prompt, and just go about their business, never interacting with our Bot at all. In this case, the current implementation of Visitor Abandonment will not work to close the open room because it is looking for the timestamp of the first message from the visitor (room.v.lastMessageTs).

We need the Abandonment timer to start at the last message in the room in this case (room.lastMessageTs) in the case that the visitor never interacted with the bot.

I have posted a PR to fix. We implemented this in our fork and it is working nicely.

https://github.com/RocketChat/Rocket.Chat/pull/22695

@renatobecker

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Visitor Abandonment implementation and compare the proposed fix in pull request #22695. The work is done when rooms where the visitor never sends a message still start abandonment timing from the room's last message and are closed as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.