---
schema_version: "1"
id: d65876639ed9a93c3d662265eb986cda724ea305f22adfc01b3750b095c75a73
title: Grant Buyers Access to External Accounts for a B2B Store
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/comm_buy_on_behalf.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.comm_buy_on_behalf.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f720cdb7757b62ca79ef4247ef61e3b7320f5f8dd2bdfc0cf4af93a8448f9021
description: An external account is an account for which the buyer isn’t a contact. You can grant a B2B buyer access to an external account by assigning them the Buyer Manager role. When shopping in a B2B store, the designated buyer can switch to an external account that they have access to. The buyer can purchase on behalf of that account or add and activate users, reset passwords, and view their shopping carts, depending on how you configure their privileges.
products:
  - Commerce
  - B2B Commerce
release: "264"
---
# Grant Buyers Access to External Accounts for a B2B Store

An external account is an account for which the buyer isn’t a contact. You can grant a B2B buyer access to an external account by assigning them the Buyer Manager role. When shopping in a B2B store, the designated buyer can switch to an external account that they have access to. The buyer can purchase on behalf of that account or add and activate users, reset passwords, and view their shopping carts, depending on how you configure their privileges.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=commerce.comm_editions.htm&amp;language=en_US" target="_blank">View supported editions</a>.</td></tr></tbody></table>

[Which Salesforce Commerce Product Do I Have?](https://help.salesforce.com/s/articleView?id=commerce.comm_what_product.htm&language=en_US)

A buyer that you designate to access an external account must be assigned the preconfigured Buyer Manager permission set. The assignment must include system permissions or be assigned an equivalent custom permission set. The buyer must have the Customer Community Plus license or a license with a higher level of privileges.

A buyer that you designate to manage buyers in an external account must also have delegated external user administration rights, which you assign to the buyer’s profile. For more information, see [Delegate External User Administration](https://help.salesforce.com/s/articleView?id=platform.networks_DPUA.htm&type=5&language=en_US).

The buyer’s account and the external account must be part of buyer groups that are assigned to the same store. You can create up to 200 external managed accounts per user.

1. Configure the buyer’s account.
    1. From the buyer’s account record, go to the External Managed Account related list.
    2. Click **Configure**.
    3. Enter a name for this external managed account record.
    4. For User, enter the name of the buyer.
    5. For Target Account, enter the name of the external account that the buyer can switch to.
    6. Under Authorized Access, select the privilege level to assign to the buyer for the account and move it to the Selected Access list.
        
        To allow the buyer to purchase on behalf of the external account, select **Buy For**. To allow the buyer to manage users in the external account, select **Manage Users**.
    7. Save your changes.
2. Share the external account with the buyer.
    
    You can create Apex-based rules to automate sharing. For more information, see [Sharing a Record Using Apex](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_creating_with_apex.htm).
    
    1. From the account record of the external account, select **Sharing** from the dropdown menu.
    2. In the Search dropdown, select **Customer Portal User**.
    3. Search for the buyer.
        
        Leave Account Access as Read Only.
    4. Save your changes.
3. Add the Account Switcher option to the profile menu in the store.
    
    At present, the Account Switcher supports only business accounts.
    
    1. In Experience Builder, click the profile menu.
    2. Under Authenticated User Options, select **Edit Default User Profile Menu**.
    3. If the Account Switcher menu item is already added, skip to step g. Otherwise, click **\+ Add Menu Item**.
    4. In the Type field, select **Modal**.
        
        For older stores built on the Aura platform, select **Event**.
    5. In the Event field, select **Account Switcher**.
    6. Enter a name for the menu item, for example, Switch Accounts.
    7. Click **Save Menu**.
    
    When the buyer logs into the store, they can select the Switch Accounts option from the user profile menu and choose an external account.
    
    ![Swtich accounts screen showing accounts that can be selected](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/switch_accounts.png)

You can use `{!CurrentUser.effectiveAccountId}` as the Account Id attribute value in components that track account IDs. This value updates the data that’s displayed in the component to the account that’s being switched to. For example, the Related Record list component shows the Members list on the Account Management page and uses `{!CurrentUser.effectiveAccountId}` in the Parent Record Id field by default. When the user who is managing the target account switches to the target account, the information on the Account Management page switches to the context of the target account. The managing user can manage target account members from there.

To implement behavior based on account switching, you can create a custom component and use the account ID `{!CurrentUser.effectiveAccountId}`.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/images/icon_note.png)

Note

When setting up an account-based expression, use the expression User.Commerce.EffectiveAccountId to ensure that the buyer’s selected account is used and not their user account. If you don’t specify an EffectiveAccountId, the system defaults to the user account.

#### See Also

- [Configure a Business Account as a Buyer for a B2B Store](https://help.salesforce.com/s/articleView?id=commerce.comm_buyer_accounts.htm&release=264.0.0&type=5 "Create a business account and then enable it as a buyer account. Add contacts to the buyer account and enable the contacts as customer users.")
- [Customize the Profile Menu in a B2B Commerce Store](https://help.salesforce.com/s/articleView?id=commerce.comm_user_profile_menu.htm&release=264.0.0&type=5 "In Experience Builder, you can define how you want your user profile menu to appear, including using company names and logos.")