开始与强大的邮件扩展进行共享Start sharing with powerful messaging extensions

邮件扩展用于共享可操作内容。Messaging extensions are designed for sharing actionable content. 此功能表示在我们的堆栈中投资回报率最高(ROI)。This feature represents the highest return on investment (ROI) in our stack. 邮件扩展在聊天和频道中工作、支持多个查询终结点、启用新实体的创建以及使用链接 unfurling 创建自定义链接预览。Messaging extensions work in chat and channels, support multiple query endpoints, enable the creation of new entities, and work with link unfurling to create custom link previews. 困难在于,虽然功能强大且非常有用,但它并不容易被发现。The challenge is that while the feature is powerful and incredibly useful, it's not easily discoverable. 本指南将帮助您创建可供多个用户使用的、易于使用的邮件扩展。This guide will help you create messaging extensions that are readily found and utilized by more users.

设计准则Design guidelines

将内容显示为用户类型Show content as a user type

邮件扩展提供了使用关键字搜索查找可与一个或多个用户共享的可操作内容的唯一方法。Messaging extensions present a unique way to use keyword searches to find actionable content that can be shared with one or more users. 此首选交互允许用户输入具有延迟自动查询的搜索词作为用户类型。This preferred interaction allows users to enter search terms with a delayed auto query as the user type. 此模型为模拟建议结果和要求用户键入最少字符做了很好的工作。This model does a good job of simulating suggested results and requires users to type minimal characters.

提示

可能,但不适合要求用户 enter search 在发送查询时选择或之前。It's possible, but not desirable, to require users to select enter or search before sending queries. 当后端服务的压力较少时,此模型不是标准模型,可能会混淆用户。While there is less stress on the backend service, this model is not the norm and may confuse users.

考虑零术语查询Consider zero-term queries

零术语查询直接由用户操作触发,而不是由用户在搜索框中写入术语。Zero-term queries are directly triggered by user action, rather than by the user writing terms in a search box. 所有邮件扩展都受益于零期限查询,通常基于用户上次在服务中看到的内容。All messaging extensions benefit from zero-term queries, usually based on what the user last saw on the service. 优势在于,希望共享用户上次看到的内容相当高的可能性。The advantage is that the likelihood of wanting to share something the user last saw is quite high. 其他零术语查询可能基于该服务。Other zero-term queries might be based on the service. 例如, news 可能显示最近发布的最近事件和即将到来的新闻扩展。For instance, news might show recently posted news extensions from recent and upcoming events.

<img width="450px" title=""新建配置" 选项卡" src="../../assets/images/messaging-extension/zero-term-query.png" />

在团队中共享内容的最常见方法之一是通过超链接,无论它是已在使用中的任务,还是您找到了有趣的视频。One of the most common ways to share content in Teams is through a hyperlink, whether it is a task you've been working on or a video that you found funny. 当用户在团队中共享链接时,将显示包括图像、标题或说明的预览。When a user shares a link in Teams, a preview including image, title or description is displayed. 通过链接 unfurling ,您现在可以自定义这些预览。With link unfurling you can now customize these previews. 用户在决定使用您的预览后,系统也会提示您安装您的应用程序。Users will also be prompted to install your app after they decide to use your preview. 向您的应用程序添加链接 unfurling 功能可大大增加您的应用程序可发现性。Adding link unfurling functionality to your app can greatly increase your app discoverability.

突出显示您的邮件扩展Highlight your messaging extension

消息传递扩展并不总是很容易找到。Messaging extensions are not always easy to find. 在应用程序详细信息页面中添加应用屏幕截图和帮助文档,以确保邮件扩展的功能。Include app screenshots in the app detail page and your help documentation to feature your messaging extension. 您还可以在 bot 教程中添加您的邮件扩展的操作方法文档,以突出显示 bot 交互之外的整个应用程序。You can also include how-to documentation for your messaging extension in bot tours to highlight the entire app beyond the bot interactions.

在卡片上添加操作Add actions on card

不要只向用户显示文本。Don't just display text to users. 具有可与之交互的内容,并执行下一个操作。Have something they can interact with and perform the next action. 例如,"位置" 应用程序不只是在卡片上插入地图,还具有一个按钮,该按钮在选中时将向该位置显示行车路线。For example, the Places app doesn't just insert a map on the card, but also has a button that, when selected, will show directions to the location. 在获取卡片后,用户可以执行更多任务。Users can perform more tasks after obtaining the card.

<img width="450px" title=""新建配置" 选项卡" src="../../assets/images/messaging-extension/action-on-card.png" />

将用户保留在应用上下文中Keep users in the app context

如果卡片不够,并且需要提供详细信息的链接,请考虑打开一个选项卡,而不是打开浏览器以获得更好的用户体验。If a card is not enough and you need to provide a link for more information, consider opening a tab instead of opening a browser for a better user experience. 请参阅使用自定义选项卡扩展团队应用See Extend your Teams app with a custom tab