Configure the Buy with Prime Cartridge
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.
After you install the Buy with Prime cartridge, you must configure the cartridge to work with your site. You can also edit settings in the cartridge to customize the appearance of Buy with Prime on your site.
For details about installing the cartridge, see Install the Buy With Prime Cartridge.
Assign the Buy with Prime cartridge to your site
If you are using the Storefront Reference Architecture (SFRA) functionality, do the following to assign the Buy with Prime cartridge to your site.
- Open the Business Manager tool for Salesforce Commerce Cloud.
- On the Administration menu, click Sites, and then click Manage Sites.
- Click the name of the site that you want to integrate with Buy with Prime.
- Click the Settings tab.
- In the Cartridges field, add
int_buywithprime_sfra
andint_buywithrime
to the colon-separated list of cartridges.
For example, if you are using Amazon Pay as your payment service provider (PSP), specifyint_buywithprime:int_buywithprime_sfra:int_amazonpay:int_amazonpay_sfra:app_storefront_base
. If you are using your own PSP, specifyint_buywithprime:int_buywithprime_sfra:int_YOUR_PSP:app_storefront_base
. - Click Apply.
Configure the preferences for your PSP
If you are using Amazon Pay as your payment service provider (PSP), configure the preferences for the Amazon Pay cartridge. For details, see Install the Buy with Prime Cartridge.
If you are using your own PSP, do the following to configure Login with Amazon.
- Open the Business Manager tool for Salesforce Commerce Cloud.
- On the Merchant Tools menu, click Site Preferences, and then click Custom Preferences.
- Click Login_with_Amazon, and then in the Login with Amazon Security Profile App Client ID box, enter your app client ID.
- In the upper right corner, click Save.
Configure the preferences for your site
At minimum, you must configure the following site preferences for Buy with Prime. For the full list of site preferences, see Site preferences for the Buy with Prime cartridge .
- Open the Business Manager tool for Salesforce Commerce Cloud.
- On the Merchant Tools menu, click Site Preferences, click Custom Preferences, and then click Buy_with_Prime.
- Do the following:
- For Buy With Prime Enabled, choose Yes.
- For BWP Enabled Countries, enter the ISO alpha-2 country code for a country where you want to enable Buy with Prime, and then click Add. To add another country, enter another country code and then click Add.
- For bwpMode, choose Sandbox or Live.
- For BWP_Payment_Processor, choose your payment processor.
- For Buy with Prime Shipping Method ID, enter the identifier for the shipping method for Buy with Prime for your site. The shipping method must match the shipping method configured for Buy with Prime in Salesforce Commerce Cloud.
- For BwP Target ID, enter the target identifier that is part of your API credentials that you generated in the Buy with Prime merchant console. For details about the API credentials, see Authenticate to the Buy with Prime API.
- For BWP_Inventory_List_ID, enter the inventory list identifier from Salesforce Commerce Cloud for your inventory records for Buy with Prime.
- In the upper right corner, click Save.
Site preferences for the Buy with Prime cartridge
The following table shows the site preferences for the Buy with Prime cartridge in the order in which they appear in the Business Manager tool for Salesforce Commerce Cloud.
Site preference | Description, including the label shown in Business Manager |
---|---|
BWP_Enabled | Buy With Prime Enabled. Global switch that enables the Buy with Prime features on your site. |
BWP_Enabled_Country_List | BWP Enabled Countries. Set of strings where you specify the ISO alpha-2 country code for each country where you want to enable Buy with Prime features. |
BWP_Clickstream | Buy With Prime Clickstream. Global switch that enables the clickstream tracking for Buy with Prime. |
bwpMode | bwpMode. String enumeration where you specify whether to use the sandbox mode or live mode of Buy with Prime. |
BWP_Payment_Processor | BWP_Payment_Processor. String enumeration where you specify the payment processor for your site. |
BWP_Shipping_Method_ID | Buy With Prime Shipping Method ID. Identifier for the shipping method for Buy with Prime for your site. The shipping method must match the shipping method configured for Buy with Prime in Salesforce Commerce Cloud. |
BWP_Enable_Eligibility | Enable the Prime Eligibility API service. Switch that enables checking when a shopper logs in to Amazon whether they are a Prime member. When testing your site in a sandbox environment with shoppers who aren't Prime members, consider disabling this service. |
BWP_Cart_Button_Enabled | Cart Button Enabled. Switch that enables the Buy with Prime button in the shopping cart. |
BWP_Mini_Cart_Button_Enabled | Mini Cart Button Enabled. Switch that enables the Buy with Prime button in the miniature cart flyout. |
BWP_Cart_Elements_Enabled | Cart Elements Enabled. Switch that enables the brand assets in the shopping cart, for example the Prime checkmark logo and the delivery estimate. |
BWP_PDP_Elements_Enabled | PDP Elements Enabled. Switch that enables the brand assets on the product detail page (PDP), for example the Prime checkmark logo and the delivery estimate. |
BWP_PLP_Badge_Enabled | PLP Badge Enabled. Switch that enables the Prime checkmark logo on the product listing page (PLP) for the products eligible for Buy with Prime. |
BWP_API_Max_Variants | Maximum API Batch Variants. Maximum number of variants to prefetch in a bulk call to the deliveryPreview API to cache on the PDP. |
BWP_Quick_View_Button_Enabled | Buy With Prime Quick View Button. Switch that enables the Buy with Prime button in the quick-view modal window. Clicking the button adds the product to the shopping cart and initiates the Buy with Prime checkout flow. |
BWP_Quick_View_Elements_Enabled | Buy With Prime Quick View Elements. Switch that enables the brand assets in the quick-view modal window, for example the Prime checkmark logo and the delivery estimate. |
BWP_Checkout_Login_Enabled | Display Buy with Prime button within Checkout Login Step. Switch that enables the Buy with Prime button on the login step in the checkout flow. |
BWP_Checkout_Shipping_Enabled | Display Buy with Prime button within Shipping Step. Switch that enables the Buy with Prime button on the shipping step in the checkout flow. |
BWP_Initiate_Fulfillment_Place_Order_Enabled | Enable Real-Time Order Updates. Switch that enables calling updateOrder to initiate fulfillment when the shopper places the order. If disabled, the call instead goes to createOrder to reserve the items in a hold state. |
AmzBwPTargetId | BwP Target ID. Target identifier that is part of your API credentials generated in the Buy with Prime merchant console at https://console.buywithprime.amazon.com/. For details about the API credentials, see Authenticate to the Buy with Prime API. |
bwpTimeoutConfig | Front End API timeout JSON. Data in JSON format that specifies the site components with Buy with Prime API calls, and the timeout for each component in milliseconds, as shown in the following example: { "delivery": { "product": 10000, "search": 10000, "cart": 10000 }, "returns": { "product": 5000, "search": 5000, "cart": 5000 } } |
sfccOrderDetailsURL | SFCC Order Details URL. String to pass to the Buy with Prime API to link to an order that contains a mix of items eligible for Buy with Prime and not eligible for Buy with Prime. Specify the URL that you would give a shopper to view their order details. This field supports passing the order number as {orderNo} within the URL or as a query parameter, for example http://yoursite.com/order/details?orderNo={orderNo} or http://yoursite.com/order/details/{orderNo} . |
BWP_Inventory_List_ID | BWP Inventory List ID. Inventory list identifier from Salesforce Commerce Cloud for your inventory records for Buy with Prime. |
Configure the styles for your site
Do the following to optionally configure style preferences to customize the appearance of Buy with Prime on your site. For the list of style preferences, see Style preferences for the Buy with Prime cartridge .
- Open the Business Manager tool for Salesforce Commerce Cloud.
- On the Merchant Tools menu, click Site Preferences, click Custom Preferences, and then click Amazon_BWP_Styles.
- Edit the value for the style preference that you want to modify.
- In the upper right corner, click Save.
Style preferences for the Buy with Prime cartridge
The following table shows the style preferences for the Buy with Prime cartridge in the order in which they appear in the Business Manager tool for Salesforce Commerce Cloud.
Style preference | Description, including the label shown in Business Manager |
---|---|
BwPContainerColor | Buy with Prime Container Color. Hex color code or RGB color code for the background color of the HTML div element containing the visual assets for Buy with Prime. |
BwPBrandName | Brand name. Brand name to show in the copy displayed for Buy with Prime in the checkout flow, for example Check out using Buy with Prime right here on {BrandName}. If you don't specify a value, the copy refers only to Buy with Prime, for example Check out using Buy with Prime right here. |
BwPCornerRadius | Button Corner Radius. Shape of the corners of the Buy with Prime button. |
BwPButtonHeight | Button Height. Height of the Buy with Prime button, in units of line height. |
BwPButtonWidth | Button Width. Width of the Buy with Prime button as a percentage of the default size of the button. |
BwPDeliveryColor | Delivery Date Font Color. Foreground color of the text that shows the delivery estimate. |
BwPButtonTransparency | Button Background Transparency. Transparency setting for the background of the Buy with Prime button. |
BwPDeliveryDateFont | Delivery Date Font. Typeface for the text that shows the delivery estimate. |
BwPDeliveryFontSize | Delivery Date Font Size. Font size for the text that shows the delivery estimate, in rem units. |
BwpPdpButtonHeight | PDP Button Height. Height of the Buy with Prime button on the product detail page (PDP), in units of line height. |
BwpPdpButtonTransparency | PDP Button Background Transparency. Transparency setting for the background of the Buy with Prime button on the PDP. |
BwpPdpButtonWidth | PDP Button Width. Width of the Buy with Prime button on the PDP as a percentage of the default size of the button. |
BwpPdpCornerRadius | PDP Button Corner Radius. Shape of the corners of the Buy with Prime button on the PDP. |
Configure the services for your site
To communicate with the Buy with Prime API, enter your Buy with Prime API credentials as your service credentials in Salesforce Commerce Cloud. For details about how to generate your API credentials, see Authenticate to the Buy with Prime API. Do the following to configure the auth
service, and leave other services unchanged.
- Open the Business Manager tool for Salesforce Commerce Cloud.
- On the Administration menu, click Operations, and then click Services.
- Verify that the Service Configuration previously named
amazon.bwp.auth.RefArch
is namedamazon.bwp.auth.SITE_ID
, whereSITE_ID
is the name of your site in Business Manager. For details, see Install the Buy With Prime Cartridge. - In the Service Credential associated with
amazon.bwp.auth.SITE_ID
, enter your API credentials from the Buy with Prime merchant console at https://console.buywithprime.amazon.com/.- For URL, leave the field blank.
- For Username, enter your client ID for Buy with Prime.
- For Password, enter your client secret for Buy with Prime.
Additionally, if you're using Login with Amazon and using your own PSP, do the following:
- Open the Service Credential associated with the Service Configuration
amazon.api
. - Enter your Login with Amazon OAuth credentials. For details, see Integrate Login with Amazon with Your Site.
- For URL, enter
https://api.amazon.com
. - For Username, enter your client ID from Login with Amazon.
- For Password, enter your client secret from Login with Amazon.
- For URL, enter
Related topics
Install the Buy With Prime Cartridge
Authenticate to the Buy with Prime API
Updated 8 days ago