Skip to main content

Prime Notification System

Prime Notification System leverages Amazon SNS to easily push real-time notification messages to our 3P Partners regarding Prime members engaging with 3P provided exclusive offers and benefits. These messages or events enable our 3P Partners to take appropriate actions and continue to provide Prime members the best customer experience.

One of the key aspects required by this event notification system is the data related to mapping of an Amazon customer on the 3P client side. This is essential in accurately notifying 3P clients on the changes in Prime member’s benefit state.

Please refer to Account Linking API integration guide here to link and maintain this mapping relationship before starting Notification System onboarding.

Notification System​

Through this system, Prime informs clients for any event of interest. Some of the identified events of interest for Phase 1 are as follows:

  • Customer benefit deactivation (Change in Customer’s Prime state).
  • Customer consent revocation (Change in LWA/APay consent status for Prime scope).

Overall interaction between Amazon and clients is represented by the following diagram: Notification System

Prime gets the consent revocation and prime subscription change events from internal event sources. Using this data, Prime systems determine if the event notification needs to be sent to client or not. Once Prime systems decide that the event is relevant for the client, Prime sends the notification to client owned SQS.

Some of the important information that would be available in the notification message is listed below.

  • ClientCustomerId: This is same ClientCustomerId that clients need to send as part of Account Linking API.
  • EventType: EventType is the type of event.
    • PrimeStateChangeEvent - When a customer changes their Prime membership state. Amazon (our notification system) sends this event and the 3P client receives it. It covers two state transitions, but is only sent for customers whose account is already linked (see Account Linking):
      • Prime → Non Prime: a linked Prime member's status changes to Non Prime (e.g. cancellation). This is the default behavior and is enabled for all onboarded marketplaces.
      • Non Prime → Prime: a linked Non Prime customer becomes a Prime member (a "Contract Sign Up"). This direction is an optional add-on and is not enabled for all marketplaces by default — it requires prior agreement with the 3P client that they will take action (e.g. re-activate the offer) when a customer re-signs up for Prime. Reach out to your Prime point of contact to enable it. Note it also only fires when the account is already linked — a brand new sign-up on an unlinked account does not generate a notification.
    • ConsentRevocationEvent - When Customer revokes their LWA consent
    • AmazonPayConsentRevocationEvent - When Customer revokes their APay consent for Prime scope
  • EventData: This holds the main information about the event.
  • Other details like date and eventId.

Once client gets this notification about a customer changing its state, they need to invoke our Benefit Discovery API again to check if the customer is still eligible for the 3P offer or not.

Onboarding Steps​

Since we are using SNS + SQS system to push messages to the SQS, the onboarding steps are as follows:

  1. Prime creates a client specific SNS Topic and provides its ARN for clients to subscribe.
  2. Clients create SQS Queue(s) and provide its ARN for Prime to allow list for creating subscription.
  3. Once the allow listing is done, clients can follow this doc to subscribe to the notifications.
Region requirement

The Prime Notification System currently only supports the eu-south-2 region, which is an opt-in region. If eu-south-2 is not enabled on your AWS account, you must opt in to the eu-south-2 region before creating your SQS queue(s) so that the subscription between your SQS queue and Prime's SNS notification topic can be established. See Enabling a Region for how to opt in.

Message Format​

Main Message​

{
"clientCustomerId" : "<UUID>",
"eventType" : "<eventType>",
"marketplace" : "US",
"notificationMetaData" : {}
}
FieldData TypeDescription
clientCustomerIdStringCustomer identifier for third party clients.
eventTypeEnumPrimeStateChangeEvent/ConsentRevocationEvent/AmazonPayConsentRevocationEvent will be the type of event which has led to the notification roll out.
marketplaceStringMarketplace of the customer.
notificationMetaDataMap<String, Object>Notification metadata, if any.

SQS Message​

{
"Type" : "Notification",
"MessageId" : "5758e351-cd0d-592c-98df-b8e40255013d",
"TopicArn" : "arn:aws:sns:us-east-1:882939644104:NotificationInfrastructure-beta-NA-xyz
"Message" : "{\n \"clientCustomerId\" : \"<UUID>\",\n \"eventType\" : \"PrimeStateChangeEvent\",\n \"marketplace\" : \"US\",\n \"notificationMetaData\" : \"{}\"\n }
"Timestamp" : "2022-10-04T06:05:12.018Z",
"SignatureVersion" : "1",
"Signature" : "JoVyR31d0U/iWo/hgqerVpQM1cnoR3Rkom8L5bX3SjervQ9EUONObaOEzPERhh1tqV7vo
"SigningCertURL" : "https://sns.us-east-1.amazonaws.com/SimpleNotificationService-56
"UnsubscribeURL" : "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&Subscrip
}

Note: Clients need to parse the main message from the SQS message by parsing the Message field from above.

User Stories​

User Story 1 is the baseline CX and API calls when a Prime customer enters redemption CX for the first time.

User StoryAmazon Notify 3P?Prime Notification Event Type3P calls Benefits Discovery API?3P CX Impact3P calls Account Linking API?Linking StatusPrime CX Impact
As a Prime customer, I redeem Prime x 3P benefitNoN/AYesPrime x 3P benefit is activatedYes (benefitStatus: Active)LinkedOn next visit, Customer is identified as 'Redeemed' Prime member.
As a Linked & Redeemed Prime customer, I cancel my Prime membershipYesPrimeStateChangeEventYesPrime x 3P benefit is cancelledYes (benefitStatus: Inactive)LinkedOn next visit, Customer is identified as Non Prime member.
As a Linked Non Prime customer, I become a Prime member (Contract Sign Up)YesPrimeStateChangeEventYesPrime x 3P benefit is activatedYes (benefitStatus: Active)LinkedOn next visit, Customer is identified as Prime member and can redeem the 3P benefit.
As a Linked & Redeemed Prime customer, I revoke my LWA consentYesConsentRevocationEventNoPrime x 3P benefit is cancelledNoUnlinkedOn next visit, Customer is identified as 'Unredeemed' Prime member.
As a Linked & Redeemed Prime customer, I revoke my APay consent for Prime scopeYesAmazonPayConsentRevocationEventNoPrime x 3P benefit is cancelledNoUnlinkedOn next visit, Customer is identified as 'Unredeemed' Prime member.