向应用客户发送通知Send notifications to your app's customers

在正确的时间,通过正确的消息吸引客户是应用开发人员取得成功的关键。Engaging with your customers at the right time and with the right message is key to your success as an app developer. 通知可以鼓励客户采取行动,例如为应用评分、购买加载项、试用新功能或下载其他应用(或许可通过你提供的促销代码免费获取)。Notifications can encourage your customers to take an action, such as rating an app, buying an add-on, trying a new feature, or downloading another app (perhaps for free with a promotional code that you provide).

合作伙伴中心提供数据驱动客户参与平台,可用于将通知发送到的所有应用程序的客户,或仅针对满足中已定义的条件的应用程序的Windows10客户的子集客户群Partner Center provides a data-driven customer engagement platform you can use to send notifications to all of your app's customers, or only targeted to a subset of your app's Windows 10 customers who meet the criteria you’ve defined in a customer segment. 此外可以创建要发送到客户的多个应用的通知。You can also create a notification to be sent to customers of more than one of your apps.

重要

此类通知仅可与 UWP 应用一起使用。These notifications can only be used with UWP apps.

当考虑通知的内容时,请记住:When considering the content of your notifications, keep in mind:

  • 通知内容必须符合应用商店内容策略The content in your notifications must comply with the Store Content Policies.
  • 通知内容不应包含机密信息或潜在敏感信息。Your notification content should not include confidential or potentially sensitive info.
  • 虽然我们将尽力按计划提供你的通知,但有时可能存在影响交付的延迟问题。While we’ll make every effort to deliver your notification as scheduled, there may occasionally be latency issues that impact delivery.
  • 请确保不要太频繁发送通知。Be sure not to send notifications too often. 频率高于每 30 分钟一次似乎会产生干扰(在很多情况下,最好不要超过该频率)。More than once every 30 minutes can seem intrusive (and for many scenarios, less frequently than that is preferable).
  • 请注意,如果使用你的应用(并且在确定类别成员身份时使用 Microsoft 帐户登录)的客户稍后会将其设备给其他人使用,则其他用户可能会看到面向原始客户的通知。Be aware that if a customer who uses your app (and is signed in with their Microsoft account at the time the segment membership is determined) later gives their device to someone to use, the other person may see the notification that was targeted at the original customer. 有关详细信息,请参阅针对定向推送通知配置应用For more info, see Configure your app for targeted push notifications.
  • 如果你向多个应用的客户发送相同的通知,你不能针对某个段;将向你选择的应用的所有客户发送通知。If you send the same notification to customers of multiple apps, you can't target a segment; the notification will be sent to all customers for the apps you select.

通知入门Getting started with notifications

在高级别上,需要完成三件事才能使用通知与客户接洽。At a high-level, you need to do three things to use notifications to engage with your customers.

  1. 注册应用以接收推送通知。Register your app to receive push notifications. 通过应用程序中添加对 Microsoft Store Services SDK 的引用,然后添加几行代码注册通知通道合作伙伴中心和你的应用之间执行此操作。You do this by adding a reference to the Microsoft Store Services SDK in your app and then adding a few lines of code that registers a notification channel between Partner Center and your app. 我们将使用该通道向你的客户传递通知。We’ll use that channel to deliver your notifications to your customers. 有关详细信息,请参阅针对定向推送通知配置应用For details, see Configure your app for targeted push notifications.
  2. 确定目标的用户。Decide which customers to target. 你可以向所有应用客户,或(对于为单个应用创建的通知)称为的客户组发送通知,具体可以根据人口统计或收入条件来定义。You can send your notification to all of your app's customers, or (for notifications created for a single app) to a group of customers called a segment, which you can define based on demographic or revenue criteria. 有关详细信息,请参阅创建客户类别For more info, see Create customer segments.
  3. 创建通知内容并将其发送出去。 例如,可能会创建一条通知,鼓励新客户对应用评级或发送通知将提升特殊交易购买外接程序。Create your notification content and send it out. For example, you might create a notification that encourages new customers to rate your app, or send a notification promoting a special deal to purchase an add-on.

创建并发送通知To create and send a notification

请按照下列步骤在合作伙伴中心创建通知并将其发送到特定客户群。Follow these steps to create a notification in Partner Center and send it to a particular customer segment.

备注

应用可以从合作伙伴中心接收通知之前,必须首先调用RegisterNotificationChannelAsync中你的应用以注册应用以接收通知的方法。Before an app can receive notifications from Partner Center, you must first call the RegisterNotificationChannelAsync method in your app to register your app to receive notifications. 此方法在 Microsoft Store Services SDK 中可用。This method is available in the Microsoft Store Services SDK. 有关如何调用此方法的详细信息以及代码示例,请参阅针对定向推送通知配置应用For more information about how to call this method, including a code example, see Configure your app for targeted push notifications.

  1. 在中合作伙伴中心,展开参与部分中,,然后选择通知In Partner Center, expand the Engage section, and then select Notifications.

  2. 通知页上,选择新通知On the Notifications page, select New notification.

  3. 在中选择模板部分中,选择类型的通知你想要发送,然后单击确定In the Select a template section, choose the type of notification you want to send and then click OK.

  4. 在下一页中,使用下拉菜单选择要为其生成通知的单个应用多个应用On the next page, use the drop-down menu to choose either a Single app or Multiple apps for which you want to generate a notification. 你可以仅选择应用已配置为使用 Microsoft Store Services SDK 接收通知You can only select apps that have been configured to receive notifications using the Microsoft Store Services SDK.

  5. 通知设置部分,选择通知名称,并选择通知发送目标的客户组(如果适用)。In the Notification settings section, choose a Name for your notification and, if applicable, choose the Customer group to which you want to send the notification. (通知发送到多个应用程序可以仅发送到这些应用程序的所有客户。)如果你希望使用尚未创建的段,请选择创建新客户组(Notifications sent to multiple apps can only be sent to all customers of those apps.) If you wish to use a segment that you haven't created already, select Create new customer group. 请注意,新段 24 小时之后才可用作通知。Note that it takes 24 hours before you can use a new segment for notifications. 有关详细信息,请参阅创建客户类别For more info, see Create customer segments.

  6. 如果你想要指定何时发送通知,清除立即发送通知复选框并选择特定的日期和时间(除非指定为使用每个客户的当地时区,否则所有客户均使用 UTC 时间)。If you want to specify when to send the notification, clear the Send notification immediately checkbox and choose a specific date and time (in UTC for all customers, unless you specify to use each customer's local time zone).

  7. 如果希望通知在某个时间点过期,请清除通知永远不会过期复选框,然后选择特定过期日期和时间(UTC 时间)。If you want the notification to expire at some point, clear the Notification never expires checkbox and choose a specific expiration date and time (in UTC).

  8. 有关为单个应用的通知: 如果要筛选收件人,以便通知仅发送给使用特定语言或位于特定时区的人员,请勾选使用筛选器复选框。For notifications to a single app: If you want to filter the recipients so that your notification is only delivered to people who use certain languages or are in specific time zones, check the Use filters checkbox. 然后你可以指定想要使用的语言和/或时区选项。You can then specify the language and/or time zone options you want to use.

  9. 有关为多个应用的通知: 指定是否只对 (每个客户),每台设备上的最后一个活动应用或每个设备上的所有应用发送通知。For notifications to multiple apps: Specify whether to send the notification only to the last active app on each device (per customer), or to all apps on each device.

  10. 在“通知内容”部分的“语言”菜单中,选择显示通知的语言。In the Notification content section, in the Language menu, choose the languages in which you want your notification to be displayed. 有关详细信息,请参阅翻译通知For more info, see Translate your notifications.

  11. 选项部分中,输入文本,然后配置其他任何要配置的选项。In the Options section, enter text and configure any other options you’d like. 如果首先使用的是模板,有些模板已默认提供,但可进行任何所需更改。If you started with a template, some of this is provided by default, but you can make any changes you'd like.

    可用选项各不相同,具体取决于所使用的通知类型。The available options vary, depending on which notification type you are using. 一些选项为:Some of the options are:

    • 激活类型(交互式 Toast 类型)。Activation type (interactive toast type). 可选择“前台”、“后台”或“协议”。You can choose Foreground, Background, or Protocol.
    • 启动(交互式 Toast 类型)。Launch (interactive toast type). 可选择使通知打开某个应用或网站。You can choose to have the notification open an app or website.
    • 跟踪应用启动率(交互式 Toast 类型)。Track app launch rate (interactive toast type). 如果想要测量通过每条通知与客户的交流程度,请选择此复选框。If you want to measure how well you’re engaging with your customers through each notification, select this checkbox. 有关详细信息,请参阅测量通知性能For more details, see Measure notification performance.
    • 持续时间(交互式 Toast 类型)。Duration (interactive toast type). 可选择You can choose Short or Long.
    • 方案(交互式 Toast 类型)。Scenario (interactive toast type). 可选择“默认”、“警报”、“提醒”或“来电”。You can choose Default, Alarm, Reminder, or Incoming call.
    • 基本 URI(交互式 Toast 类型)。Base URI (interactive toast type). 有关详细信息,请参阅 BaseUriFor more details, see BaseUri.
    • 添加图像查询(交互式 Toast 类型)。Add image query (interactive toast type). 有关详细想信息,请参阅 addImageQueryFor more details, see addImageQuery.
    • 视觉Visual. 图像、视频或声音。An image, video, or sound. 有关详细信息,请参阅视觉For more details, see visual.
    • 输入/操作/选择(交互式 Toast 类型)。Input/Action/Selection (interactive toast type). 允许你让用户通过通知交互。Allows you to let users interact with the notification. 有关详细信息,请参阅自适应和交互式 Toast 通知For more info, see Adaptive and interactive toast notifications.
    • 绑定(交互式磁贴类型)。Binding (interactive tile type). Toast 模板。The toast template. 有关详细信息,请参阅绑定For more details, see binding.

    提示

    请尝试使用通知可视化工具应用设计并测试自适应磁贴和交互式 Toast 通知。Try using the Notifications Visualizer app to design and test your adaptive tiles and interactive toast notifications.

  12. 选择“保存为草稿”,稍后继续处理该通知,或者在全部操作完成时选择“发送”。Select Save as draft to continue working on the notification later, or select Send if you’re all done.

通知模板类型Notification template types

可从大量通知模板中进行选择。You can choose from a variety of notification templates.

  • 空白 (Toast)。Blank (Toast). 首先从可自定义的空白 Toast 通知开始。Start with an empty toast notification that you can customize. Toast 通知是显示在屏幕上的弹出 UI,当客户在另一个应用中、在“开始”屏幕上或在桌面上时,通过 Toast 通知应用可与客户进行通信。A toast notification is a pop-up UI that appears on your screen to allow your app to communicate with the customer when the customer is in another app, on the Start screen, or on the desktop.

  • 为空白 (磁贴)。Blank (Tile). 首先从可自定义的空白磁贴通知开始。Start with an empty tile notification that you can customize. 磁贴是应用在“开始”屏幕上的表示形式。Tiles are an app's representation on the Start screen. 磁贴可以是“实时的”,这意味着它们显示的内容可以为了响应通知而进行更改。Tiles can be “live,” which means that the content that they display can change in response to notifications.

  • 寻求分级 (Toast)。Ask for ratings (Toast). 请求客户为应用评分的 Toast 通知。A toast notification that asks your customers to rate your app. 当客户选择此通知时,将显示应用的应用商店评分页面。When the customer selects the notification, the Store ratings page for your app is displayed.

  • 请求提供反馈 (Toast)。Ask for feedback (Toast). 请求客户为应用提供反馈的 Toast 通知。A toast notification that asks your customers to provide feedback for your app. 当客户选择此通知时,将显示应用的反馈中心页面。When the customer selects the notification, the Feedback Hub page for your app is displayed.

    备注

    如果选择此模板类型,则在启动框中,请记住使用应用实际的包系列名称 (PFN) 替换 {PACKAGE_FAMILY_NAME} 占位符值。If you choose this template type, in the Launch box, remember to replace the {PACKAGE_FAMILY_NAME} placeholder value with your app’s actual Package Family Name (PFN). 可在应用标识页中找到应用的 PFN(“应用管理” > “应用标识”)。You can find your app’s PFN on the App identity page (App management > App identity).

    反馈 Toast 启动框

  • 跨升级 (Toast)。Cross-promote (Toast). 推广所选其他应用的 Toast 通知。A toast notification to promote a different app of your choosing. 当客户选择此通知时,将显示其他应用的应用商店一览。When the customer selects the notification, the other app’s Store listing is displayed.

    备注

    如果选择此模板类型,则在启动框中,请记住使用要交叉推广的商品的实际应用商店 ID 替换 {要在此处推广的 ProductId} 占位符值。If you choose this template type, in the Launch box, remember to replace the {ProductId you want to promote here} placeholder value with the actual Store ID of the item you want to cross promote. 可在 应用标识页查找应用商店 ID(“应用管理” > “应用标识”)。You can find the Store ID on the App identity page (App management > App identity).

    交叉推广 Toast 启动框

  • 将提升销售 (Toast)。Promote a sale (Toast). 用于宣布达成应用交易的 Toast 通知。A toast notification that you can use to announce a deal for your app. 当客户选择此通知时,将显示应用的应用商店一览。When the customer selects the notification, your app’s Store listing is displayed.

  • 提示输入更新 (Toast)。Prompt for update (Toast). 鼓励运行旧版应用的客户安装最新版本的 Toast 通知。A toast notification that encourages customers who are running an older version of your app to install the latest version. 当客户选择此通知时,Microsoft Store 应用将启动,并显示下载和更新列表。When the customer selects the notification, the Store app will launch, showing the Downloads and updates list. 请注意,此模板仅用于单个应用,你无法针对特定的客户段或定义发送时间;我们始终会安排在 24 小时内发送此通知,并会尽最大努力覆盖尚未运行应用最新版本的所有用户。Note that this template can only be used with a single app, and you can't target a particular customer segment or define a time to send it; we’ll always schedule this notification to be sent within 24 hours, and making our best effort to target all users who are not yet running the latest version of your app.

测量通知性能Measure notification performance

可测量通过每条通知与客户的交流程度。You can measure how well you’re engaging with your customers through each notification.

测量通知性能To measure notification performance

  1. 创建通知时,请在“通知内容”部分中选中“跟踪应用启动率”复选框。When you create a notification, in the Notification content section, select the Track app launch rate checkbox.
  2. 在应用中,调用ParseArgumentsAndTrackAppLaunch方法以通知你的应用程序启动目标通知响应合作伙伴中心。In your app, call the ParseArgumentsAndTrackAppLaunch method to notify Partner Center that your app was launched in response to a targeted notification. 此方法由 Microsoft Store Services SDK 提供。This method is provided by the Microsoft Store Services SDK. 有关如何调用此方法的详细信息,请参阅将应用配置为接收合作伙伴中心通知For more information about how to call this method, see Configure your app to receive Partner Center notifications.

查看通知性能To view notification performance

已配置的通知和您的应用程序性能进行测量通知上文所述,可以看到如何执行您的通知。When you’ve configured the notification and your app to measure notification performance as described above, you can see how well your notifications are performing.

若要查看每个通知的详细的数据:To review detailed data for each notification:

  1. 在合作伙伴中心中,展开参与部分,并选择通知In Partner Center, expand the Engage section and select Notifications.
  2. 在现有通知表中,选择正在Completed,,然后查看传送速率应用启动率列,以查看每个通知的高级性能。In the table of existing notifications, select In progress or Completed, and then look at the Delivery rate and App launch rate columns to see the high-level performance of each notification.
  3. 若要查看更详细的性能细节,请选择通知名称。To see more granular performance details, select a notification name. 交货统计部分,可以查看以下通知状态类型的计数百分比信息:In the Delivery statistics section, you can view Count and Percentage info for the following notification Status types:
    • 失败:由于某种原因未传递通知。Failed: The notification was not delivered for some reason. 这可能会在 Windows 通知服务发生问题时出现。This can happen, for example, if an issue occurs in the Windows Notification Service.
    • 通道过期失败:无法传递通知,因为应用程序和合作伙伴中心之间的通道已过期。Channel expiration failure: The notification could not be delivered because the channel between the app and Partner Center has expired. 这可能会在客户长时间没有打开应用的情况下发生。This can happen, for example, if the customer has not opened your app in a long time.
    • 发送:通知是在发送队列中。Sending: The notification is in the queue to be sent.
    • 发送:已发送通知。Sent: The notification was sent.
    • 启动:发送通知的、 客户已单击它,并因此打开您的应用程序。Launches: The notification was sent, the customer clicked it, and your app was opened as a result. 请注意,这仅跟踪应用启动数。Note that this only tracks app launches. 此状态不包含邀请客户执行其他操作的通知,例如启动应用商店以留下评分。Notifications that invite the customer to take other actions, such as launching the Store to leave a rating, are not included in this status.
    • 未知:我们无法确定此通知的状态。Unknown: We weren’t able to determine the status of this notification.

若要分析的所有通知的用户活动数据:To analyze user activity data for all your notifications:

  1. 在合作伙伴中心中,展开参与部分,并选择通知In Partner Center, expand the Engage section and select Notifications.
  2. 通知页上,单击分析选项卡。此选项卡显示以下数据:On the Notifications page, click the Analyze tab. This tab displays the following data:
    • Toast 和操作中心通知的各种用户操作状态的关系图视图。Graph views of the various user action states for your toasts and action center notifications.
    • Toast 和操作通过率单击世界地图视图中心通知。World map views of the click-through-rates for your toasts and action center notifications.
  3. 在页面顶部附近,可以选择希望显示数据的时间段。Near the top of the page, you can select the time period for which you want to show data. 默认选择为 30D(30 天),但你可以选择要显示 3、6 或 12 个月的数据或指定的自定义数据范围的数据。The default selection is 30D (30 days), but you can choose to show data for 3, 6, or 12 months, or for a custom data range that you specify. 此外可以展开筛选器进行筛选的所有应用和市场数据。You can also expand Filters to filter all of the data by app and market.

翻译通知Translate your notifications

若要最大化发挥通知的影响力,请考虑将它们翻译为客户首选的语言。To maximize the impact of your notifications, consider translating them into the languages that your customers prefer. 合作伙伴中心轻松利用自动翻译您的通知Microsoft Translator服务。Partner Center makes it easy for you to translate your notifications automatically by leveraging the power of the Microsoft Translator service.

  1. 使用默认语言编写通知后,选择“添加语言”(在“通知内容”部分的“语言”菜单下)。After you’ve written your notification in your default language, select Add languages (beneath the Languages menu in the Notification content section).
  2. 在“添加语言”窗口下,选择用以显示通知的其他语言,然后选择“更新”。In the Add languages window, select the additional languages that you want your notifications to appear in, and then select Update. 通知将自动译为在“添加语言”中选择的语言,并且这些语言将添加到“语言”菜单。Your notification will be automatically translated into the languages you chose in the Add languages window and those languages will be added to the Language menu.
  3. 若要查看通知译文,请在“语言”菜单中选择刚才添加的语言。To see the translation of your notification, in the Language menu, select the language that you just added.

对于翻译需要记住的有关事项:Things to keep in mind about translation:

  • 在该语言的“内容”框中输入其他内容将覆盖自动译文。You can override the automatic translation by entering something different in the Content box for that language.
  • 如果在覆盖自动译文后向通知的英文版添加其他文本框,新文本框将不会添加到翻译后的通知。If you add another text box to the English version of the notification after you’ve overridden an automatic translation, the new text box will not be added to translated notification. 在这种情况下,需要将新文本框手动添加到每个翻译后的通知。In that case, you would need to manually add the new text box to each of translated notifications.
  • 如果在通知翻译后更改英文文本,我们将自动更新翻译的通知以匹配更改。If you change the English text after the notification has been translated, we’ll automatically update the translated notifications to match the change. 但是,如果之前已选择覆盖初始译文,这种情况将不会发生。However, this won’t happen if you previously chose to override the initial translation.