Key concepts in the Bot Builder SDK for .NET

This article introduces key concepts in the Bot Builder SDK for .NET.

Connector

The Bot Framework Connector provides a single REST API that enables a bot to communicate across multiple channels such as Skype, Email, Slack, and more. It facilitates communication between bot and user by relaying messages from bot to channel and from channel to bot.

In the Bot Builder SDK for .NET, the Connector library enables access to the Connector.

Activity

The Connector uses an Activity object to pass information back and forth between bot and channel (user). The most common type of activity is message, but there are other activity types that can be used to communicate various types of information to a bot or channel.

For details about Activities in the Bot Builder SDK for .NET, see Activities overview.

Dialog

When you create a bot using the Bot Builder SDK for .NET, you can use dialogs to model a conversation and manage conversation flow. A dialog can be composed of other dialogs to maximize reuse, and a dialog context maintains the stack of dialogs that are active in the conversation at any point in time. A conversation that comprises dialogs is portable across computers, which makes it possible for your bot implementation to scale.

In the Bot Builder SDK for .NET, the Builder library enables you to manage dialogs.

FormFlow

You can use FormFlow within the Bot Builder SDK for .NET to streamline of building a bot that collects information from the user. For example, a bot that takes sandwich orders must collect several pieces of information from the user such as type of bread, choice of toppings, size, and so on. Given basic guidelines, FormFlow can automatically generate the dialogs necessary to manage a guided conversation like this.

State

The Bot Framework State service enables your bot to store and retrieve state data that is associated with a user, a conversation, or a specific user within the context of a specific conversation. State data can be used for many purposes, such as determining where the prior conversation left off or simply greeting a returning user by name. If you store a user's preferences, you can use that information to customize the conversation the next time you chat. For example, you might alert the user to a news article about a topic that interests her, or alert a user when an appointment becomes available.

For details about managing state using the Bot Builder SDK for .NET, see Manage state data.

Naming conventions

The Bot Builder SDK for .NET library uses strongly-typed, Pascal-cased naming conventions. However, the JSON messages that are transported back and forth over the wire use camel-case naming conventions. For example, the C# property ReplyToId is serialized as replyToId in the JSON message that's transported over the wire.

Security

You should ensure that your bot's endpoint can only be called by the Bot Framework Connector service. For more information on this topic, see Secure your bot.

Additional resources