Understand Buy with Prime on Salesforce Commerce Cloud
Buy with Prime API is now available for early access
Sign up for early access to the Buy with Prime API using the 'Sign Up' button below. The API may change as Amazon receives feedback and iterates on it.
How Buy with Prime integrates with Salesforce Commerce Cloud
Buy with Prime integrates into your ecommerce stack, enabling you to use your existing Salesforce Reference Architecture (SFRA) storefront, payment service provider (PSP), order management system (OMS), and enterprise resource planning (ERP) solution.
You can use the Buy with Prime cartridge for Salesforce B2C Commerce to integrate Buy with Prime functionality into your Salesforce Commerce Cloud site. The Buy with Prime cartridge provides user interface elements across your product listing pages (PLPs), product detail pages (PDPs), cart, and checkout. The cartridge also updates the Salesforce Business Manager tool to facilitate configuration and management, for example for uploading your product catalog. The Buy with Prime cartridge is built on the Buy with Prime API, allowing you to further customize your architecture if you want. For details about installing the cartridge, see Install the Buy With Prime Cartridge.
When a shopper places an order, your existing process authorizes payment with your PSP, and the Buy with Prime cartridge appends information to the Salesforce order document before sending the document to your OMS. As a result, your OMS has the information about which items on the order to fulfill via Amazon, and the data necessary to process the order, for example the shipping address. Your process takes payment from your PSP when an item ships, and sends the full order to your ERP solution to recognize the revenue.
Your systems remain the source of truth for order information. Throughout the lifecycle of an order, Amazon sends order status events, for example DELIVERY_IN_TRANSIT
, ITEM_DELIVERED
, or DELIVERY_CANCELLED
. Your OMS consumes the Buy with Prime events in a similar way to consuming information from a third-party logistics (3PL) provider or from your warehouses. Your downstream systems, for example your customer service tools, have the information about orders containing items that are eligible for Buy with Prime.
Design considerations for integrating with Buy with Prime
If you use SFRA as the technology for your storefront, supporting Buy with Prime on your ecommerce stack primarily involves the following design considerations:
- Which PSP you want to use, and how you authorize and take payment for orders that contain products that are eligible for Buy with Prime. For details, see Payment service provider considerations.
- Which OMS, if any, you want to use, and how you want your OMS to submit fulfillment requests to Amazon for items that are eligible for Buy with Prime, while receiving and acting on order status updates. For details, see OMS considerations.
- How you handle events to help ensure that you get the correct data into the systems in your ecommerce stack. For details, see Event handling considerations.
Payment service provider considerations
When you use Amazon Pay as a PSP, Amazon supports the entire shopper journey, from the shopper logging into their Amazon account, to supplying their shipping address, to using their digital wallet for payment. This flow helps reduce friction for the shopper when making purchases on your site. The Buy with Prime cartridge supports this flow out of the box. For details about installing and configuring the Amazon Pay v2 cartridge, see the Amazon Pay documentation for Upgrading to Checkout v2 and in the Choose your initial implementation box, choose Salesforce Commerce Cloud.
If you want to use a PSP other than Amazon Pay, you can use Login with Amazon (LWA) to launch Buy with Prime. LWA enables a shopper to log into their Amazon account and provides their Prime member status and shipping information. When the shopper checks out, the shopper can choose from your site's existing payment methods and enter their payment information. The Buy with Prime cartridge also supports this flow out of the box. For details, see Use Login with Amazon for Shopper Identity.
When implementing your PSP, keep in mind the variety of shopper relationships with Amazon. The shopper might have an Amazon account, might have an Amazon account and be a Prime member, or might not have an Amazon account. Make sure to test all cases when testing your implementation.
Order management system considerations
The OMS has a central role in the context of Buy with Prime. Your OMS needs to:
- Recognize when an order contains an item that is eligible for Buy with Prime
- Route items appropriately, including to your own warehouses or 3PL provider for items not eligible for Buy with Prime
- Subscribe to order status events
- Take payment from a PSP
- Handle any post-order requests, for example cancellations, returns, and refunds.
If you use the Salesforce OMS, you can use the Salesforce managed package for Buy with Prime to configure the OMS. For details, see Salesforce OMS Package for Buy with Prime.
If you use a different OMS, you may need to modify your system. Most OMS solutions can support split shipments that route multiple line items on a single order to different fulfillment locations, add Amazon as a new fulfillment node, and take payment from a PSP.
If you don't use an OMS or want to avoid modifying your system, consider using the fulfillment implementation built into the Buy with Prime cartridge. The cartridge can split the order and submit the fulfillment to Amazon for relevant line items. If you use the cartridge for fulfillment, also subscribe to order status events and consume the events in your OMS or ERP solution to help ensure that your downstream systems operate as expected. For details, reach out to your Buy with Prime solutions architect.
Event handling considerations
Amazon sends thin events to help you update your ecommerce systems with relevant data for Buy with Prime. When your system receives a thin event, you make a GraphQL call to retrieve the information that your system expects. Thin events help reduce compute costs by narrowing your request to only the information you need. For example, when Amazon sends an ITEM_DELIVERED
event upon delivering an item to a shopper, you then make a call to retrieve information that is relevant for your system, for example the delivery time.
You may want the event to be delivered to a specific component in your system that consumes the event. For example, you may want your OMS to consume ITEM_DELIVERED
events and your ERP solution to consume INVENTORY_CHANGED
events. To support delivery of Buy with Prime events, you can use an AWS EventBridge implementation or a webhooks implementation.
Through AWS EventBridge, you can subscribe to events to be sent to locations of your choosing. Locations might include an endpoint in your OMS, ERP solution, Salesforce Commerce Cloud site, middleware provider, or your own custom endpoint. Upon receiving a thin event, your system can then make an API call to get further information about the resource that changed. For details about subscribing to events using AWS EventBridge, see Steps to Subscribe to Buy with Prime Events.
With the webhooks implementation for events, you specify your webhook endpoint where you want to receive thin events for Buy with Prime. Upon receiving a thin event, you can then make an API call to get further information about the resource. Consider using webhooks if you're unfamiliar with AWS, or if you already have components that receive information about resources and deliver the information to your downstream systems. For details about using webhooks, see Event Interface.
Other design considerations
You may want to update your ERP solution to help ensure that inventory data and financial transaction data flows as expected. For details, reach out to your Buy with Prime solutions architect.
If you're using a different storefront technology than SFRA, for example Salesforce SiteGenesis; Salesforce Composable Storefront, formerly Progressive Web Application (PWA) Kit; or a custom headless site, the design considerations still apply.
Modifying your systems for returns and refunds
When you integrate with Buy with Prime, you might need to make changes to your existing ecommerce system to handle the flows for refunds and returns.
You may need to modify your OMS to accept updates from Amazon related to the shopper returning an item. A shopper can follow a self-service process with Amazon to return an item that is eligible for Buy with Prime. For example, the shopper can open their Amazon app, create a QR code from their order history, and return the item to their preferred label-free, box-free drop-off location. Unless you use a 3PL provider that recognizes the flow with Amazon for initiating a return or cancellation, you may need to modify your OMS to accept updates from Amazon.
You may also need to modify your OMS so that your OMS starts a refund process with your PSP based on updates from Amazon. For example, after Amazon confirms that a shopper has completed a return, Amazon sends an event indicating that itβs time to issue the shopper a refund. After you issue a refund, your OMS also needs to send confirmation of the refund to Amazon so that Amazon can maintain accurate order details. Confirming the refund helps to ensure that, for example, the shopper's Amazon order history shows the refund for the item.
You can still accept returns for items eligible for Buy with Prime via your own returns process. For example, you can allow a shopper to return an online purchase to a brick-and-mortar retail store. If you accept a return in this way, your OMS needs to inform Amazon when the refund is complete.
Related topics
Install the Buy With Prime Cartridge
Use Login with Amazon for Shopper Identity
Steps to Subscribe to Buy with Prime Events
Updated 3 days ago