Add user disconnect message and escalation state storage#625
Merged
tracyboehrer merged 3 commits intoJun 17, 2026
Conversation
siddharthh98
commented
Jun 17, 2026
Contributor
- Add UserDisconnectedMessage to settings and config
- Notify live agent when user disconnects from escalated chat
- Persist escalation marker in storage for external API access
- Convert Teams HTML/emoji to plain text for Genesys
- Secure /api/conversations/reset with authorization
- Add UserDisconnectedMessage to settings and config - Notify live agent when user disconnects from escalated chat - Persist escalation marker in storage for external API access - Convert Teams HTML/emoji to plain text for Genesys - Secure /api/conversations/reset with authorization
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the samples/dotnet/genesys-handoff sample by improving Genesys handoff reliability and operability: it persists an escalation marker for out-of-turn APIs, notifies live agents when users disconnect, improves message text fidelity when forwarding Teams content, and secures the external reset endpoint.
Changes:
- Persist escalation state in
IStoragekeyed by MCS conversation ID for external reset API checks. - Notify the live agent (via Genesys) when the Teams user disconnects from an escalated conversation.
- Convert Teams HTML/emoji attachments into plain text before sending messages to Genesys, and require authorization for
/api/conversations/reset.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| samples/dotnet/genesys-handoff/Services/ConversationStateManager.cs | Adds storage-backed escalation marker set/clear/check helpers. |
| samples/dotnet/genesys-handoff/Program.cs | Secures the reset endpoint by requiring authorization. |
| samples/dotnet/genesys-handoff/GenesysHandoffAgent.cs | Persists/clears escalation markers and sends a “user disconnected” notice to the live agent. |
| samples/dotnet/genesys-handoff/Genesys/IGenesysConnectionSettings.cs | Adds UserDisconnectedMessage setting contract. |
| samples/dotnet/genesys-handoff/Genesys/GenesysMessageSender.cs | Converts Teams HTML/emoji-rich content to plain text for Genesys payloads. |
| samples/dotnet/genesys-handoff/Genesys/GenesysConnectionSetting.cs | Wires UserDisconnectedMessage from configuration. |
| samples/dotnet/genesys-handoff/appsettings.json | Adds default UserDisconnectedMessage configuration value. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tracyboehrer
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.