Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Seller-assisted buying

Seller-assisted buying lets a store administrator log in as a customer and act on their behalf by browsing products, building a cart, and placing orders. During the session, a banner tells the administrator they are browsing as the customer. Afterward, the customer can review every administrator action in their account activity log.

Seller-assisted buying is not a separate drop-inNPM packages that provide core Commerce storefront features such as cart, checkout, product details, and account flows. or package. It extends three drop-ins you already have and adds a session banner to the boilerplatePre-configured storefront with the components and services you need to get started..

When seller-assisted buying is enabled at the store level, an administrator generates a one-time password (OTP) in the Admin. The administrator uses the OTP to sign in as the customer through the standard storefront sign-in flow. The storefront-auth drop-in decodes the returned JSON Web Token (JWT) and checks it for an admin identifier. When the token includes an admin identifier, the drop-in sets an auth_dropin_admin_session cookie.

The boilerplate header block reads that cookie on every page load. When the cookie is present, the block renders the session banner. The banner listens to the authenticated event and removes itself when the session ends. See Session banner for the UI details and CSS classes.

If remote shopping assistance is disabled at the store level, both the settings block and the activity block display a feature-disabled message rather than their normal UI.

Because the feature spans several drop-ins, each piece lives with the drop-in it belongs to:

Session banner showing administrator connection status and Close Session button

Session banner displayed during an administrator-assisted buying session

The session banner lives in the boilerplate header block, not in a drop-in. It renders automatically when an admin session is active. You don’t need to add any code. The banner shows the customer’s name and the website name, and includes a “Close Session” button that calls revokeCustomerToken() and redirects to the home page. The CSS and rendering logic ship with the header block (blocks/header/header.css and blocks/header/renderSellerAssistedBuyingBanner.js).

Target these classes to restyle the banner:

/* Adds top padding to page content so the banner does not overlap it */
body:has(.seller-assisted-buying-banner) {}
/* Banner strip — rendered at the top of the page during an assisted session */
.seller-assisted-buying-banner {}
.seller-assisted-buying-banner__message {}
.seller-assisted-buying-banner__close-button {}

If you change the banner height, update body:has(.seller-assisted-buying-banner) at the same time so the page content shifts down by the same amount.