Connect Salesforce Commerce Cloud¶
Squoosh reads your Salesforce B2C Commerce order count. It does not yet change how your AI shoppers behave. This connection uses the SCAPI Admin Orders API and an Account Manager API client.
Beta: connecting and verifying only
This connector has not been validated against a live account. It stays at the auth stage, shown as Connected, validating. Credential verification checks access to your site's orders; the order reader is implemented and tested with fixtures. This stage does not enable unattended snapshot refreshes or shopper calibration.
What the connection does¶
Squoosh exchanges your API client credentials for a token scoped to one instance, then verifies access with an order request limited to one record. An empty store is a successful connection when Salesforce returns an empty order list.
The order reader counts placed orders with status new or completed over the requested number of full UTC days, excluding today. It also aggregates the countries on those orders. There is no session or visit count in this API, so Squoosh does not calculate a conversion rate from these orders. Order country counts describe purchasers, not the geography of all visitors.
Create the credentials¶
You need access to Account Manager and your instance's Business Manager. The connection requires five fields.
- Open Account Manager, select API Client, and create a dedicated API client. Keep the API Client ID and the password you set as the API client secret. Salesforce instructs customers to use an alphanumeric password.
- Assign the Salesforce Commerce API role for the correct instance. An API client used for OCAPI cannot be reused for this connection.
- Set Token Endpoint Auth Method to
client_secret_postand Access Token Format toJWT. Addsfcc.ordersto Allowed Scopes, with the tenant scope for your instance,SALESFORCE_COMMERCE_API:<realm>_<instance>. Squoosh requests read access only;sfcc.orders.rwis unnecessary. Follow Salesforce's Admin API authorization guide for the client setup. The exchange uses HTTP Basic as shown in Salesforce's guide and SDK. - In Business Manager → Administration → Site Development → Salesforce Commerce API Settings, copy the Short Code and Organization ID. If there is no short code yet, choose Request Short Code; propagation can take up to 24 hours.
- In Business Manager → Administration → Sites → Manage Sites, copy the Site ID for the storefront you want Squoosh to read.
Connect in Squoosh¶
- Open Integrations, find Salesforce Commerce Cloud, and click Connect.
- Enter the Account Manager API client ID, API client secret (password), Short code, Organization ID, and Site ID.
- Click Connect. Squoosh verifies the token, instance and site against the Orders API.
The secret is kept private after saving. The other four fields are identifiers. Short codes must be eight letters or digits. Organization IDs follow Salesforce's f_ecom_<realm>_<instance> format, such as f_ecom_zzte_053; Squoosh derives the token's tenant scope from this value. Site IDs accept 1 to 32 letters, digits, underscores or hyphens.
What Squoosh reads and never retains¶
| Data | Use |
|---|---|
| Order status and creation date | Count placed, non-cancelled orders inside the time window. A genuine zero remains zero. |
| Billing country | Aggregate order-weighted country counts. If absent or invalid, use the first shipment's shipping country. Orders without either still count toward the order total. |
| Account Manager access token | Authorize the requests within a single verification or read. Tokens are not cached across connections. |
Salesforce returns full order documents. This endpoint has no field-selection option, so names, emails, full addresses, products and payment-instrument details can arrive in the API response. Squoosh discards those fields and does not retain them in snapshots, logs or shopper inputs. It retains only aggregate counts, countries and quality warnings from each order page. Squoosh does not request customer profiles, product catalogs, session histories or browsing recordings, and does not modify orders.
The order's channelType describes where an order was captured, such as storefront or call center. Squoosh never treats it as acquisition-channel evidence. An IP address is never used to guess a device.
Limits and caveats¶
- No shopper-behavior changes yet. This is an orders-only source with no session denominator. No conversion rate or traffic distribution is inferred.
- Reads cover the last N full UTC days. Salesforce's description mixes date-only wording and a date-time schema; instance timezone behavior needs live validation. Squoosh supplies midnight UTC boundaries and checks each returned creation date.
- Reads use 200 orders per page, sequential offsets and at most 20 pages, so at most 4,000 fetched orders per window. A full final page marks both the order count and geography as truncated and partial. A short page proves the list ended; it is not marked truncated. These partial counts must not be interpreted as complete window totals.
- Salesforce also restricts
offset + limitto 10,000. The local page fuse stops sooner. The gateway's 10 MB response limit can reject a page containing very large order documents; that failure is reported, never treated as an empty store. - Refresh spacing is at least 15 minutes when reads are enabled. This is Squoosh's policy, not a documented numeric Admin Orders quota. Requests time out after 10 seconds. Rate-limit responses are retryable; the connector does not retry within a read.
- No public access-authorized Admin sandbox was established for this connector. Live validation requires your customer or partner realm. Salesforce On-Demand Sandboxes require purchased credits; example realm identifiers are not usable credentials.
Troubleshooting¶
| Problem | What to do |
|---|---|
| Invalid short code, organization ID or site ID | Copy the identifier from the Business Manager screen above. Do not paste a URL or path. |
| Token exchange rejected, 400 or 401 | Check the client ID, saved secret, Salesforce Commerce API role and correct instance assignment. Use a dedicated SCAPI client. |
| Missing scope or 403 | Check sfcc.orders and the derived tenant scope in Allowed Scopes, plus the client's instance permissions. |
| Orders request returns 404 | Check the short code, organization ID and site ID together. This is a permanent configuration error, not an outage. |
| Orders request returns 400 | The generated request was rejected. Contact Squoosh support; this is treated as a connector error and is not retried automatically. |
| Rate limited, 429 | Wait for the displayed retry interval if Salesforce supplies one, then check the connection again. |
| 500, 503 or timeout | Retry later. For recurring failures, share the failure status with support. Very large orders can exceed Salesforce's response-size limit. |
| Order count is partial | The page fuse was reached or returned records could not be counted reliably. Do not treat the count as a complete total. Missing country warnings affect geography only. |
| Connection stays at validating | Expected for this beta stage. Successful credential verification is not live validation of the complete order reader. |