Install and Configure the Connector Cartridge for Buy with Prime
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.
The connector cartridge for Buy with Prime is an adapter that helps you integrate the Buy with Prime Cartridge for Salesforce Commerce Cloud with the Salesforce order management system (OMS). The connector cartridge takes relevant parameters from the main Buy with Prime cartridge and the Amazon Pay cartridge and creates namespaced counterparts in the connector cartridge. Jobs that synchronize Salesforce Commerce Cloud with the Salesforce OMS can read from the connector cartridge and store the values in the Salesforce OMS.
The following walks you through installing and configuring the connector cartridge in your Salesforce B2C Commerce instance. You need the connector cartridge if you're using the Buy with Prime cartridge in conjunction with the Salesforce OMS. If you aren't using the Salesforce OMS in your integration, you don't need the connector cartridge and can skip the following procedures.
Prerequisites
Set up your development environment
Set up your development environment with the following:
- An integrated development environment (IDE) of your choice.
- Node.js version 14.19 or later. For details about downloading and installing Node.js, see the Node.js website.
- Tools configured to upload your cartridges to Salesforce Commerce Cloud. For details, see the Salesforce documentation at Upload and Configure Cartridges.
Install and configure the Buy with Prime cartridge for Salesforce Commerce Cloud
Install and configure the main Buy with Prime Cartridge for Salesforce Commerce Cloud. If you install the connector cartridge without the Buy with Prime cartridge or vice versa, fields cannot be synchronized between Salesforce Commerce Cloud and the Salesforce OMS.
Clone the connector cartridge
Clone the connector cartridge. For details about the Git repository that contains the connector cartridge, work with your Buy with Prime solutions architect.
Install and upload the connector cartridge
Do the following to add the connector cartridge to your workspace and then upload the cartridge:
- Open your IDE.
- Navigate to the tools to add a directory to a workspace.
- Browse to the directory where you cloned the connector cartridge.
- Add the root folder for the connector cartridge to your workspace.
- Use that tools that you've configured to upload your cartridge to Salesforce Commerce Cloud. For details, see the Salesforce documentation at Upload and Configure Cartridges.
Verify that you successfully uploaded the connector cartridge
Do the following:
- Open the Business Manager tool for Salesforce Commerce Cloud.
- From the Administration menu, under Site Development, click Code Deployment.
- Click the link for the code version that you uploaded.
- On the Version Summary page, verify that the connector cartridge appears in the list of cartridges.
Update the cartridge path to give precedence to the connector cartridge
You need to make the connector cartridge override the main Buy with Prime cartridge so that fields can be synchronized from Salesforce Commerce Cloud to the Salesforce OMS. The int_buywithprime_oms_connector_sfra
and int_buywithprime_oms_connector
cartridges must take precedence over the main Buy with Prime cartridge.
Do the following to update the cartridge path:
- Open the Business Manager tool for Salesforce Commerce Cloud.
- From the Administration menu, under Sites, click Manage Sites.
- Click the name of the site that has your Buy with Prime integration.
- Click the Settings tab.
- In the Cartridges field, place
int_buywithprime_oms_connector_sfra
andint_buywithprime_oms_connector
in the leftmost position in the colon-separated list of cartridges.
For example, if you're using the Buy with Prime cartridge and using Amazon Pay as your payment service provider (PSP), specifyint_buywithprime_oms_connector:int_buywithprime_oms_connector_sfra:int_buywithprime:int_buywithprime_sfra:int_amazonpay:int_amazonpay_sfra:app_storefront_base
. If you're using the Buy with Prime cartridge with your own PSP, specifyint_buywithprime_oms_connector:int_buywithprime_oms_connector_sfra:int_buywithprime:int_buywithprime_sfra:int_YOUR_PSP:app_storefront_base
. - Click Apply.
Update and import the site metadata for the connector cartridge
By default, the connector cartridge adds the following attributes:
Data type | Custom attribute identifier | Custom attribute name |
---|---|---|
Order | Amazon_bwp_oms__amazonBwpOrderID | Amazon BwP Order Id |
Order | Amazon_bwp_oms__amzPayChargePermissionId | Amazon Pay Charge Permission Id |
ProductLineItem | Amazon_bwp_oms__amazonBwpOrderLineID | Amazon BwP Order Line Item Id |
After the shopper places an order, the attributes persist in Salesforce Commerce Cloud and send asynchronously to the Salesforce OMS. The Salesforce OMS requires the Buy with Prime order attributes to map order data between the Salesforce OMS and Buy with Prime.
Do the following to import the attributes from the connector cartridge. If you customize the logic of the connector cartridge to add fields, repeat the following after the update.
- Open the Business Manager tool for Salesforce Commerce Cloud.
- From the Administration menu, under Site Development, click Import & Export.
- Under Import & Export Files, click Upload.
- Under Upload Import Files, click Choose File.
- Navigate to the root folder for the connector cartridge, select the
metadata/system-objecttype-definitions.xml
file, and then click Upload. - Click Import & Export to return to the previous page, and then under Meta Data, click Import.
- Select the latest
system-objecttype-definitions.xml
file, and then click Next. - After the page refreshes automatically to show that validation is complete, click Import.
- Click Refresh to refresh the status.
The status column shows when the import is complete. If the import fails, click the link in the Process column to view the import log.
Verify the installation and configuration of the connector cartridge
To help ensure that the connector cartridge has been installed and configured correctly, do the following to place a Buy with Prime order and verify that the attributes from the connector cartridge are present.
- In your storefront, place a Buy with Prime order.
- Open the Business Manager tool for Salesforce Commerce Cloud.
- From the Merchant Tools menu, under Ordering, click Orders.
- Find the order by entering the Salesforce Commerce Cloud order identifier.
- On the Attributes tab, go to the Buy with Prime Salesforce OMS connector section.
- Confirm that values are present for Amazon Pay Charge Permission Id and Amazon BwP Order Id.
- On the General tab, click Shipment.
- In the shipment table, click Prime item Product Id.
- On the Attributes tab, confirm that Amazon BwP Order Line Item Id has a value.
Next steps
After installing and configuring the connector cartridge, Create Your Product and Delivery Method for Buy with Prime.
Related topics
Updated 4 days ago