- Fix incorrect encoding of multi-segment endpoint paths in
callCustomEndpoint#246
| API Name | API Version |
|---|---|
| shopper-baskets | 1.9.0 |
| shopper-baskets | 2.1.0 |
| shopper-consents | 1.1.0 |
| shopper-context | 1.1.1 |
| shopper-customers | 1.1.1 |
| shopper-experience | 1.0.7 |
| shopper-gift-certificates | 1.0.26 |
| shopper-login | 1.39.41 |
| shopper-orders | 1.5.0 |
| shopper-products | 1.0.37 |
| shopper-promotions | 1.0.36 |
| shopper-search | 1.3.0 |
| shopper-seo | 1.0.13 |
| shopper-stores | 1.0.17 |
- Enum types have been added for certain operations and types
- Certain operations have had types updated for query parameters
- SLAS helpers have been refactored to accept a single
optionsobject argument, where the properties are the old arguments - Path parameter special characters are encoded by default
- Allow custom properties on request bodies to be passed
- Remove API version from client config
- Use
ShopperBasketsV2API class to use V2 of Shopper Baskets
- Use
NOTE: The Shopper-Consents API is experimental and will not be available for consumption until October 21st, 2025. DO NOT use Shopper-Consents API in production, this api might be subject to change.
- Shopper Search API: Add
includedCustomVariationPropertiesquery parameter to theproductSearchoperation andexpand/includedCustomProductPropertiesquery parameters to thegetSearchSuggestionsoperation
- Allow custom params for 'loginGuestUser', 'authorizeIDP' and custom body for 'loginRegisteredUserB2C' functions #186
- Add helper to encode special SCAPI characters #189
- Normalize URLs to remove the possibility of path traversal from fetch calls #192
- Add to README docs to explain error handling for the SDK #174
- Add SLAS passwordless login helpers #173
- Add SLAS social login helper #172
- Support Node 22 #178
- The
expandquery parameter forShopper Productscalls now includes a new argument,page_meta_tags - The
expandquery parameter forShopper Searchcalls now includes a new argument,page_meta_tags X-Geolocationheader was added toShopper Context
- Fixed a bug that may cause the DNT flag to be omitted #170
- Update SLAS helpers to support DNT parameter #167
Starting July 31st 2024, all endpoints in the Shopper context API will require the siteId parameter for new customers. This field is marked as optional for backward compatibility and will be changed to mandatory tentatively by January 2025. You can read more about the planned change here in the notes section.
SLAS will soon require new tenants to pass channel_id as an argument for retrieving guest access tokens. You can read more about the planned change here.
Please be aware that existing tenants are on a temporary allow list and will see no immediate disruption to service. We do ask that all users seek to adhere to the channel_id requirement before the end of August to enhance your security posture before the holiday peak season.
In practice, we recommend:
- For customers using the SLAS helpers with a public client, it is recommended to upgrade to at least
v1.8.0of thecommerce-sdk-isomorphic. - For customers using the SLAS helpers with a private client, it is recommended to upgrade to
v3.0.0of thecommerce-sdk-isomorphic.
- Update SLAS helper function
loginGuestUserPrivateto requirechannel_idthroughclientConfig.parameters.siteId#165
- Export the parameter keys for each API endpoint #158
Shopper Baskets
| Endpoint Name | Description |
|---|---|
| updateItemsInBasket | Updates multiple items in a basket. |
Shopper Stores
- API Added
Shopper Orders
-
New endpoint added
Endpoint Name Description guestOrderLookup Lookup a guest order
Shopper Customers
- Removal of deprecated endpoints:
invalidateCustomerAuthauthorizeCustomerauthorizeTrustedSystem
- Add helper function
callCustomEndpointto call Custom APIs - #149
- Fixed createCodeVerifier adding entropy to be successfully indexed by Google Search Console #150
- Fix the missing
offsetandlimitparamters in Shopper Search
- Update APIs for Shopper Search
| Endpoint Name | Description |
|---|---|
| getUrlMapping | Gets URL mapping information for a URL that a shopper clicked or typed in. The mapping information is based on URL rules and redirects set up in Business Manager. For more information about prerequisites and sample usage, see URL Resolution. You can customize the behavior of this endpoint by using hooks. See the hooks for getUrlMapping in the Hook List. |
- Add support for Shopper Login (SLAS) prviate client with helper functions #148
⚠️ WARNING⚠️ : Users should be extremely cautious about using the SLAS private client helper functions in the browser as it can expose your client secret
- Add support for custom query parameters #139
- Mark
expandquery parameter forgetProductendpoint as optional instead of required
- Fix
expandquery parameter forshopper-products - Remove
retrieveCredQualityUserInfoendpoint fromshopper-loginas this functionality was removed from SLAS
- Descriptions for certain
shopper-loginandshopper-contextoperations have been updated on generated documentation site
- The 'To is not a function' issue is fixed.
- Cookies are disabled by default.
- The cross-fetch dependency has been removed. Now commerce-sdk-isomorphic uses native fetch in browser and node-fetch library in node. This has potential impact for client implementations. Passing
fetchOptions: {redirect: 'manual'}as called on the server-side to prevent following of redirects prior to this upgrade had no effect on the client becausecross-fetchusedXMLHttpRequestand was silently ignored. The new approach respects thisredirect: 'manual'directive, potentially causing redirects on the client (given these optional parameters) to not be followed, which breaks flows including the SLASauthorizeCustomermethod, which could fail with anopaqueredirecterror.
Shopper Baskets
-
New Endpoints
Endpoint Name Description updateAsAgentBasket Marks a basket as an agent basket. addPriceAdjustmentToBasket Adds a custom manual price adjustment to the basket. removePriceAdjustmentFromBasket Removes a custom manual price adjustment from the basket. updatePriceAdjustmentInBasket Updates a custom manual price adjustment on the basket. updateAsStorefrontBasket Marks a basket as a storefront basket.
- The Shopper Experience API has been added to the SDK.
Shopper Login
-
New Endpoints
Endpoint Name Description getSessionBridgeAccessToken Get a shopper JWT access token for a registered customer using session bridge getTrustedAgentAuthorizationToken Obtains a new agent on behalf authorization token for a registered customer getTrustedAgentAccessToken Get a shopper JWT access token for a registered customer using a trusted agent (Merchant)
- SLAS helpers support the
channel_id(siteId) parameter
- Fix SLAS callback error handling
- Fix SLAS logout function
- Export API type definitions. They are available as top-level exports, following the pattern
<API Name>Types.
Example usage:
import {ShopperBaskets, ShopperBasketsTypes} from "commerce-sdk-isomorphic"
const basketsClient = new ShopperBaskets(config)
const basket: ShopperBasketsTypes.Basket = await basketsClient.getBasket({ basketId: "some-basket" })Shopper Login
-
New Endpoints
Endpoint Name Description getPasswordResetToken Request a reset password token resetPassword Creates a new password
- More error handling has been added in the SLAS helpers
- SLAS helper
loginRegisteredUserB2Cno longer callsredirectURIwhen running server side
READMEupdated to explicitly note lack of CORS support for SCAPI
- If the
throwOnBadResponseflag is set, the error thrown now includes the full HTTP response object.
- An error about invalid user-agent is no longer printed to console when making requests in a browser.
- Replaced links to the Commerce Cloud Developer Center with links to the new Salesforce Developer Portal.
- SLAS Login Helper no longer requests
redirect_uriwhen running server-side
- SLAS helper functions have been added.
- New client configuration setting
throwOnBadResponse. When set to true, responses other than2xxand304will throw an error.
- Shopper Context has been added to the SDK.
Shopper Login
-
New Endpoints
Endpoint Name Description authorizePasswordlessCustomer Logs a customer in using Core with their customer profiles loaded in ECOM. Allows the user to authenticate when their identity provider (Core) is down. getPasswordLessAccessToken Evaluate the pwdless_tokenand issue the shopper token (JWT).
- Added support for
application/x-www-form-urlencodedrequest bodies.- SLAS endpoints now work out of the box
- TypeScript type definitions are now exported! 🎉
- Any parameter for any method can now be specified in the client configuration.
- Parameters not used by an endpoint will now be ignored, rather than included.
- A custom user agent is now sent with requests (node.js only)
Shopper Baskets
- New endpoints
| Endpoint Name | Description |
|---|---|
| transferBasket | Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS, and it must contain both the previous and current shopper IDs. |
| mergeBasket | Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS, and it must contain both the previous and current shopper IDs. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions. |
| updatePaymentInstrumentInBasket | Success, the response body contains the basket with the updated payment instrument. |
Shopper Login
- New endpoints
| Endpoint Name | Description |
|---|---|
| retrieveCredQualityUserInfo | Retrieve credential quality statistics for a user. |
- Shopper Discovery Search has been added to the SDK.
Shopper Login
- New operation:
getTrustedSystemAccessToken
Shopper Customers
- New operations
- registerExternalProfile
- getExternalProfile
- Fixed issue causing endpoints that accept array values to not properly set
Content-Typeheader toapplication/json.
- Fixed issue causing
shortCodeto not be properly set
Shopper Baskets API
- Endpoint Added
- organizations/{organizationId}/baskets/{basketId}/price-books
Shopper Login API
- Endpoint Added
- organizations/{organizationId}/oauth2/logout
- customer_id and enc_user_id were added to the TokenResponse type
- LoginRequest type was added
- Query param uuid for /organizations/{organizationId}/oauth2/authorize was renamed to usid