Skip to main content

What is Salesforce Commerce Cloud?

Salesforce Commerce Cloud is an enterprise ecommerce platform. Merchants manage sites, catalogs, and orders in Business Manager, and extend an instance with cartridges.

What Does the Integration Do?

The integration makes Commerce Cloud orders returnable in Redo. Redo reads orders and products from Commerce Cloud. Redo writes to Commerce Cloud only to create exchange orders and gift certificates. Redo calls the Salesforce Commerce API (SCAPI). Redo does not use OCAPI.

What the Integration Does Not Do

  • Redo does not post refunds, returns, or credit records to Commerce Cloud.
  • Redo does not update inventory in Commerce Cloud.
  • Redo does not change the original order through the API. The order sync job writes two custom attributes on the order, redoSyncStatus and redoLastAttempt, to record the delivery to Redo.
To send return data to Commerce Cloud or to an order management system, use Redo webhooks.

Refunds

Redo does not refund through Commerce Cloud. Redo reads the payment instruments on the order and sends the refund to the payment processor that captured the payment. When an order has more than one payment, Redo refunds each processor up to the amount that the processor captured. Redo can send refunds to these processors:
  • Adyen
  • PayPal
  • Optty
  • Global-e
Each processor needs its own connection to Redo. Tell Redo’s team which processors your sites use. When no connected processor can refund the full amount, the refund fails and Redo adds a message to the return timeline. Each Commerce Cloud site has a Refund method in the Redo returns settings:

Exchange Orders

When a return includes an exchange, Redo creates the exchange order in Commerce Cloud in this sequence:
  1. Redo creates a basket through the Shopper Baskets API. The basket contains the exchange items, the shopper’s address, and a payment instrument with the payment method ID REDO.
  2. Redo sets the shipping method on the basket.
  3. Redo submits the basket as an order through the Shopper Orders API.
  4. Redo sets the order confirmation status to confirmed and the export status to ready through the Orders API.
Redo’s team can configure these options for your integration:
  • Shipping method. The shipping method ID for exchange orders. Without this option, Redo uses the default shipping method of the site. If the default does not apply to the basket, Redo uses the first shipping method that applies.
  • Original order number. A custom order attribute that receives the number of the original order.
  • Shipment attributes. Fixed values that Redo writes to custom shipment attributes.

Store Credit

When a return gives store credit, Redo creates a gift certificate in Commerce Cloud for the store credit amount. The gift certificate contains the original order number and the name and email address of the shopper. Redo’s team can configure a custom Boolean attribute that Redo sets to true on each gift certificate that Redo creates.

How to Set It Up

Redo’s team sets up this integration with you. The Redo dashboard does not have a self-service Connect button for Commerce Cloud. Contact your Redo representative to start.

Prerequisites

You need permission to create API clients in Account Manager. For exchanges, you also need permission to create SLAS clients.
You need administrator access to Business Manager to upload cartridges, import metadata, and create services and jobs.
Create an API client with the orders_write scope in Settings > Developer in the Redo dashboard. Copy the API secret and the store ID. See Authentication.
Redo’s team sends you the cartridge archives. Each archive contains the cartridge, its metadata, and a README file.

Configuration Steps

1

Collect the Instance Details

Redo needs these values for each instance:
2

Create the Admin API Client

Create an API client in Account Manager. Redo uses this client to read orders and products and to create gift certificates. See Authorization for Admin APIs in the Salesforce documentation.Redo requests tokens with the client credentials grant. Redo sends the client ID and the client secret in an HTTP Basic Authorization header.Add these scopes to the API client:Redo also requests the tenant scope SALESFORCE_COMMERCE_API:<realm ID>_<instance ID>. Redo’s team confirms the final scope list for your setup before you create the client. The API client must allow every scope in that list.
3

Create the Shopper API Client (Exchanges Only)

Skip this step if you do not use exchanges.Create a private SLAS client. See Authorization for Shopper APIs in the Salesforce documentation. Redo requests a token with the client credentials grant and sends the site ID as the channel_id.Add these scopes to the SLAS client:Then create a payment method with the ID REDO in Business Manager and enable it for the site. Redo puts this payment method on each exchange order.
4

Install the Order Sync Cartridge

The cartridge int_redo_order_sync operates on SFRA and SiteGenesis. Do these steps in Business Manager:
  1. Upload int_redo_order_sync to the active code version. Add the cartridge to the cartridge path of each site (Administration > Sites > Manage Sites > the site > Settings).
  2. Import the cartridge metadata (Administration > Site Development > Site Import & Export). The metadata adds the site preferences, the two order attributes, and the RedoSyncCheckpoint custom object type.
  3. Configure the HTTP service redo.http.orderSync (Administration > Operations > Services). Set the credential URL to https://api.getredo.com/v2.2. Set the credential password to your Redo API secret.
  4. Set the site preferences in the Redo Order Sync group:
  5. Create a job that runs the custom.RedoOrderSync step for the site (Administration > Operations > Jobs). The step is defined in the steptypes.json file of the cartridge. Schedule the job at a short interval. The interval controls how soon a new order appears in Redo.
When an instance has more than one site, add one credential for each site to the service. Give each credential the name redo.http.orderSync.<SiteID>, for example redo.http.orderSync.RefArch. Each credential contains the API secret of the Redo store that the site syncs to. Set the redoStoreId preference of each site to the same store. When a site has no credential of its own, the job uses the default credential of the service.The first job run records the current time and does not send earlier orders. Ask Redo’s team to import earlier orders.
5

Send the Details to Redo

Send these items to Redo’s team through a secure channel:
  • The instance details from the first step
  • The client ID and the client secret of the Admin API client
  • The client ID and the client secret of the SLAS client, if you use exchanges
  • The payment processors that your sites use
Redo’s team enters the credentials, verifies access to the API, and confirms that Redo receives orders.
6

Test the Integration

Place a test order on the site and let the order sync job run. Find the order in Redo, then submit a test return for the order. If you use exchanges or store credit, process the return and examine the exchange order or the gift certificate in Business Manager.

Storefront Cartridge for Redo Coverage

Returns do not need this cartridge. Install the cartridge int_redo_storefront_embed only if you sell Redo coverage on the storefront. The cartridge loads the Redo storefront script on each page.
  1. Upload int_redo_storefront_embed to the active code version and add it to the start of the site cartridge path.
  2. Import the cartridge metadata.
  3. Set the site preferences redoStorefrontEnabled and redoStorefrontWidgetId in the Redo Storefront group. Ask Redo’s team for the widget ID.
  4. Invalidate the page cache of the site.
On SFRA, the cartridge adds the script through the app.template.htmlHead hook. If the htmlHead.isml template of the site does not call that hook, or the site uses SiteGenesis, add <isinclude template="redo/storefrontEmbed" /> to the head template. The README file in the cartridge archive gives the full procedure.

Custom Order Attributes

Many merchants keep order data in custom attributes (c_*). Redo can read custom attributes during order sync. Tell Redo’s team which attributes your orders use. Redo’s team adds the mapping to your integration. The Redo dashboard does not have a setting for this mapping.

Sync Timing

Support

For issues with the Redo integration configuration, return processing, or data synchronization, contact support@getredo.com. For issues with Salesforce Commerce Cloud access, API credentials, or warehouse operations, contact your Salesforce Commerce Cloud account manager or support team.