Loading
Salesforce now sends email only from verified domains. Read More

B2B Commerce: Change the Display Order of Accounts in the Account Switcher

Publish Date: May 1, 2026
Description

The standard Account Switcher in B2B Commerce does not support custom sorting and lists accounts alphabetically. To change the order, a custom component must be created and configured.

Resolution

Since the standard Account Switcher component does not provide a built-in feature to edit the display order, you must implement a custom solution. You can refer to the b2b-commerce-open-source-components repository on GitHub as a baseline for your development:

  1. Review the myAccountSwitcherModal code in the b2b-commerce-open-source-components repository to understand the implementation.

  2. Create a new custom component by applying your specific account sorting logic to the code.

  3. Configure your store to use this custom component instead of the standard Account Switcher.

Knowledge Article Number

005321523

 
Loading
Salesforce Help | Article