Conexión de un bot a canalesConnect a bot to channels

se aplica a: SDK V4APPLIES TO: SDK v4

Un canal es una conexión entre las aplicaciones de comunicación y un bot.A channel is a connection between communication applications and a bot. Un bot, registrado en Azure, usa canales para facilitar la comunicación con los usuarios.A bot, registered with Azure, uses channels to facilitate the communication with users.

Puede configurar un bot para conectarse a cualquiera de los canales estándar, como Alexa, Facebook Messenger y Slack.You can configure a bot to connect to any of the standard channels such as Alexa, Facebook Messenger, and Slack. Para más información, consulte Registro de bots de Azure.For more information, see Azure Bot registration.

Además de los canales proporcionados, también puede conectar un bot a la aplicación de comunicación Direct Line como canal.In addition to the provided channels, you can also connect a bot to your communication application using Direct Line as the channel. Para más información, consulte Conexión de un bot a Direct Line.For more information, see Connect a bot to Direct Line.

La Bot Framework permite desarrollar un bot de forma independiente del canal mediante la normalización de los mensajes que el bot envía a un canal.The Bot Framework allows you to develop a bot in a channel-agnostic way by normalizing messages that the bot sends to a channel. Esto implica lo siguiente:This implies the following:

  • Convierta los mensajes del esquema Bot Framework en el esquema del canal.Convert the messages from the Bot Framework schema into the channel's schema.
  • Si el canal no admite todos los aspectos del esquema Bot Framework, el servicio Bot Connector intenta convertir el mensaje a un formato compatible con el canal.If the channel does not support all aspects of the Bot Framework schema, the Bot Connector service tries to convert the message to a format that the channel does support. Por ejemplo, si el bot envía al canal de correo electrónico un mensaje que contiene una tarjeta con los botones de acción, el conector puede enviar la tarjeta como imagen e incluir las acciones como vínculos en el texto del mensaje.For example, if the bot sends a message that contains a card with action buttons to the email channel, the connector may send the card as an image and include the actions as links in the message's text.
  • Para la mayoría de los canales, debe proporcionar información de configuración del canal para ejecutar un bot en el canal.For most channels, you must provide channel configuration information to run a bot on the channel. La mayoría de los canales requieren que un bot tenga una cuenta en el canal.Most channels require that a bot have an account on the channel. Otros, como Facebook Messenger, requieren que un bot tenga también una aplicación registrada en el canal.Others, like Facebook Messenger, require a bot to have an application registered with the channel also.

Para configurar un bot para conectarse a un canal, complete los pasos siguientes:To configure a bot to connect to a channel, complete the following steps:

  1. Inicie sesión en Azure Portal.Sign in to the Azure Portal.

  2. Seleccione el bot que quiera configurar.Select the bot that you want to configure.

  3. En el panel izquierdo, seleccione Canales en Bot Management.In the left pane, select Channels under Bot Management.

  4. En el panel derecho, seleccione el icono del canal que desea agregar al bot.In the right pane, select the icon of the channel you want to add to your bot.

    Conexión a los canales

Después de configurar el canal, los usuarios de ese canal pueden empezar a usar el bot.After you've configured the channel, users on that channel can start using your bot.

Conexión de un bot a un canalConnect a bot to a channel

Los pasos de conexión son diferentes para cada canal.The connection steps are different for each channel. Consulte el artículo relacionado en la tabla siguiente para obtener más información.See the related article in the table below more information.

CanalChannel DescripciónDescription
AlexaAlexa Comunicarse con los usuarios a través de dispositivos de Alexa que admiten aptitudes personalizadas.Communicate with users through Alexa devices that support Custom Skills.
Direct LineDirect Line Integre un bot en una aplicación móvil, una página web u otras aplicaciones.Integrate a bot into a mobile app, web page, or other applications.
Correo electrónico de Office 365Office 365 email Permitir que un bot se comunique con los usuarios a través del correo electrónico de Office 365.Enable a bot to communicate with users via Office 365 email.
FacebookFacebook Conecte un bot a Facebook Messenger y Facebook Workplace, para que pueda comunicarse con los usuarios de ambas plataformas.Connect a bot to both Facebook Messenger and Facebook Workplace, so that it can communicate with users on both platforms.
KikKik Configure un bot para comunicarse con los usuarios a través de la aplicación de mensajería de Kik.Configure a bot to communicate with users through the Kik messaging app.
LINELINE Configure un bot para comunicarse con los usuarios a través de la aplicación LINE.Configure a bot to communicate with users through the LINE app.
Microsoft TeamsMicrosoft Teams Configure un bot para comunicarse con los usuarios a través de Microsoft Teams.Configure a bot to communicate with users through Microsoft Teams.
SkypeSkype Configure un bot para comunicarse con los usuarios a través de Skype.Configure a bot to communicate with users through Skype.
Skype EmpresarialSkype for Business Configure un bot para comunicarse con los usuarios a través de Skype for Busines.Configure a bot to communicate with users through Skype for Busines.
SlackSlack Configure un bot para comunicarse con los usuarios a través de Slack.Configure a bot to communicate with users through Slack.
TelegramTelegram Configure un bot para comunicarse con los usuarios a través de Telegram.Configure a bot to communicate with users through Telegram.
TelefoníaTelephony Configure un bot para comunicarse con los usuarios a través Bot Framework canal de telefonía.Configure a bot to communicate with users through the Bot Framework Telephony channel.
TwilioTwilio Configure un bot para comunicarse con los usuarios a través de la plataforma de comunicación en la nube de Twilio.Configure a bot to communicate with users through the Twilio cloud communication platform.
WeChatWeChat Configure un bot para comunicarse con los usuarios mediante la plataforma WeChat.Configure a bot to communicate with users using the WeChat platform.
Chat en webWeb Chat Se configura automáticamente al crear un bot con el Bot Framework Service.Automatically configured for you when you create a bot with the Bot Framework Service.
WebexWebex Configure un bot para comunicarse con los usuarios mediante Webex.Configure a bot to communicate with users using the Webex.
Canales adicionalesAdditional channels Canales adicionales disponibles como adaptador a través de plataformas proporcionadas a través de Botkit y repositorios de la comunidad.Additional channels available as an adapter through provided platforms via Botkit and community repositories.

Versión de transformación del esquema del botBot schema transformation version

Como se ha descrito anteriormente, un canal convierte los mensajes entrantes de otros servicios en el Bot Framework protocolo.As described above, a channel converts incoming messages from other services to the Bot Framework protocol schema. Del mismo modo, los mensajes enviados por el bot a otros servicios se transforman Bot Framework esquema nativo al formato de estos servicios.Likewise, messages sent by the bot to other services are transformed from the Bot Framework native schema to the format of these services. Este proceso se denomina transformación de esquema.This process is called schema transformation. El Bot Framework Service mantiene la compatibilidad con versiones anteriores del protocolo para evitar cambiar el comportamiento de los bots existentes.The Bot Framework Service maintains backward compatibility of the protocol in order to avoid changing behavior of the existing bots.

En ocasiones, es necesario realizar un cambio en el proceso de transformación del esquema que, potencialmente, puede cambiar el comportamiento de los bots existentes.Occasionally, a change in the schema transformation process needs to take place that can, potentially, change the behavior of the existing bots. Un ejemplo de este cambio podría ser cualquier corrección de errores si un subconjunto de los usuarios ha tomado una dependencia del comportamiento existente (aunque erróneo).An example of such a change could be any bug fix if a subset of the users have taken a dependency on the existing (however erroneous) behavior. Otro ejemplo de este cambio serían las actualizaciones o mejoras en otros servicios que beneficiarían a los bots. sin embargo, la adopción de estas actualizaciones puede, potencialmente, cambiar el comportamiento existente.Another example of such a change would be updates or improvements in other services that would benefit bots; however adopting these updates can, potentially, change the existing behavior.

Al controlar la versión de transformación de esquema de sus bots, los desarrolladores de bots pueden controlar cuándo (si es posible) habilitar el nuevo comportamiento.By controlling the schema transformation version of their bots, bot developers can control when (if ever) to enable new behavior. De forma predeterminada, los bots recién creados obtienen la versión de transformación de esquema más reciente.By default, newly created bots get the most recent schema transformation version. Los bots existentes se pueden actualizar a la versión más reciente cuando estén listos para aprovechar las mejoras introducidas en esta versión.Existing bots can be upgraded to the newest version when they are ready to take advantage of the improvements introduced in this version. Cualquier bot se puede actualizar o degradar en cualquier momento.Any bot can be upgraded or downgraded at any time.

Puede cambiar la versión de transformación del esquema del bot en el panel Configuración:You can change your bot's schema transformation version in the Configuration pane:

El campo Schema Transformation Version (Versión de transformación Esquema) del panel Configuración

Versiones de transformación de esquema admitidasSupported schema transformation versions

  • Versión 1.3Version 1.3

    • Fecha de presentación: mayo de 2021Date introduced: May 2021
    • Cambios:Changes:
      • Direct Line: Quite Deserialize/Reserialize of Tarjetas adaptables.Direct Line: Remove Deserialize/Reserialize of Adaptive Cards. El contenido de Tarjetas adaptables se pasará al cliente tal y como está.The content of Adaptive Cards will be passed to the client as is.
  • Versión 1.2Version 1.2

    • Fecha de presentación: abril de 2021Date introduced: April 2021
    • Cambios:Changes:
      • Canal de Slack: el nombre de los datos adjuntos se usa para el valor De texto del mensaje.Slack channel: Attachment name is used for Message Text value.
      • Canal de Facebook: Actualización a Facebook Graph API v9.0.Facebook channel: Upgrade to Facebook Graph API v9.0.
  • Versión 1.1Version 1.1

    • Fecha de introducción: abril de 2021Date introduced: April 2021
    • Cambios:Changes:
  • Versión 1.0Version 1.0

    • Versión originalOriginal version

Publicación de un botPublish a bot

El proceso de publicación es diferente para cada canal.The publishing process is different for each channel.

SkypeSkype

Nota

A partir del 31 de octubre de 2019, el canal Skype ya no acepta nuevas solicitudes de publicación de bots.As of October 31, 2019 the Skype channel no longer accepts new Bot publishing requests. Esto significa que puede seguir desarrollando bots con el canal Skype, pero su bot estará limitado a 100 usuarios.This means that you can continue to develop bots using the Skype channel, but your bot will be limited to 100 users. No podrá publicar su bot para un público mayor.You will not be able to publish your bot to a larger audience. Los bots de Skype actuales seguirán ejecutándose sin interrupciones.Current Skype bots will continue to run uninterrupted. Obtenga más información sobre por qué algunas características ya no están disponibles en Skype.Read more about why some features are not available in Skype anymore.

Los bots se publican en Skype desde la página de configuración.Bots are published to Skype from the configuration page. Al publicar un bot, se envía para su revisión.Publishing a bot submits it for review. Antes de la revisión, el bot está limitado a 100 contactos.Before review, the bot is limited to 100 contacts. Los bots aprobados no tienen contactos limitados y puede optar por incluir el bot en el directorio de bots de Skype.Approved bots do not have limited contacts and you may opt to have the bot included in the Skype bot directory.

Skype EmpresarialSkype for Business

Importante

Skype Empresarial Online se retirará el 31 de julio de 2021.Skype for Business Online will retire on July 31, 2021. Los clientes de Skype Empresarial Online no verán ningún cambio en el servicio antes de la fecha de retirada.Skype for Business Online customers should see no change to the service before the retirement date. Consulte Anuncio de retirada de Skype Empresarial Online para más detalles.Read Skype for Business Online to Be Retired for more details.

Un administrador de inquilinos registra los bots de Skype Empresarial con un inquilino de Skype Empresarial Online.Skype for Business bots are registered with a Skype for Business Online tenant by a Tenant Administrator.

Para ver el estado de una revisión, abra el bot en el portal de Bot Framework y haga clic en Channels (Canales).To view the status of a review, open the bot in the Bot Framework Portal and click Channels. Si no se aprueba el bot, el resultado se vinculará al motivo.If the bot is not approved, the result will link to the reason why. Después de realizar los cambios necesarios, vuelva a enviar el bot para su revisión.After making the required changes, resubmit the bot for review.

Recursos adicionalesAdditional resources

El SDK incluye ejemplos que se pueden usar para crear bots.The SDK includes samples that you can use to build bots. Visite el repositorio de ejemplos en GitHub para ver una lista de ejemplos.Visit the Samples repo on GitHub to see a list of samples.