傳送通知給您的應用程式客戶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 app。These notifications can only be used with UWP apps.

考慮您的通知內容時,請牢記︰When considering the content of your notifications, keep in mind:

  • 通知中的內容必須符合Microsoft Store內容原則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).
  • 請注意,如果使用您的 App (並且在確定區隔會員資格後使用其 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. 如需詳細資訊,請參閱針對確定目標推播通知設定您的 AppFor 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. 您可以將通知傳送給 App 所有的客戶或 (針對單一 App 所建立的通知) 稱為區隔的客戶群組 (您可以根據人口統計資料或營收準則定義此群組)。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服務 SDKThis 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:

    • 啟用類型 (互動式快顯通知類型)。Activation type (interactive toast type). 您可以選擇 [前景]、[背景] 或 [通訊協定]。You can choose Foreground, Background, or Protocol.
    • 啟動 (互動式快顯通知類型)。Launch (interactive toast type). 您可以選擇讓通知開啟 app 或網站。You can choose to have the notification open an app or website.
    • 追蹤應用程式啟動速率 (互動式快顯通知類型)。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.
    • 持續時間 (互動式快顯通知類型)。Duration (interactive toast type). 您可以選擇 [短期] 或 [長期]。You can choose Short or Long.
    • 案例 (互動式快顯通知類型)。Scenario (interactive toast type). 您可以選擇 [預設]、[警示]、[提醒] 或 [來電]。You can choose Default, Alarm, Reminder, or Incoming call.
    • 基底 URI (互動式快顯通知類型)。Base URI (interactive toast type). 如需詳細資訊,請參閱 BaseUriFor more details, see BaseUri.
    • 新增影像查詢 (互動式快顯通知類型)。Add image query (interactive toast type). 如需詳細資訊,請參閱 addImageQueryFor more details, see addImageQuery.
    • 視覺效果Visual. 影像、視訊或音效。An image, video, or sound. 如需詳細資訊,請參閱視覺效果For more details, see visual.
    • 輸入/動作/選取項目 (互動式快顯通知類型)。Input/Action/Selection (interactive toast type). 可讓使用者與通知互動。Allows you to let users interact with the notification. 如需詳細資訊,請參閱調適型和互動式快顯通知For more info, see Adaptive and interactive toast notifications.
    • 繫結 (互動式磚類型)。Binding (interactive tile type). 快顯通知範本。The toast template. 如需詳細資訊,請參閱繫結For more details, see binding.

    提示

    請嘗試使用通知視覺化檢視應用程式來設計和測試您的調適型磚和互動式快顯通知。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.

  • 空白 (快顯通知)。Blank (Toast). 以可自訂的空白快顯通知開始。Start with an empty toast notification that you can customize. 快顯通知是顯示在畫面上的快顯 UI,無論使用者是在另一個 app、在 [開始] 畫面或是在桌面,都能讓 app 與客戶進行通訊。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. 磚是 app 在 [開始] 畫面上的呈現方式。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.

  • 尋求分級 (快顯通知)。Ask for ratings (Toast). 要求客戶為您的 app 評等的快顯通知。A toast notification that asks your customers to rate your app. 當客戶選取通知時,會顯示 app 的市集評等頁面。When the customer selects the notification, the Store ratings page for your app is displayed.

  • 要求意見反應 (快顯通知)。Ask for feedback (Toast). 要求客戶為您的 app 提供意見的快顯通知。A toast notification that asks your customers to provide feedback for your app. 當客戶選取通知時,會顯示 app 的 [意見反應中樞] 頁面。When the customer selects the notification, the Feedback Hub page for your app is displayed.

    注意

    如果您選擇這個範本類型,在 [啟動] 方塊中,記得將 {PACKAGE_FAMILY_NAME} 預留位置值取代為您的應用程式實際套件系列名稱 (PFN)。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). 您可以在 App 身分識別頁面 ([App 管理] > [App 身分識別]) 上找到 app 的 PFN。You can find your app’s PFN on the App identity page (App management > App identity).

    意見反應快顯通知 [啟動] 方塊

  • 跨升級 (快顯通知)。Cross-promote (Toast). 宣傳您選擇的其他 app 的快顯通知。A toast notification to promote a different app of your choosing. 當客戶選取通知時,會顯示其他 app 的市集清單。When the customer selects the notification, the other app’s Store listing is displayed.

    注意

    如果您選擇這個範本類型,在 [啟動] 方塊中,記得將 {您想在此促銷的 ProductId} 預留位置值取代為您想聯合促銷之項目的實際Microsoft Store識別碼。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. 您可以在 App 身分識別頁面 ([App 管理] > [App 身分識別]) 上找到市集識別碼。You can find the Store ID on the App identity page (App management > App identity).

    交叉宣傳快顯通知 [啟動] 方塊

  • 升級銷售 (快顯通知)。Promote a sale (Toast). 可用來宣告 app 優惠的快顯通知。A toast notification that you can use to announce a deal for your app. 當客戶選取通知時,會顯示您的 app 的市集清單。When the customer selects the notification, your app’s Store listing is displayed.

  • 提示您輸入更新 (快顯通知)。Prompt for update (Toast). 鼓勵執行您的舊版 app 的客戶安裝最新版的快顯通知。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. 請注意,此範本只能用於單一 App,您無法以特定客戶區隔為目標,也不能定義傳送的時間;我們一律將此通知排程在 24 小時內傳送,但會盡最大努力將目標設定為所有尚未執行您的最新版本 App 的使用者。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. 當您建立通知時,請在 [通知內容] 區段選取 [追蹤 app 啟動速率] 核取方塊。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. 在資料表中現有的通知,選取正在已完成,然後看傳遞速率應用程式啟動速率資料行,以查看每個通知的高層級的效能。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. 例如,如果客戶長時間未開啟您的 app,這個情況就會發生。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. 請注意,這只會追蹤 app 啟動。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:
    • 您的快顯通知及重要訊息中心通知的各種使用者動作狀態的圖形檢視。Graph views of the various user action states for your toasts and action center notifications.
    • 按一下-透過-費率的快顯通知和動作的世界地圖檢視置中的通知。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.