Integrating Your Return Portal to Your Salesforce Commerce Cloud Store

Last Updated: April 9, 2024

ReturnGO seamlessly integrates with Salesforce Commerce Cloud (SFCC) to provide a comprehensive return management solution. 

Integrating ReturnGO with Salesforce Commerce Cloud

To set up your ReturnGO return portal with Salesforce Commerce Cloud, you’ll need to collect the relevant credentials and send them to the ReturnGO team, who will implement the integration for you.

Requirements

The credentials you will need for integrating ReturnGO with Salesforce Commerce Cloud are:

  • SCAPI Credentials:
      • Realm ID
      • Organization ID
      • Short Code
      • SCAPI Client ID
      • SCAPI Client Secret
  • SLAS Credentials:
      • SLAS Client ID
      • SLAS Client Secret
  • OCAPI Credentials:
    • OCAPI Client ID
    • OCAPI Client Secret
  • Domain: 
    • Your Salesforce Commerce Cloud domain
  • Site ID: 
    • Your Salesforce Commerce Cloud site’s Site ID

Follow the steps below to collect the relevant credentials and integrate ReturnGO with your Salesforce Commerce Cloud account.

SCAPI Credentials

Realm ID

  1. Go to the Salesforce Commerce Cloud Control Center and click on REALMS.
  2. Note down the Realm ID.

Organization ID and Short Code

  1. Go to the Salesforce Commerce Cloud Business Manager and click on ADMINISTRATION.
  2. Click on SITE DEVELOPMENT.

3. Click on SALESFORCE COMMERCE API SETTINGS.

4. Note down the Short Code.
5. Note down the Organization ID.

SCAPI Client ID and Secret

  1. Go to your Account Manager and click on API CLIENT.
  2. Click ADD API CLIENT.

3. Fill out your details. 
  • It’s recommended to set the Display Name as ReturnGO SCAPI.
  • Note down your selected password, which is your SCAPI Client Secret.

4. Next to Organizations, click ADD to add an organization.

5. Select your organization.
6. Click ADD.

7. Next to Roles, click ADD to add a new role.

8. Add the roles for your organization’s Salesforce Commerce API.
9. Click ADD.

10. Copy the following values into the Default Scopes field:

mail

roles

tenantFilter

profile

openId

sfcc.shopper-baskets-orders.rw

sfcc.shopper-categories

sfcc.shopper-customers.login

sfcc.shopper-customers.register

sfcc.shopper-gift-certificates

sfcc.shopper-myaccount.rw

sfcc.shopper-product-search

sfcc.shopper-productlists

sfcc.shopper-products

sfcc.shopper-promotions

sfcc.shopper-stores

sfcc.catalogs

sfcc.orders

sfcc.orders.rw

sfcc.products

sfcc.pricing

sfcc.gift-certificates

sfcc.gift-certificates.rw

sfcc.cdn-zones

sfcc.cdn-zones.rw

11. Copy the following values into the Allowed Scopes field:

sfcc.shopper-baskets-orders.rw

sfcc.shopper-categories

sfcc.shopper-customers.login

sfcc.shopper-customers.register

sfcc.shopper-gift-certificates

sfcc.shopper-myaccount.rw

sfcc.shopper-product-search

sfcc.shopper-productlists

sfcc.shopper-products

sfcc.shopper-promotions

sfcc.shopper-stores

sfcc.catalogs

sfcc.orders

sfcc.orders.rw

sfcc.products

sfcc.pricing

sfcc.customerlists

sfcc.customerlists.rw

12.  Set the Token Endpoint Auth Method to client_secret_post

13. Click SAVE

14. Note down the generated Client ID.

SLAS Credentials

SLAS Client ID and Secret

  1. Go to your SLAS UI Manager and click on SLAS ADMIN UI LOGIN.

2. Click on CLIENTS

3. Click ADD CLIENT

4.  Select the relevant tenant and site.

5. Set the app to be private. 

6. Use the default shopper scopes. 

7. Click SUBMIT

8. After saving, note down the displayed Secret which will appear at the top of the screen.

9. Note down the generated SLAS Client ID

OCAPI Credentials

OCAPI Client ID and Secret

  1. Go to your Account Manager and click on API CLIENT.
  2. Generate another API client by clicking ADD API CLIENT.

3. Fill out your details.  

  • It’s recommended to set the Display Name as ReturnGO OCAPI.
  • Note down your selected password, which will be your OCAPI Client Secret.

4. Next to Organizations, click ADD to add an organization. 

5. Select your organization. 

6. Click ADD.

7. Copy the following values into the Default Scopes field: 

mail

roles

tenantFilter

profile

openId

sfcc.shopper-baskets-orders.rw

sfcc.shopper-categories

sfcc.shopper-customers.login

sfcc.shopper-customers.register

sfcc.shopper-gift-certificates

sfcc.shopper-myaccount.rw

sfcc.shopper-product-search

sfcc.shopper-productlists

sfcc.shopper-products

sfcc.shopper-promotions

sfcc.shopper-stores

sfcc.catalogs

sfcc.orders

sfcc.orders.rw

sfcc.products

sfcc.pricing

sfcc.gift-certificates

sfcc.gift-certificates.rw

sfcc.cdn-zones

sfcc.cdn-zones.rw

8. Set the Token Endpoint Auth Method to client_secret_post.

9. Click SAVE.

10. Note down the generated Client ID

Add OCAPI Client Key

  1. Go to the Business Manager, and click on ADMINISTRATION.
  2. Click on SITE DEVELOPMENT.

3. Click on OPEN COMMERCE API SETTINGS

4. Set the Type to Shop.
5.  Copy the following and paste it into the field, adding your OCAPI Client ID where indicated: 

{
    "_v": "23_2",
    "clients": [
        {
            "client_id": "Replace this with your OCAPI ClientID",
            "resources": [
                {
                    "resource_id": "/order_search",
                    "methods": [
                        "post"
                    ],
                    "read_attributes": "(**)",
                    "write_attributes": "(**)"
                },
                {
                    "resource_id": "/customers/*",
                    "methods": [
                        "post"
                    ],
                    "read_attributes": "(**)",
                    "write_attributes": "(**)"
                },
                {
                    "resource_id": "/baskets",
                    "methods": [
                        "post"
                    ],
                    "read_attributes": "(**)",
                    "write_attributes": "(**)"
                },
                {
                    "resource_id": "/baskets/*",
                    "methods": [
                        "delete"
                    ],
                    "read_attributes": "(**)",
                    "write_attributes": "(**)"
                },
                {
                    "resource_id": "/baskets/*/price_adjustments",
                    "methods": [
                        "post"
                    ],
                    "read_attributes": "(**)",
                    "write_attributes": "(**)"
                },
                {
                    "resource_id": "/orders/*",
                    "methods": [
                        "get",
                        "patch"
                    ],
                    "read_attributes": "(**)",
                    "write_attributes": "(**)"
                },
                {
                    "resource_id": "/orders",
                    "methods": [
                        "post"
                    ],
                    "read_attributes": "(**)",
                    "write_attributes": "(**)"
                },
                {
                    "resource_id": "/products/*",
                    "methods": [
                        "get"
                    ],
                    "read_attributes": "(**)",
                    "write_attributes": "(**)"
                },
                {
                    "resource_id": "/products/*/*",
                    "methods": [
                        "get"
                    ],
                    "read_attributes": "(**)",
                    "write_attributes": "(**)"
                },
                {
                    "resource_id": "/stores/*",
                    "methods": [
                        "get"
                    ],
                    "read_attributes": "(**)",
                    "write_attributes": "(**)"
                },
                {
                    "resource_id": "/site",
                    "methods": [
                        "get"
                    ],
                    "read_attributes": "(**)",
                    "write_attributes": "(**)"
                },
                {
                    "resource_id": "/products/*/variations",
                    "methods": [
                        "get"
                    ],
                    "cache_time": 0,
                    "config": {
                        "_comment": "Add a comma-separated list of the price book ids currently active in the organization",
                        "product.prices.price_book_ids": "*"
                    }
                }
            ]
      }

6. Click SAVE.

7. Set the Type to Data.

8. Copy the following and paste it into the field, adding your OCAPI Client ID where indicated: 

{
      "_v": "23_2",
      "clients":
      [
        {
          "client_id": "Replace this with your OCAPI ClientID",
          "resources":
          [
            {
              "resource_id": "/code_versions",
              "methods": ["get"],
              "read_attributes": "(**)",
              "write_attributes": "(**)"
            },
            {
              "resource_id": "/code_versions/*",
              "methods": ["patch", "delete"],
              "read_attributes": "(**)",
              "write_attributes": "(**)"
            },
            {
              "resource_id": "/jobs/*/executions",
              "methods": ["post"],
              "read_attributes": "(**)",
              "write_attributes": "(**)"
            },
            {
              "resource_id": "/jobs/*/executions/*",
              "methods": ["get"],
              "read_attributes": "(**)",
              "write_attributes": "(**)"
            },
            { 
              "resource_id": "/sites/*/cartridges", 
              "methods": ["post"], 
              "read_attributes": "(**)", 
              "write_attributes": "(**)"
            },
            {
              "resource_id":"/role_search",
              "methods":["post"],
              "read_attributes":"(**)",
              "write_attributes":"(**)"
            },
            {
              "resource_id":"/roles/*",
              "methods":["get"],
              "read_attributes":"(**)",
              "write_attributes":"(**)"
            },
            {
              "resource_id":"/roles/*/user_search",
              "methods":["post"],
              "read_attributes":"(**)",
              "write_attributes":"(**)"
            },
            {
              "resource_id":"/roles/*/users/*",
              "methods":["put","delete"],
              "read_attributes":"(**)",
              "write_attributes":"(**)"
            },
            {
              "resource_id":"/user_search",
              "methods":["post"],
              "read_attributes":"(**)",
              "write_attributes":"(**)"
            },
            {
              "resource_id":"/users",
              "methods":["get"],
              "read_attributes":"(**)",
              "write_attributes":"(**)"
            },
            {
              "resource_id":"/users/*",
              "methods":["put","get","patch","delete"],
              "read_attributes":"(**)",
              "write_attributes":"(**)"
            }
          ]
        }

9. Click SAVE. 

Site ID and Domain

  1. In your Business Manager, note down the Domain, which is the first part of your URL.
  2. Note down the Site ID, which you can find on the left-most section of the toolbar.

 

Once you have gathered all the required information, please send it to the ReturnGO support team. They will handle the integration and provide any further instructions needed.