commerce/activitiesApi | trackAddProductToCart(product: Product): void | Commerce | 55.0 | Triggers the addToCart activity when a shopper adds a product to the cart. - If you replace the Product Detail Purchase Options component with a custom component, implement the addToCart activity to ensure that Commerce Einstein Recommendations use cases generate results based on shopper or buyer view behavior.
| Einstein Recommendations API | |
commerce/activitiesApi | trackClickReco(
recommenderName: string,
recoUUID: string,
product: Product,
sku: string
): void | Commerce | 55.0 | Triggers the clickReco activity when a recommended product is clicked and the customer is taken to the product detail page. - Implement this activity when building a custom Commerce Einstein recommendations component.
| Einstein Recommendations API | |
commerce/activitiesApi | trackViewProduct({
id: productId,
sku: string
}): void | Commerce | 55.0 | Triggers the viewProduct activity when a shopper views a Product Detail page. - Don’t fire if a product is displayed via a recommendation, search result, or any other means.
- If you replace the Product Detail Purchase Options component with a custom component, implement the viewProduct activity to ensure that Commerce Einstein Recommendations use cases generate results based on shopper or buyer view behavior.
| Einstein Recommendations API | |
commerce/activitiesApi | trackViewReco(
recommenderName: string,
recoUUID: string,
products: Products,
sku: string
): void | Commerce | 55.0 | Triggers the viewReco activity when a recommendation is displayed. - Implement this activity when building a custom Commerce Einstein recommendations component.
- If you calculate a recommendation but don’t show it to the customer—for example, it doesn’t have as many results as you like—don’t fire this activity.
| Einstein Recommendations API | |
commerce/cartApi | addItemToCart(productId: string, quantity: number) : Promise<Record<string, unknown>> | Commerce | 57.0 | Adds an item to a cart. | Commerce Webstore Cart Items | |
commerce/cartApi | addItemsToCart(payload: AddItemsToCartActionPayload) : Promise<Record<string, unknown>> | Commerce | 57.0 | Adds multiple items to the cart. | Commerce Webstore Cart Items | |
commerce/cartApi | applyCouponToCart(couponCode: string) : Promise<Record<string, unknown>> | Commerce | 57.0 | Applies a coupon to the cart. | Commerce Webstore Cart Items | |
commerce/cartApi | deleteCouponFromCart(couponId: string) : Promise<Record<string, unknown>> | Commerce | 57.0 | Deletes an applied coupon from the cart. | Commerce Webstore Cart Items | |
commerce/cartApi | deleteCurrentCart() : Promise<Record<string, unknown>> | Commerce | 57.0 | Deletes an active/current cart. | Commerce Webstore Cart Items | |
commerce/cartApi | deleteItemFromCart(itemId: string) : Promise<Record<string, unknown>> | Commerce | 57.0 | Deletes an item from the cart. | Commerce Webstore Cart Items | |
commerce/cartApi | refreshCartSummary() : Promise<Record<string, unknown>> | Commerce | 58.0 | Refreshes the cart summary. | Commerce Webstore Cart Items | |
commerce/cartApi | updateCartStatusProcessing(status: boolean) : Promise<void> | Commerce | 58.0 | Sets the isProcessing status field of the cart to the provided processing state. | Commerce Webstore Cart Items | |
commerce/cartApi | updateItemInCart(itemId: string, quantity: number) : Promise<Record<string, unknown>> | Commerce | 57.0 | Updates the item quantity in the cart. | Commerce Webstore Cart Items | |
commerce/checkoutApi | authorizePayment(checkoutId, token, billingAddress): Promise<PaymentAuthorizationResponse> | Commerce | 56.0 | Authorizes a tokenized payment for a checkout session. | Commerce Webstore Checkout | |
commerce/checkoutApi | checkoutStatusIsReady(checkoutStatus: CheckoutStatus | undefined): boolean | Commerce | 60.0 | Returns true if the supplied checkout status is complete and will accept additional parameters. | Commerce Webstore Checkout | |
commerce/checkoutApi | createContactPointAddress(address: Address): Promise<Address> | Commerce | 56.0 | Creates a contact point address record. - This API doesn’t affect the checkout session.
| Commerce Webstore Checkout | |
commerce/checkoutApi | loadCheckout(): Promise<CheckoutInformation> | Commerce | 57.0 | Loads the checkout session or error and saves it in the store for access by the wire adapter. | Commerce Webstore Checkout | |
commerce/checkoutApi | notifyCheckout(state: CheckoutInformation | Error | null): Promise<CheckoutInformation | Error | null> | Commerce | 57.0 | Publishes an updated checkout session state to the store so changes can be propagated by the wire adapter to subscribed listeners. - Passing an Error replaces the checkout state and checkout ID with the error state.
- Passing null clears the published data cache. Returns the passed in data unmodified.
| Commerce Webstore Checkout | |
commerce/checkoutApi | notifyAndPollCheckout(state: CheckoutInformation | Error | null): Promise<CheckoutInformation | Error | null> | Commerce | 57.0 | Calls notifyCheckout and polls async operations. - Additionally, when state indicates an async computation in progress (httpStatus is 202), it calls loadCheckout to poll until async tasks complete.
- Automatically triggers a cart summary refresh if needed.
| Commerce Webstore Checkout | |
commerce/checkoutApi | placeOrder(): Promise<OrderConfirmation> | Commerce | 56.0 | Finalizes the order, completing the active checkout session. | Commerce Webstore Checkout | |
commerce/checkoutApi | postAuthorizePayment(checkoutId: string, paymentToken: string, billingAddress?: Address, paymentsData?: Object): Promise | Commerce | 56.0 | Sends a client-side authorization result to the server. | Commerce Webstore Checkout | |
commerce/checkoutApi | restartCheckout(): Promise<void> | Commerce | 56.0 | Restarts an active checkout process. - Before you use this API, clear all cached checkout and address data to prepare for a new “active” session. Clear cache is required anytime the previous checkout session becomes invalid. Attempts to use other checkout APIs after the previous session become invalid and fail until the restart is called.
| Commerce Webstore Checkout | |
commerce/checkoutApi | simplePurchaseOrderPayment(checkoutId: string, tokenResponseToken: string, billingAddress: Address): Promise<PaymentAuthorizationResponse> | B2B Commerce | 57 | Sends an authenticated buyer’s simple purchase order number to the server. | Commerce Webstore Checkout | |
commerce/checkoutApi | updateContactInformation(contactInfo: ContactInfo): Promise<void> | Commerce | 56.0 | Updates the guest contact information in the active checkout session. | Commerce Webstore Checkout | |
commerce/checkoutApi | updateContactPointAddress(address: Address): Promise<Address> | Commerce | 56.0 | Updates an existing contact point address. - This API doesn’t affect the checkout session.
| Commerce Webstore Checkout | |
commerce/checkoutApi | updateDeliveryMethod(deliveryMethodId: string): Promise<void> | Commerce | 56.0 | Updates the delivery method for the default delivery group in the active checkout session, and updates the cart summary. | Commerce Webstore Checkout | |
commerce/checkoutApi | updateGuestEmail(guestEmail: string | undefined): Promise<void> | Commerce | 56.0 | Updates the cached guest email value that’s shared between components. - This API doesn’t affect the checkout session.
| Commerce Webstore Checkout | |
commerce/checkoutApi | updateShippingAddress(deliveryGroup: DeliveryGroup): Promise<void> | Commerce | 56.0 | Updates the shipping address for the default delivery group in the active checkout session. | Commerce Webstore Checkout | |
commerce/checkoutApi | waitForCheckout(): Promise<CheckoutInformation> | Commerce | 57.0 | Returns a resolved promise immediately if the checkout status is complete. Otherwise, the returned promise resolves after the checkout status becomes complete or errors. | Commerce Webstore Checkout | |
commerce/contextApi | getAppContext(): Promise<AppContext> | Commerce | 53.0 | Get application-context-specific data. | Commerce Webstore Application Context | |
commerce/contextApi | getSessionContext(): Promise<SessionContext> | Commerce | 53.0 | Get session-context-specific data. | Commerce Webstore Application Context | |
commerce/myAccountApi | createMyAccountAddress(
address: MyAccountAddress
): Promise<MyAccountAddress> | Commerce | 54.0 | Create an account address. | Commerce Webstore Account Address | |
commerce/myAccountApi | deleteMyAccountAddress(
addressId: string
): Promise<void> | Commerce | 54.0 | Delete an account address. | Commerce Webstore Account Address | |
commerce/myAccountApi | updateMyAccountAddress(
address: MyAccountAddress
): Promise<MyAccountAddress> | Commerce | 54.0 | Update an account address. | Commerce Webstore Account Address | |
commerce/myAccountApi | resetPassword(
username: string
): Promise<Response> | Commerce | | Reset a password. | Commerce Webstore Account Address | |
commerce/myAccountApi | updateMyAccountProfile(profile: MyAccountProfileRequestOptions): Promise<MyAccountProfileResponse> | Commerce | 59.0 | Update an existing account profile. | Commerce Webstore Account Address | |
commerce/orderApi | startReOrder(options: OrderActionAddToCartRequestOptions): Promise<OrderActionAddToCartData> | Commerce | 57.0 | | Commerce Checkout Order | |
commerce/orderApi | authorizeOrderSummaryAccess(options): Promise<OrderSummaryAccessAuthorizationData> | Commerce | 64.0 | Authorize guest users by verifying their personally identifiable information to access the requested order summary. This API is specifically for guest users. | Commerce Webstore Order Summary Authorization | |
experience/cmsEditorApi | contentBodyModify['propertyOfContentType'] = 'new value';
updateContent({
contentBody: contentBodyModify
}).then(() => {
}); | CMS | 54.0 | Updates the property to be updated in content form. Then calls back after the form is updated. | CMS Content | |
commerce/effectiveAccountApi | effectiveAccount.update('Sample Account Id','Sample Account Name');
const accountId = effectiveAccount.accountId;
const accountName = effectiveAccount.accountName; | Commerce | 57.0 | Sets the account name and ID in session storage. | B2B Commerce Resources | |
commerce/productApi | getProductCollection(options): Promise<WishlistItemData> | Commerce | 64.0 | Retrieves detailed product information for multiple products by IDs or SKUs in a single batch request. | Commerce Webstore Products | |
commerce/productApi | getProductPricingCollection(options): Promise<WishlistItemData> | Commerce | 64.0 | Retrieves pricing information for multiple products based on buyer context and active pricebook. | Commerce Webstore Pricing Products | |
commerce/productApi | getProductRecommendations(options): Promise<WishlistItemData> | Commerce | 64.0 | Retrieves Einstein-powered product recommendations using specified recommender type and anchor context. | Commerce Einstein Webstore Recommendations | |
commerce/promotionApi | getPromotionPricingCollection(options): Promise<WishlistItemData> | Commerce | 64.0 | Evaluates active promotions for multiple products and returns promotional pricing and adjustments. | Commerce Webstore Promotion Products | |
commerce/productApi | searchProducts(options): Promise<WishlistItemData> | Commerce | 64.0 | Performs product search with support for search terms, category filters, refinements, and sorting. | Commerce Webstore Search Products | |
commerce/wishlistApi | addItemToWishlist(options): Promise<WishlistItemData> | Commerce | 58.0 | Add items to wishlist. | Commerce Webstore Wishlist Items | const payload = { wishlistId: '3orxx0000000001AAA', effectiveAccountId: '001000000000ABC', wishlistItemInput: { productId: '01txx0000006i2SAAQ' }}; import { addItemToWishlist } from 'commerce/wishlistApi'; const result: WishlistItemData = await addItemToWishlist(payload); |
commerce/wishlistApi | addWishlistToCart(options): Promise<WishlistToCartResultData> | Commerce | 58.0 | Add a wishlist to a cart. | Commerce Webstore Wishlist, Add to Cart | |
commerce/wishlistApi | createWishlist(options): Promise<WishlistData> | Commerce | 58.0 | Create a wishlist. | Commerce Webstore Wishlists | |
commerce/wishlistApi | deleteItemFromWishlist(options): Promise<void> | Commerce | 58.0 | Delete a wishlist item. | Commerce Webstore Wishlist Item | |
commerce/wishlistApi | deleteWishlist(options): Promise<void> | Commerce | 58.0 | Delete a wishlist. | Commerce Webstore Wishlists | |
commerce/wishlistApi | updateWishlist(options): Promise<WishlistSummaryData> | Commerce | 58.0 | Update a wishlist. | Commerce Webstore Wishlist | |