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


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.

1 réponse
Réponse acceptée

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",

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.

répondu il y a 2 ans
profile picture
vérifié il y a 2 mois
  • 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?

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions