> For the complete documentation index, see [llms.txt](https://alhena.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alhena.gitbook.io/docs/integrations/ecommerce/platforms/integrating-alhena-ai-with-salesforce-commerce-cloud.md).

# Salesforce Commerce Cloud

Alhena connects to Salesforce Commerce Cloud using SCAPI (Shopper APIs).

## Prerequisites

* A Salesforce Commerce Cloud store
* SCAPI credentials from your Commerce Cloud Account Manager

## Getting Your SCAPI Credentials

You'll need the following from your Salesforce Commerce Cloud Account Manager:

1. **Client ID** - Your API client identifier
2. **Client Secret** - Your API client secret
3. **Short Code** - Your organization's short code (e.g., `kv7kzm78`)
4. **Organization ID** - Your organization identifier (e.g., `f_ecom_zzxy_001`)
5. **Site ID** - Your storefront site ID (e.g., `RefArch`)
6. **Site URL** - Your storefront URL (e.g., `https://www.yourstore.com`)

## Setup

### Step 1: Enable Salesforce Commerce Cloud in Alhena

1. In Alhena, go to **Settings > Integrations**
2. Find **Salesforce Commerce Cloud** and click **Enable**
3. You'll be taken to the configuration page

### Step 2: Connect Your Store

Enter your SCAPI credentials:

1. **Client ID**
2. **Client Secret**
3. **Short Code**
4. **Organization ID**
5. **Site ID**
6. **Site URL** - Your storefront URL (e.g., `https://www.yourstore.com`)

Click **Connect** to complete the setup.

***

## Enabled Agents

When you connect your Salesforce Commerce Cloud store, the following agents are enabled:

| Agent                      | Description                                                                |
| -------------------------- | -------------------------------------------------------------------------- |
| **Order management agent** | Handles order inquiries, tracking, and order-related customer support      |
| **Product expert agent**   | Provides detailed product information, specifications, and recommendations |

You can configure these agents in **AI Settings > Agents**.

***

## Custom Product Fields

Salesforce Commerce Cloud supports custom product attributes. You can configure which custom fields to sync so Alhena can answer questions about them.

1. Go to **Settings > Integrations > Salesforce Commerce Cloud**
2. Scroll to **Custom Product Fields**
3. Add the attribute IDs for the custom fields you want to include (e.g., `c_ingredients`, `c_howToUse`, `c_size`)

***

## Recommended: Add Your Store to Training

After connecting, we recommend adding your storefront domain to your training URLs so Alhena can learn from your product pages and help articles. See [Training on Websites](/docs/ai-configuration/data-sources/websites.md) for more information.

***

## Disconnecting

To disconnect your Salesforce Commerce Cloud store:

1. Go to **Settings > Integrations > Salesforce Commerce Cloud**
2. Click **Disconnect**
3. Confirm the disconnection

This will disable the Salesforce Commerce Cloud-connected agents and revoke access to your store data.
