You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This sample shows the minimum code required for a Power Virtual Agent client to intercept a handoff activity and connect to an engagement hub to transfer conversation to a live agent.
4
+
## Prerequisites
5
+
6
+
-[.NET Core SDK](https://dotnet.microsoft.com/download) version 2.1
7
+
8
+
```powershell
9
+
# determine dotnet version
10
+
dotnet --version
11
+
```
12
+
13
+
## How to try this sample
14
+
- When an end-user interacts with a PVA bot over Directline, messages are sent to client in the form of activities.
15
+
- In a dialog, when a node to transfer a chat to a live agent is detected, the activities payload contains a handoff activity that is a trigger to transfer the chat.
2. Add the HandoffHelper and dependent models on the client to intercept activities payload sent over Directline.
22
+
23
+
- This helper detects an event activity with name - handoff.initiate.
24
+
- HandoffHelper also parses conversation context (refer to [HandoffContext.cs](./Handoff/HandoffContext.cs)) and the transcript of the conversation between end-user and bot from the handoff.initiate activity.
25
+
- Conversation context and transcript can then be used to write a custom adapter (based on engagement hub APIs) to transfer the chat to a live agent.
26
+
27
+
## Further reading
28
+
- [Configure hand-off to any generic engagement hub](https://review.docs.microsoft.com/en-us/power-virtual-agents/configure-generic-handoff)
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@
4
4
## Overview
5
5
6
6
This branch contains samples for connecting your Power Virtual Agents bot to a custom app or to existing [Azure Bot Service channels](/azure/bot-service/bot-service-manage-channels?view=azure-bot-service-4.0).
7
+
The ConnectToEngagementHub sample contains code for handing off conversations seamlessly and contextually to an Engagement hub.
7
8
8
9
## Samples list
9
10
@@ -20,11 +21,13 @@ To use the samples, clone this GitHub repository using Git.
20
21
|BotConnectorApp | Demonstrates how to connect your bot to a custom app for example mobile-device app |[View][cs#1]|
21
22
|BuildYourOwnCanvasSamples | Demonstrates how to connect your bot to a custom canvas with various functionality |[View][cs#2]|
22
23
|RelayBotSample | Demonstrates how to connect your bot to existing Azure Bot Service channels |[View][cs#3]|
24
+
|ConnectToEngagementHub | Demonstrates how to detect a handoff activity during a bot conversation and read conversation context |[View][cs#4]|
0 commit comments