Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create ACTIVITYTYPES.md #2228

Merged
merged 10 commits into from
Jul 31, 2019
29 changes: 29 additions & 0 deletions ACTIVITYTYPES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## What Activity Types does Web Chat support?

First, see the [Activities overview](https://docs.microsoft.com/en-us/azure/bot-service/dotnet/bot-builder-dotnet-activities?view=azure-bot-service-3.0) documentation to learn about what activities types are available in Bot Framework.

This document will discuss what Bot Framework Activity Types that Web Chat is prepared to handle *as a client*. To see documentation on which activity types are supported by different channels, please see the [Activities by Channel](https://github.com/microsoft/botframework-sdk/issues/5294) discussion.
corinagum marked this conversation as resolved.
Show resolved Hide resolved

Although the Direct Line channel and Web Chat channel support the following activity types, Web Chat is only designed to support the following activities:

| Direct Line Channel supported Activity | Channel :left_right_arrow: Bot Activity | `Activity.type` |
|---------------------------------------- |---------------------------------------- |------------------- |
| `message` | | :heavy_check_mark: |
| `conversationUpdate` | :heavy_check_mark: | |
| `event` | | :heavy_check_mark: |
| `event.TokenResponse` | :heavy_check_mark: | |
| `endOfConversation` | | |
| `typing` | | :heavy_check_mark: |
| `installationUpdate` | :heavy_check_mark: | |


corinagum marked this conversation as resolved.
Show resolved Hide resolved
- `installationUpdate`, `event.TokenResponse` and `conversationUpdate` are activities sent between the bot and the channel. The channel does not send these events to Web Chat.
- `endOfConversation` is not currently handled or rendered by Web Chat. See the Web Chat conversation on [Activity Types](https://github.com/microsoft/BotFramework-WebChat/issues/1808) to learn more.

When developing your bot's web page, you may discover that the bot sends an activity type that needs to be supported by Web Chat. Luckily, it is possible to create renderers for different activities through the [`activityMiddleware`](https://github.com/microsoft/BotFramework-WebChat#web-chat-api-reference). To learn more, check out the following tutorials:

1. [Customize Web Chat with Reaction Buttons](https://github.com/microsoft/BotFramework-WebChat/tree/master/samples/09.customization-reaction-buttons/)
1. [Customize Web Chat with GitHub Stargazer Components](https://github.com/microsoft/BotFramework-WebChat/tree/master/samples/10.a.customization-card-components)

corinagum marked this conversation as resolved.
Show resolved Hide resolved

Note: We do not recommend creating custom Activity Types. Instead, please use the `event` activity type.
corinagum marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added

- Added bubble nub and style options, by [@compulim](https://github.com/compulim), in PR [#2137](https://github.com/Microsoft/BotFramework-WebChat/pull/2137)
- [#1808](https://github.com/microsoft/BotFramework-WebChat/issues/1808) Added documentation on activity types, by [@corinagum](https://github.com/corinagum) in PR [#2228](https://github.com/microsoft/BotFramework-WebChat/pull/2228)
corinagum marked this conversation as resolved.
Show resolved Hide resolved

### Samples

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ Web Chat is designed to be customizable without forking the source code. The tab

See more about [customizing Web Chat](https://github.com/microsoft/BotFramework-WebChat/blob/master/SAMPLES.md) to learn more on customization.

# Supported Activity Types on the Web Chat Client
corinagum marked this conversation as resolved.
Show resolved Hide resolved
[Web Chat and Activity Types](https://github.com/microsoft/BotFramework-WebChat/blob/master/ACTIVITYTYPES.md)
corinagum marked this conversation as resolved.
Show resolved Hide resolved

## Speech changes in Web Chat 4.5

> This is a breaking change on behavior expectations regarding speech in Web Chat.
Expand Down