What type of GetEntitlements Response is received when a customer cancels his or her subscription before the expiry of the contract.

0

I am trying to integrate our product with AWS Marketplace using SaaS Contract plan. I am trying to implement a scenario where a customer deliberately cancels his subscription from the portal. Once I receive the SNS notification and call the GetEntitlments, how can I identify from the response that the contract has been cancelled. Please suggest.

PD
已提問 2 年前檢視次數 270 次
1 個回答
1
已接受的答案

There are two SNS topics available for use when it comes to SaaS products on AWS marketplace:

  1. aws-mp-entitlement-notification: This topic notifies you when buyers create a new contract, upgrade it, renew it, or it expires.
  2. aws-mp-subscription-notification: This topic notifies you when a buyer subscribes to or unsubscribes (cancels a subscription) from a product.

For your use-case scenario, you need to subscribe to the SNS topic "aws-mp-subscription-notification".

When a user does unsubscribe from a product, a notification will be published to the SNS topic and delivered to its subscription. The message structure will be as follows:

{
    "action": "<action-name>",
    "customer-identifier": " X01EXAMPLEX",
    "product-code": "n0123EXAMPLEXXXXXXXXXXXX",
    "offer-identifier": "offer-abcexample123",
    "isFreeTrialTermPresent":"true"
}

The JSON attribute "action" in the above message will contain the information you need. If a user unsubscribes, the "action" attribute will have the following values in two different notifications:

  1. "unsubscribe-pending": This action type message is sent first when a user unsubscribes. This indicates that the seller has a limited time to get final metering records sent before the buyer is cancelled completely.
  2. "unsubscribe-success": The unsubscribe-success message signals the completion of cancellation.

Therefore, as soon as you receive a "unsubscribe-pending" message over the SNS topic "aws-mp-subscription-notification", it is an indication of user unsubscribing from the product.

You do not have to call the GetEntitlement API call explicitly to get that information.

AWS
已回答 2 年前
  • Thanks for your detailed answer. As I am configuring a Contract Plan and i am not sending any metering records to AWS, in that case, does this 'unsubscribe-pending' still get received into this SNS? Also for a Contract plan, will this notification still be published into the Subscription - Notification queue?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南