Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jasmith-lp
Copy link
Collaborator

@jasmith-lp jasmith-lp commented Jun 11, 2019

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.

# Conflicts:
#	examples/agent-bot/MyCoolAgent.js
#	package-lock.json
#	package.json
@map34 map34 force-pushed the master branch 2 times, most recently from 891c22d to f1aa119 Compare August 21, 2020 03:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant