> This page is for Applications Protection.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.humansecurity.com/llms.txt.

# Install the Salesforce Commerce Cloud Enforcer

If your organization uses **Salesforce Commerce Cloud**, you can use HUMAN’s Salesforce Commerce Cloud **Enforcer** to protect against malicious behavior. The SFCC Enforcer is installed using Salesforce cartridges and is deployed to your content delivery network (CDN). The Enforcer dictates how traffic should be handled per your organization’s standards.

You can learn how to install the SFCC Enforcer with this article.

## Prerequisites

* A Salesforce Commerce Cloud account with admin access to the Business Manager.
* HUMAN's SFCC cartridge ZIP file. Contact [HUMAN support](mailto:support@humansecurity.com) directly to get this file.
* A method to deploy cartridges to your Salesforce Commerce Cloud instance. The following guide uses Eclipse with Salesforce UX Studio, but you can use other methods such as Visual Studio Code, a CLI, or Business Manager **Code Deployment**.
* Your unique HUMAN information:
  * Your **Application ID.** You can find this in **Platform Settings > Applications > Overview** in the HUMAN console. If you have multiple environments, you will also have multiple Application IDs, so be sure to choose the correct ID for the environment you want to install on.
  * Your **Server Token.** You can find this in **Platform Settings > Applications**, then selecting an application and navigating to **Application settings > Server token.**
  * Your **Risk Cookie Key.** You can find this in **Sightline Cyberfraud Defense > Policies > Traffic Policy Settings,** then clicking the key  icon and selecting&#x20;**&#x20;Copy value.** If you don't see this option, click&#x20;**&#x20;Generate new** first.

## Installation

### Import the cartridge

1. Unzip the HUMAN SFCC cartridge ZIP file to a local directory.
2. In Eclipse with Salesforce UX Studio, click **File > Import**.
3. In the **General** tab, select **Existing Project into Workspace** and click **Next**.
4. With **Select root directory** selected, click **Browse** and navigate to the unzipped HUMAN SFCC cartridge folder.
5. Ensure the projects are displayed and selected in the **Projects** area, then click **Finish**.
6. Upload the cartridges to an active code version on your instance.

> **Note**
>
> If your team already deploys cartridges with Visual Studio Code, a CLI, or Business Manager **Code Deployment**, upload the same unzipped cartridge folders to a code version using that method instead.

### Register the cartridge

1. In **Salesforce Business Manager**, select **Administration > Sites > Manage Sites.**
2. Select the Storefront site that you want to add the HUMAN SFCC Cartridge to from the list available sites.
3. Click the **Settings** tab.
4. Under the **Effective Cartridge Path** section, add `int_perimeterx:` to the beginning of the list.
5. Add the storefront cartridge that matches your site’s architecture to the beginning of the list:
   * If your site uses [Storefront Reference Architecture (SFRA)](https://developer.salesforce.com/docs/commerce/commerce-api/guide/sfra-overview.html), add `int_perimeterx_SFRA` to the beginning of the list.
   * If your site uses [SiteGenesis JavaScript Controllers (SGJC)](https://help.salesforce.com/s/articleView?id=cc.b2c_controlers.htm\&type=5), add `int_perimeterx_SGJC` to the beginning of the list.

> **Note**
>
> The storefront cartridges attach to Salesforce's `onRequest` hook and evaluate every storefront route. To skip specific paths, add them to [Path Whitelist](/applications/salesforce-commerce-cloud-cartridge/configuration#path-whitelist).

6. Depending on the API you use, add the following:
   * If you use the [Salesforce Commerce API (SCAPI)](https://developer.salesforce.com/docs/commerce/commerce-api/guide/scapi-get-started.html), add `int_perimeterx_SCAPI` to the beginning of the list. [SCAPI Protection Considerations](/applications/salesforce-commerce-cloud-cartridge/scapi-protection-considerations) covers header limitations and how to pass original request headers.
   * If you use the [Open Commerce API (OCAPI)](https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-commerce-ocapi/get-started-with-ocapi.html), add `int_perimeterx_OCAPI` to the beginning of the list. This cartridge enforces a predefined set of authentication, product, and payment hooks, not every OCAPI endpoint. Blocked OCAPI clients receive an [Advanced Blocking Response](/applications/advanced-blocking-response) instead of the HTML challenge page, so your OCAPI app must handle that JSON response.
7. Click **Apply** to save the new settings.

### Import metadata & services

1. In **Salesforce Business Manager**, select **Administration > Site Development > Site Import & Export.**
2. Under **Import**, click **Choose File**, select the `metadata.zip` file from cartridge directory's `metadata` directory, then click **Upload**.
3. After the upload finishes, select `metadata.zip` in the import file list and click **Import** to apply the metadata and services.

### Configure the cartridge

1. In **Salesforce Business Manager**, select **Merchant Tools > Site Preferences > Custom Preferences.**
2. Under **Custom Site Preference Groups,** select **PXConfig**.
3. Select your current **Instance Type.**
4. Complete the following fields:
   * **Authentication token:** Your HUMAN **Server Token.**
   * **AppID:** Your HUMAN **Application ID.**
   * **Cookie Key:** Your HUMAN **Risk Cookie Key.**
   * **SGJC Cartridge Name:** If you use SGJC, enter your SGJC controllers cartridge name. Otherwise, leave this blank.
   * Any other [optional configurations](/applications/salesforce-commerce-cloud-cartridge/configuration) you want to set.
5. Click **Save.**

### Set up first party

If you chose to use a [first party Sensor integration](/applications/getting-started-with-sightline-cyberfraud-defense#integrate-the-sensor-in-a-website), then you must complete these steps. If you chose third party, you can skip to [Deploy](#deploy).

1. In **Salesforce Business Manager**, select **Merchant Tools > Site URLs > Dynamic Mapping.**
2. Add the following above the **catch-all rule:**

```javascript showLineNumbers={false}
/px/** p,,,PXFP-Handle,,src,{0}
```

3. Navigate to **Merchant Tools > Site Preferences > Custom Preferences.**
4. In **Custom Site Preference Groups,** select **PXConfig**.
5. Select your current **Instance Type.**
6. Navigate to the **First Party Enabled** property and change its value to **True**.
7. Click **Save.**

### Deploy

1. In **Salesforce Business Manager**, select **Administration > Site Development > Code Deployment.**
2. Open the **code version** that contains both your storefront cartridges and the HUMAN cartridges. Confirm the HUMAN cartridge folders are in that version.
3. Click **Activate** beside that version.

The SFCC Enforcer is now deployed to your Storefront.