Skip to main content

Custom Site Preferences

After metadata import, go to BM > Merchant Tools > Site Preferences > Custom Preferences.
image.png
Select Kleep:
image.png
Depending on your cartridge version, you may also see isKleepSessionEnabled in Business Manager. This preference existed in older cartridge versions to toggle Kleep session tracking; it has been removed in current versions because the session is always active. If it is present, leave it at its default value (Yes).
Available from cartridge 26.12.02. Kleep sets the consent mode for your account. The cartridge reads it from the server and keeps it in the custom cache KleepRetailerConfig, refreshed every 10 minutes. The kleepConsentMode site preference is the fallback, used when that setting cannot be read. Set it to the mode of your contract on every site, so that an outage cannot switch the mode back. When the visitor ticks Remember my size, the consent is recorded in localStorage under kleep_consent for 365 days. Forget my size in the drawer deletes every Kleep key from localStorage and sessionStorage. The consent mode does not change the export jobs. What the order export carries is set by its own parameters: see KleepExportOrdersCSV settings.
The mode set by Kleep is read through the custom cache KleepRetailerConfig, declared in int_kleep/caches.json. Deploy int_kleep/package.json and int_kleep/caches.json with the cartridge, then check that Administration > Operations > Custom Caches lists KleepRetailerConfig. Without it, the cartridge only uses the site preference.

How to check the optional mode

On a product page, in a private window, before clicking the Kleep button, run in the browser console:
In the Network tab, no call to Kleep-CreateSession or to a KleepTracking route is made while browsing, adding to cart or checking out.

Services

Found in Administration > Operations > Services:
image.png
kleep.sftp — Sends export files from SFCC WebDAV to Kleep SFTP. Replace the user with the one provided by Kleep, along with the .p12 certificate. Don’t set any password.
image.png
kleep — Used for all other features. No user/password needed — the request is authenticated by the kleepRetailerUUID site preference, sent in the payload of every Kleep API call to resolve your account.

Private Key & Certificate

Go to Administration > Operations > Private Keys and Certificates:
  1. Click Import
  2. Click Select and choose the .p12 file provided by Kleep
  3. Use kleep as the alias
  4. Click Save
image.png
The result should look like this — it must be valid and named kleep:
image.png

Export Jobs

Go to Administration > Operations > Jobs. The cartridge ships three jobs:
  • KleepExportProductsCSV — exports your site’s products
  • KleepExportOrdersCSV — exports your customers’ order history
  • KleepResetLastExported — utility job to force a full re-export of orders (details below)
image.png
The two export jobs are disabled by default. Enable them to run once per day (see Scheduling and frequency):
image.png

Site assignment

Both export jobs run in a site context. In the Job Steps tab, click the site scope (shown as RefArch on a fresh install) and select the site(s) where you use Kleep. Each export job has two steps:
  1. A generate step (Custom.Kleep.GenerateProductsCSV or Custom.Kleep.GenerateOrdersCSV) — writes the CSV file to a WebDAV IMPEX folder
  2. An upload step (Custom.CSComponents.FtpUpload) — pushes the CSV to the Kleep SFTP server through the kleep.sftp service, then archives the file
The TargetFolder parameter of each SFTP upload step must match the folder structure expected by Kleep’s ingestion pipeline. For example, a dev store might use dev/products instead of products. See the SFTP Data Structure documentation for the complete directory layout.

KleepExportProductsCSV settings

image.png
Step 1 — GenerateProductsCSV
The number of exported products may exceed the number processed. This happens when uncategorized products are included through their association with a categorized VariationGroup.
Make sure the MainViewType parameter matches your shop’s configuration. A mismatched view type leads to missing product images, which are required for AI analysis.
image.png
Step 2 — SFTPUpload

KleepExportOrdersCSV settings

Step 1 — GenerateOrdersCSV
image.png
Order custom attributes and order notes are copied as they are. If your site stores names, addresses, emails or payment references there, set CustomAttributes to None (or to Listed with only the IDs Kleep asks for) and uncheck ExportOrderNotes. Kleep does not need personal data. The defaults keep the export of earlier cartridge versions.
Step 2 — SFTPUpload

Scheduling and frequency

The exact time does not matter to Kleep — pick a low-traffic window for your instance and keep both export jobs daily. Staggering the two jobs by one hour (as above) avoids concurrent IMPEX and SFTP activity. For error handling, the reference configuration retries a failed run up to 3 times at 1-minute intervals.
At go-live, run KleepExportProductsCSV once manually with ExportType set to Full, then switch back to Delta for the daily schedule.

KleepResetLastExported (utility job)

KleepResetLastExported forces a full re-export of orders. Its single step, Custom.Kleep.ResetKleepExportAttributes, clears the export-tracking attributes on every order (kleepLastExported → empty, isKleepExported → false) so all orders are picked up again by the next KleepExportOrdersCSV runs. It takes no parameters. Run it only when a full order backfill is needed:
  • Kleep asks you to re-send the order history (e.g. after a data reset on the Kleep side)
  • You fixed an order export misconfiguration and want previously exported orders to be sent again
Keep it unscheduled and run it manually: Administration > Operations > Jobs > KleepResetLastExported > Run Now.
KleepExportOrdersCSV exports at most OrdersMaxToExport orders per run (1,000 by default). After a reset, a backfill of N orders therefore takes N / 1,000 runs — trigger the orders job manually several times, or temporarily raise OrdersMaxToExport, then restore it.

Live Stock Checks

Kleep queries stocks live to avoid recommending out-of-stock sizes. Configure access using one of the two methods below.
We recommend SCAPI (IAS) — it is Salesforce’s modern headless API, delivering faster response times and a more streamlined integration experience. OCAPI remains supported for instances that have not yet migrated to the newer API framework.

FAQ

Each export job has two steps — a generate step and an SFTP upload step — and every parameter with its recommended value is listed in KleepExportProductsCSV settings and KleepExportOrdersCSV settings. In practice you only need to review three things: the site assignment in the Job Steps tab, MainViewType (must match your PDP image view type), and ExportType (Delta daily, one Full run at go-live). Everything else can keep its default value. KleepResetLastExported takes no parameters.
It clears the export-tracking attributes (kleepLastExported, isKleepExported) on all orders so the next KleepExportOrdersCSV runs re-export the full order history. Run it manually only when a full backfill is needed — typically when Kleep asks for it. Never schedule it. See KleepResetLastExported (utility job).
The minimum working setup is: kleepRetailerUUID (mandatory — provided by your Kleep Account Manager), isKleepRecommendationEnabled set to Yes, and kleepCountryCode set to your main market. kleepButtonColor and kleepFontFamily are optional styling preferences. Set kleepConsentMode to Optional only if your contract provides for the optional consent mode. See Custom Site Preferences.
In the GenerateOrdersCSV step of KleepExportOrdersCSV, set CustomAttributes to None and uncheck ExportOrderNotes. The standard columns of the export carry no name, email, address, phone number or payment information. See KleepExportOrdersCSV settings.
Both export jobs run once per day, every day. The reference schedule is 04:00 UTC for products and 05:00 UTC for orders, but the exact time does not matter to Kleep — pick a low-traffic window and keep roughly an hour between the two jobs. KleepResetLastExported is never scheduled. See Scheduling and frequency.
This preference existed in older cartridge versions to toggle Kleep session tracking. It has been removed in current versions because the session is always active. If your Business Manager still shows it, leave it at its default value (Yes).