Skip to content

Commit 1bd4d89

Browse files
authored
Merge pull request microsoft#15 from vidrana/patch-2
Updating readme to include ConnectToEngagementHub section
2 parents a0f0054 + 3e03b53 commit 1bd4d89

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

ConnectToEngagementHub/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Connect to Engagement Hub
2+
3+
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.
16+
- To detect the handoff activity,
17+
1. Clone the repository
18+
```bash
19+
git clone https://github.com/microsoft/PowerVirtualAgentsSample.git
20+
```
21+
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)

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
## Overview
55

66
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.
78

89
## Samples list
910

@@ -20,11 +21,13 @@ To use the samples, clone this GitHub repository using Git.
2021
|BotConnectorApp | Demonstrates how to connect your bot to a custom app for example mobile-device app | [View][cs#1]|
2122
|BuildYourOwnCanvasSamples | Demonstrates how to connect your bot to a custom canvas with various functionality | [View][cs#2] |
2223
|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] |
2325

2426

2527
[cs#1]:./BotConnectorApp
2628
[cs#2]:./BuildYourOwnCanvasSamples
2729
[cs#3]:./RelayBotSample
30+
[cs#4]:./ConnectToEngagementHub
2831

2932

3033
## Contributing

0 commit comments

Comments
 (0)