> ## Documentation Index
> Fetch the complete documentation index at: https://docs.numeral.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Salesforce Commerce Cloud

> Real-time tax calculation at checkout for Salesforce B2C Commerce, powered by the plugin_numeral cartridge.

The Numeral cartridge for Salesforce B2C Commerce (SFCC) calculates tax during checkout and records each completed order as a transaction in Numeral. Setup has three phases:

1. **Create an OCAPI client** in Account Manager so Numeral can sync your catalog and orders
2. **Install the `plugin_numeral` cartridge** on your storefront
3. **Connect** your SFCC instance to Numeral and validate the integration

<Note>
  This integration requires Business Manager admin access, Account Manager access, and a WebDAV client (Cyberduck recommended).
</Note>

***

## Phase 1 — Configure the OCAPI client

### 1. Sign in to Account Manager

Go to [account.demandware.com](https://account.demandware.com) and sign in with your administrator credentials.

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/01-account-manager-login.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=131336e92021f8bdc5d4d0fc341b84fb" alt="Account Manager login" width="1490" height="923" data-path="images/integrations/salesforce-commerce-cloud/01-account-manager-login.png" />

### 2. Add an API client

Under **API Client**, click **Add API Client**. Use **Display Name** `Numeral Integration`.

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/02-add-api-client.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=f97a9712444d1c7f7d0e6c9b8f4dee53" alt="Add API client" width="1360" height="835" data-path="images/integrations/salesforce-commerce-cloud/02-add-api-client.png" />

### 3. Configure the API client

Set the following fields:

* **Token Endpoint Auth Method**: `client_secret_post`
* **Access Token Format**: `JWT`
* **Default Scopes**: leave blank
* **Allowed Scopes**:
  * `sfcc.products`
  * `sfcc.promotions`
  * `sfcc.customerlists`
  * `sfcc.catalogs`
  * `sfcc.gift-certificates`
  * `sfcc.source-codes`
  * `sfcc.orders`

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/03-api-client-form.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=e7f4144cdd869f7b67c51bbb8a99f272" alt="API client form" width="950" height="1238" data-path="images/integrations/salesforce-commerce-cloud/03-api-client-form.png" />

### 4. Assign roles

Assign the API client the **Salesforce Commerce API** and **Sandbox API User** roles, scoped to the organization that owns your storefront.

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/04-roles.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=09469793f18ce7c3575a57a67f682502" alt="API client roles" width="722" height="206" data-path="images/integrations/salesforce-commerce-cloud/04-roles.png" />

### 5. Set the redirect URI

Add this redirect URI:

```text theme={null}
https://admin.dx.commercecloud.salesforce.com/oauth2-redirect.html
```

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/05-redirect-uris.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=c407869daa8428cc9a354ded105c943d" alt="Redirect URIs" width="736" height="676" data-path="images/integrations/salesforce-commerce-cloud/05-redirect-uris.png" />

### 6. Configure OCAPI Shop API and Data API

In **Business Manager → Administration → Site Development → Open Commerce API Settings**, paste the JSON configuration provided by Numeral for both **Shop API** and **Data API** contexts.

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/06-shop-api-config.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=9594ecb7e9134bb8b0dae91eb9f8f2bb" alt="Shop API config" width="1378" height="1278" data-path="images/integrations/salesforce-commerce-cloud/06-shop-api-config.png" />

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/07-data-api-config.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=a36f255d2d0e03fed786e2526defe80e" alt="Data API config" width="1370" height="1268" data-path="images/integrations/salesforce-commerce-cloud/07-data-api-config.png" />

### 7. Capture the connection details

Save the seven values you'll provide to Numeral:

| Value             | Where to find it                                                                        |
| ----------------- | --------------------------------------------------------------------------------------- |
| Client ID         | Account Manager → API Client                                                            |
| Client Secret     | Account Manager → API Client (shown once)                                               |
| Organization ID   | Business Manager → Administration → Site Development → Salesforce Commerce API Settings |
| Short Code        | Same screen as Organization ID                                                          |
| Instance Hostname | The host portion of your Business Manager URL                                           |
| Site ID           | Business Manager → Administration → Sites → Manage Sites                                |
| Customer List ID  | Business Manager → Administration → Sites → Customer Lists                              |

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/08-connection-details-1.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=283cb19c60e296fd9afddbf879323cdb" alt="Connection details — page 1" width="1372" height="1277" data-path="images/integrations/salesforce-commerce-cloud/08-connection-details-1.png" />

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/09-connection-details-2.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=7260a0b16ca9e2f42752e8a1b30f9f62" alt="Connection details — page 2" width="1368" height="1270" data-path="images/integrations/salesforce-commerce-cloud/09-connection-details-2.png" />

***

## Phase 2 — Install the cartridge

### 1. Connect to WebDAV

The `plugin_numeral` cartridge is delivered as a zip. You'll upload it to your sandbox via WebDAV. Find your WebDAV URL in Business Manager under **Administration → Site Development → Development Setup**.

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/10-webdav-1.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=2e699d18e90b0cc482f593766de8bf22" alt="WebDAV details" width="1369" height="1273" data-path="images/integrations/salesforce-commerce-cloud/10-webdav-1.png" />

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/11-webdav-2.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=c6d7e79677dc485dd75535e0e7648b5d" alt="WebDAV details" width="1366" height="1270" data-path="images/integrations/salesforce-commerce-cloud/11-webdav-2.png" />

<Warning>
  macOS Finder mounts WebDAV in **read-only** mode. Use [Cyberduck](https://cyberduck.io) (free, macOS/Windows) or another WebDAV client that supports writes.
</Warning>

### 2. Connect with Cyberduck

In Cyberduck, create a new bookmark with **WebDAV (HTTPS)**, the host portion of your sandbox URL, and your Business Manager username/password.

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/12-cyberduck-connect.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=0adf1d366632ac462b508049a7c45fea" alt="Cyberduck connection" width="953" height="1190" data-path="images/integrations/salesforce-commerce-cloud/12-cyberduck-connect.png" />

### 3. Upload the cartridge

Navigate to `/Cartridges/{your-version-number}/` and upload the `plugin_numeral` folder from the cartridge zip Numeral provided.

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/13-upload-cartridge.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=2fe02da4bd119da6a6be0bc23a806c52" alt="Upload cartridge" width="1796" height="1042" data-path="images/integrations/salesforce-commerce-cloud/13-upload-cartridge.png" />

### 4. Update the cartridge path

In Business Manager → **Administration → Sites → Manage Sites → `{your site}` → Settings**, prepend `plugin_numeral` to the **Cartridges** path so it loads first:

```text theme={null}
plugin_numeral:app_storefront_base:...
```

<Warning>
  `plugin_numeral` must appear **before** `app_storefront_base` in the cartridge path. If it appears later, the storefront will not invoke Numeral's checkout hooks.
</Warning>

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/14-cartridge-path.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=a4b012e8dfdc5e10ff3ccf42e61ad044" alt="Cartridge path" width="1367" height="1271" data-path="images/integrations/salesforce-commerce-cloud/14-cartridge-path.png" />

### 5. Import the metadata

The cartridge zip includes two metadata files: `site-preferences.xml` and `custom-objects.xml`. Import both via **Administration → Site Development → Site Import & Export**.

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/15-import-1.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=74d1bac0476dcd6ba1e71a9fadd27d3c" alt="Import step 1" width="1362" height="1269" data-path="images/integrations/salesforce-commerce-cloud/15-import-1.png" />

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/16-import-2.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=f9a92e3d270193e94a7e49a44d2850e3" alt="Import step 2" width="1360" height="1267" data-path="images/integrations/salesforce-commerce-cloud/16-import-2.png" />

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/17-import-3.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=e9a1d661459cc544f269408957ed1a4c" alt="Import step 3" width="1365" height="1266" data-path="images/integrations/salesforce-commerce-cloud/17-import-3.png" />

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/18-import-4.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=b7be6bdaa995535877c83776baaea9f7" alt="Import step 4" width="1362" height="1265" data-path="images/integrations/salesforce-commerce-cloud/18-import-4.png" />

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/19-import-5.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=df831e0c876e8bc0aa207d37ab700301" alt="Import step 5" width="1365" height="1266" data-path="images/integrations/salesforce-commerce-cloud/19-import-5.png" />

The import creates the following site preferences:

| Preference            | Purpose                                                 |
| --------------------- | ------------------------------------------------------- |
| `c_numeralApiKey`     | Your Numeral API key                                    |
| `c_numeralApiBaseUrl` | Numeral API base URL (e.g. `https://api.numeralhq.com`) |

And these custom attributes on the **Order** system object:

* `c_numeral_tax_amount`
* `c_numeral_calculation_id`
* `c_numeral_transaction_id`
* `c_numeral_tax_calculated_at`

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/20-verify-prefs.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=bf56575b339c713cfcfa2e298c796abf" alt="Verify site preferences" width="1367" height="1270" data-path="images/integrations/salesforce-commerce-cloud/20-verify-prefs.png" />

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/21-verify-attrs.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=daef9207578d4fdb3a6ad13433597bcd" alt="Verify order custom attributes" width="1363" height="1267" data-path="images/integrations/salesforce-commerce-cloud/21-verify-attrs.png" />

***

## Phase 3 — Connect to Numeral

### 1. Configure the API key in SFCC

Set `c_numeralApiKey` and `c_numeralApiBaseUrl` under **Merchant Tools → Site Preferences → Custom Preferences → Numeral**.

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/22-api-key-config.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=8822a50cad0c190dc9cec5090fde8f96" alt="API key configuration" width="1364" height="1273" data-path="images/integrations/salesforce-commerce-cloud/22-api-key-config.png" />

### 2. Run a quick checkout test

Place a test order on your sandbox storefront. Confirm tax appears on the order summary.

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/23-quick-test.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=98ec8108348b4a5c160bf16027012dee" alt="Quick test" width="1364" height="1230" data-path="images/integrations/salesforce-commerce-cloud/23-quick-test.png" />

### 3. Inspect the logs

In Business Manager, go to **Administration → Site Development → Custom Log Settings** to view the Numeral request and response payloads. Confirm there are no errors.

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/24-logs.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=72b0118ba30116fad8d00254c3bb4694" alt="Logs" width="1365" height="1268" data-path="images/integrations/salesforce-commerce-cloud/24-logs.png" />

### 4. Verify the order's custom attributes

Open the order in Business Manager and confirm the four `c_numeral_*` custom attributes are populated.

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/25-order-attrs.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=27779905d6a7145911e45493daefc955" alt="Order custom attributes" width="1364" height="1267" data-path="images/integrations/salesforce-commerce-cloud/25-order-attrs.png" />

### 5. Add the connection in Numeral

In your Numeral dashboard under **Settings → Integrations → Salesforce Commerce Cloud**, click **Add Connection** and provide the seven values you captured in Phase 1.

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/26-numeral-connections.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=f8a3ad4b648f6505f383cc127516d05e" alt="Numeral connections" width="1365" height="1233" data-path="images/integrations/salesforce-commerce-cloud/26-numeral-connections.png" />

Numeral will validate the credentials, sync your catalog as **General Merchandise**, and provision a Fivetran connector for ongoing sync.

### 6. Generate API keys

Numeral generates a `sk_test_*` API key for your sandbox. Once you're ready for production, generate a `sk_prod_*` key and update `c_numeralApiKey` in your production site preferences.

<img src="https://mintcdn.com/numeralhq/3yCz09jOh2VOCEJG/images/integrations/salesforce-commerce-cloud/27-api-keys.png?fit=max&auto=format&n=3yCz09jOh2VOCEJG&q=85&s=538dac4ce5cd3118559362bef7f9a4ba" alt="API keys" width="1370" height="1238" data-path="images/integrations/salesforce-commerce-cloud/27-api-keys.png" />

<Note>
  If you operate multiple sites or storefronts, create a **separate Numeral connection per site** so each site has its own API key and transaction history.
</Note>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Tax not appearing at checkout">
    Confirm `plugin_numeral` is the **first** entry in the cartridge path and the API key in `c_numeralApiKey` matches the environment (test vs. production). Check **Custom Log Settings** for HTTP errors.
  </Accordion>

  <Accordion title="WebDAV upload fails or appears read-only">
    macOS Finder mounts WebDAV read-only. Use Cyberduck instead. Confirm your Business Manager user has WebDAV file access enabled.
  </Accordion>

  <Accordion title="OCAPI scope errors">
    Verify all seven scopes are listed under **Allowed Scopes** on the API client and that the OCAPI Shop API and Data API JSON configs have been imported in Business Manager.
  </Accordion>

  <Accordion title="Order tax attributes are blank">
    The cartridge writes attributes only after a successful tax calculation. If logs show a calculation error (timeout, network issue, invalid address), the attributes will not populate.
  </Accordion>
</AccordionGroup>
