Skip to content

Commit 3e03b53

Browse files
authored
Create Readme for ConnectToEngagementHub sample
1 parent 4304fd4 commit 3e03b53

1 file changed

Lines changed: 28 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)

0 commit comments

Comments
 (0)