Help Center
5 stars based on
52 reviews
The Bot Framework Activity schema is an application-level representation of conversational actions made by humans and automated software. The schema includes provisions for communicating text, multimedia, and non-content actions like social interactions and typing indicators. This schema is used within the Bot Framework protocol and is implemented by Microsoft chat systems and by interoperable bots and clients from many sources.
The Bot Framework Activity schema represents conversational behaviors made by humans and automated software within chat applications, email, and other text interaction programs. Each activity object includes a type field and represents a single action: This document provides meanings for each type of activity, and describes the required and optional fields that may bot status sendiri may included.
It also defines the roles of the client and server, and provides guidance on which fields are mastered by each participant, and which may be ignored. There are three roles of consequence in this specification: Although this specification requires activities to be transmitted between roles, the exact nature of that transmission is not described here.
For compactness, visual interactive cards are not defined in this specification. Instead, refer to Adaptive Cards [ 11 ] specification. This card, and other undefined card types, may be included as attachments within Bot Framework activities. Lines bot status sendiri may with markers of the form RXXXX are specific requirements designed to be referenced by number in discussion outside of this document.
A list of deleted values MAY be maintained at the end of this document. Software that sends and receives activities, and transforms them to and from chat or application behaviors. Channels are the authoritative store for activity data. Software that sends and receives activities, and generates automated, semi-automated, or entirely manual responses. Bots have endpoints that are registered with channels. Software that sends and receives activities, typically on behalf of human users. Clients do not have endpoints.
Bot status sendiri may activity object is commonly expressed in the JSON format, but can also be projected into in-memory data structures in. The activity type field controls the meaning of the activity and the fields contained within it. Depending on the role that a participant is playing client, bot, or channeleach field is mandatory, optional, or ignored. For example, the id field is mastered by the channel, and is mandatory in some circumstances, but ignored if it is sent by a bot.
Fields that describe the identity of the activity and any participants, such as the type and from fields, are shared across all activities. In many programming languages, it is convenient to bot status sendiri may these fields on a core base type from which other, more specific, activity types derive. When storing or transmitting activities, some fields may be duplicated within bot status sendiri may transport mechanism.
This document merely describes the abstract requirements for these fields, and it is up to the bot status sendiri may protocol bot status sendiri may establish whether the values must be explicitly declared or if implicit or inferred values are allowed.
When a bot or client sends an activity to a channel, it is typically a request for the activity to be recorded. When a channel sends an activity to a bot or client, it is typically a notification that the activity has already been recorded. Fields may be primitive types. JSON is used as the common interchange format and although bot status sendiri may all activities must be serialized to JSON at all times, they must be serializable to it. This allows implementations to rely on a simple set of conventions for handling known and unknown activity fields.
Receivers MAY allow improperly-cased field names, although this is not bot status sendiri may. Receivers MAY reject activities that do not include fields with the proper casing. Receivers MAY reject activities that contain field values whose types do not match the value types described in this specification. Unless otherwise noted, senders MAY include additional fields within the activity or any nested complex objects. Receivers MUST accept fields they do not understand. The type field bot status sendiri may the meaning of each activity, and are by convention bot status sendiri may strings e.
Senders may define their own application-layer types, although they are encouraged to choose values that are unlikely to collide with future well-defined values. Two type values are equivalent only if they are ordinally identical. A sender MAY generate activity type values not defined in this document. The channelId field establishes the channel and authoritative store for the activity. The value of the channelId field is of type string.
Two channelId values are equivalent only if they are ordinally identical. A channel MAY ignore or reject any activity it receives without an expected channelId value. The id field establishes bot status sendiri may identity for bot status sendiri may activity once it has been recorded in the channel.
Activities in-flight that have not yet been recorded do not have identities. Not all activities are assigned identities for example, a typing activity may never be assigned an id.
The value of the id field is of type string. For ease of implementation, it should be assumed that other participants do not have sophisticated knowledge of activity IDs, and that they will use only ordinal comparison to establish equivalency. The normalized version of each ID is established by the authoritative store, the channel. However, senders and receivers MAY allow logical equivalence of two values that are not ordinally equivalent if they have special knowledge of the circumstances.
The id field is designed to allow de-duplication, but this is prohibitive in most applications. The timestamp field records the exact UTC time when the activity occurred. Due to the distributed nature of computing systems, the important time is when the channel the authoritative store records the activity.
The time when a client or bot initiated an activity may be transmitted separately in the localTimestamp field. The value of the timestamp field is an ISO [ 2 ] encoded datetime within a string. The localTimestamp field expresses the datetime and timezone offset where the activity was generated.
This may be different from the UTC timestamp where the activity was recorded. The value of the localTimestamp field is an ISO [ 3 ] encoded datetime within a string. Clients and bots MAY include the localTimestamp field in their activities.
The from field describes which bot status sendiri may, bot, or channel generated an activity. The value of the from field is a complex object of the Channel account type. Most commonly, this is another user or bot within the system.
In some cases, the from field identifies the channel itself. Channels MUST bot status sendiri may the from and from. A channel MAY reject an activity due to missing from and from. The recipient field describes which client or bot is receiving this activity. Bot status sendiri may field is only meaningful when an activity is transmitted to exactly one recipient; it is not meaningful when it is broadcast to multiple recipients as happens when an activity is sent to a channel.
The purpose of the field is to allow the recipient to identify themselves. This is helpful when a client or bot has more than one identity within the channel. The value of the recipient field is a complex object of the Channel account type. Channels MUST include the recipient and recipient. The conversation field describes the conversation in which the bot status sendiri may exists. The value of the conversation field is a complex object of the Conversation account type.
Channels, bots, and clients MUST include the conversation and conversation. The replyToId field identifies the prior activity bot status sendiri may which the current activity is a reply. This field allows threaded conversation and comment nesting to be communicated between participants. See relatesTo for references to other conversations.
The value of the replyToId field is a string. A channel MAY reject an activity if its replyToId does not reference a valid activity within the conversation. Bots and clients MAY omit replyToId if it knows the channel does not make use of the field, even if the activity being sent is a reply to another activity.
The entities field contains a flat list of metadata objects pertaining to this activity. Unlike attachments see the attachments fieldentities do not necessarily manifest bot status sendiri may user-interactable content elements, and are intended to be ignored if not understood.
Senders may include entities they think may be useful to a receiver even if they are not certain the receiver can accept them. The value of each entities list element is a complex object of the Entity type. Senders MAY send multiple entities of the same type, provided the entities have distinct meaning. Extensibility data in the activity schema is organized principally within the channelData field. This simplifies plumbing in SDKs that implement the protocol.
The format of the channelData object is defined by the channel sending or receiving the activity. Activities are frequently sent asynchronously, with separate transport connections for sending and receiving traffic.
The serviceUrl field is used by channels to denote the URL where replies to the current activity may be sent. The bot status sendiri may of the serviceUrl field is of type string. Message activities represent content intended to be shown within a conversational interface. Message activities may contain text, speech, interactive cards, and binary or unknown attachments; typically channels require at most one of these for the message activity to be well-formed.
The text field contains text content, either in the Markdown format, XML, or as plain text. The format is controlled by the textFormat field as is plain if unspecified or ambiguous. The value of the text field is of type string.