This repository has been archived by the owner on May 2, 2023. It is now read-only.
ignore previous conversation lines when transferring to a bo #85
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR function:
Example code to ignore previous conversation lines when transferring to a bot, 'unless' the previous agent has NOT read.
Why:
Many developers are taking the MyCoolAgent.js as scripture in regards to bot behaviour.
Unfortunately life is not so simple. If we could replace the cognitive ability of the person sitting between a chair and the LiveEngage console in 144 lines then we would all be on universal income and living in the matrix.
This PR is an attempt to add some simple management of what is MVP in regards to the scenario where a bot is transferred an open conversation.
The bot may have originally been a part of the conversation and a human or another bot decided to transfer back, or this is the first time the bot has seen this particular conversation.
Either way things get messy, thus the approach in this PR attempts to simplify the matter to program the MyCoolAgent example to ONLY respond to a consumer message IF the last agent had NOT read any of the messages sent by the consumer.
It is by no means perfect and ideally brands implement some sort of mechanism VIA a cache etc to track read receipts etc (IE state management). But that would be far beyond the scope of this PR.