Skip to content

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

Company Switcher overview

The Company Switcher drop-in enables multi-company user access and company context switching for Adobe Commerce storefronts. It also supports company context retrieval and automatic graphql header management.

Supported Commerce features

The following table provides an overview of the Adobe Commerce features that the Company Switcher drop-in supports:

FeatureStatus
Multi-company user accessSupported
Company context switchingSupported
Company context retrievalSupported
Automatic GraphQL header managementSupported
Customer group header managementSupported
Real-time context change eventsSupported
Data isolation across companiesSupported
Permission-based access controlSupported
Session persistenceSupported
GraphQL API integrationSupported

Section topics

The topics in this section will help you understand how to customize and use the Company Switcher effectively within your storefront.

Quick Start

Provides quick reference information and getting started guide for the Company Switcher drop-in. This topic covers package details, import paths, and basic usage examples to help you integrate Company Switcher functionality into your site.

Initialization

Explains how to initialize the Company Switcher drop-in with language definitions for internationalization, company header configuration, customer group header configuration, session storage keys, GraphQL module integration, and drop-in-specific configuration options. All configuration options are optional.

Containers

Describes the CompanySwitcher container, which provides a dropdown selector for users to switch between multiple companies they have access to in multi-company B2B scenarios.

Functions

Documents the 4 API functions for managing company context and headers: getCompanyHeaderManager (for managing company headers), getCustomerCompanyInfo (for retrieving company context), getGroupHeaderManager (for managing customer group headers), and updateCustomerGroup (for updating group context).

Events

Explains the 4 events used by the Company Switcher drop-in: companyContext/changed (emits and listens for context changes), checkout/initialized (listens for checkout initialization), checkout/updated (listens for checkout updates), and company/updated (listens for company data updates).

Slots

The Company Switcher drop-in does not expose any slots for customization. The drop-in provides functionality through API methods and configuration options rather than UI customization points.

Dictionary

Explains the internationalization keys for translating company switcher-related UI text, including component headings, button labels, and dropdown options. Customize dictionary values during initialization for localization and branding.

Styles

Describes how to customize the appearance of the Company Switcher container using CSS classes, design tokens, and BEM-style naming conventions.