> ## Documentation Index
> Fetch the complete documentation index at: https://www.algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Shared Catalogs

> Learn how the Algolia AI Search & Discovery extension interacts with the Adobe Commerce Shared Catalogs feature.

export const Records = () => <Tooltip tip="A record is a searchable object in an Algolia index. Each record consists of named attributes." cta="Algolia records" href="/doc/guides/sending-and-managing-data/prepare-your-data#algolia-records">
    records
  </Tooltip>;

Shared Catalogs are part of the [Adobe Commerce B2B features](https://experienceleague.adobe.com/en/docs/commerce-admin/b2b/install).
The feature lets you maintain catalogs with custom prices for different companies.
For more information, see [Adobe's documentation](https://experienceleague.adobe.com/en/docs/commerce-admin/b2b/shared-catalogs/catalog-shared).

## Enable Shared Catalogs

1. In your store's Admin, go to **Stores > Settings > Configuration > General > B2B Features**.
2. Set **Enable Company** to **Yes**.
3. Set **Enable Shared Catalog** to **Yes**.

After you enable the feature,
the Algolia extension adds the `catalog_permissions` attribute to product and category <Records />.

<Note>
  Enabling Shared Catalogs increases your record size.
  The `price` attribute grows the most.
  If you have complex category permissions or many shared catalogs,
  check the impact on your product indices first.
</Note>

## Customer groups

Adobe Commerce and Magento Open Source create a customer group for each shared catalog.

This example creates two shared catalogs: one for small businesses and one for franchises.

<img src="https://mintcdn.com/algolia/euPPm2cRVTf92uwA/doc/integration/magento-2/how-it-works/shared-catalogs-grid.png?fit=max&auto=format&n=euPPm2cRVTf92uwA&q=85&s=388d6cebcbf6e9c6c3a410cde18c31a1" alt="Screenshot of a 'Shared Catalogs' page with a table of three records and an 'Add Shared Catalog' button." width="3214" height="928" data-path="doc/integration/magento-2/how-it-works/shared-catalogs-grid.png" />

You'll also find two more customer groups listed on the **Customers > Customer Groups** page.

<img src="https://mintcdn.com/algolia/6YAuCqOjAR64l9hZ/doc/integration/magento-2/how-it-works/shared-catalogs-customer-groups.png?fit=max&auto=format&n=6YAuCqOjAR64l9hZ&q=85&s=c36683c1ede5b38158d04c48ca10db53" alt="Screenshot of a 'Customer Groups' grid showing six records with columns for ID, Group, Tax Class, and Action." width="3192" height="1154" data-path="doc/integration/magento-2/how-it-works/shared-catalogs-customer-groups.png" />

## Companies

Adobe's B2B features include [companies](https://experienceleague.adobe.com/en/docs/commerce-admin/b2b/companies/account-companies).
Use companies to link shared catalogs to a group of users.

To link a company's users to its shared catalog:

1. On the company page in your Admin, go to **Advanced Settings**.
2. Link a shared catalog to the company.

<img src="https://mintcdn.com/algolia/6YAuCqOjAR64l9hZ/doc/integration/magento-2/how-it-works/shared-catalogs-companies.png?fit=max&auto=format&n=6YAuCqOjAR64l9hZ&q=85&s=441d24010ef996f54c5225880c21f56d" alt="Screenshot of a drop-down menu in the 'Customer Group' field showing options like 'Retailer,' 'Wholesale,' and 'B2B (Small Business).'" width="2258" height="1298" data-path="doc/integration/magento-2/how-it-works/shared-catalogs-companies.png" />

## Algolia indexing with Shared Catalogs enabled

Each customer group generates a [replica](/doc/integration/magento-2/how-it-works/indexing#number-of-records-created) for product indices.
The number of replicas per customer group depends on your sorting options.

<img src="https://mintcdn.com/algolia/euPPm2cRVTf92uwA/doc/integration/magento-2/how-it-works/shared-catalogs-replicas.png?fit=max&auto=format&n=euPPm2cRVTf92uwA&q=85&s=efbf13282fcc009741ae4a3eb0cbccf6" alt="Screenshot of a list of replica indices with names like 'magento246ee_default_products_price_group_0_asc' and similar entries, each with a link icon." width="1938" height="894" data-path="doc/integration/magento-2/how-it-works/shared-catalogs-replicas.png" />

For more information, see [Understanding the Algolia replica configuration](/doc/integration/magento-2/troubleshooting/back-end-issues#understand-the-algolia-replica-configuration).

### How Shared Catalogs handle pricing

Customer group replicas sort shared catalog prices, just like other replicas.

A shared catalog's custom price also applies to its customer group.
The price applies to the group's replicas too.
This follows the Adobe Commerce and Magento Open Source [group pricing feature](https://experienceleague.adobe.com/en/docs/commerce-admin/catalog/products/pricing/product-price-group).

### Product visibility with Shared Catalogs

Algolia's extension adds the `catalog_permissions` attribute to product and category records.
This attribute assigns a boolean value to each customer group.
The value determines if the item is visible on the frontend.

Manage these permissions in your Admin under **Catalog > Shared Catalogs**.

<img src="https://mintcdn.com/algolia/6YAuCqOjAR64l9hZ/doc/integration/magento-2/how-it-works/shared-catalogs-attribute.png?fit=max&auto=format&n=6YAuCqOjAR64l9hZ&q=85&s=e081c00622067f431bce3ee34ee2861e" alt="Screenshot of a code snippet showing catalog permissions data with customer_group_0 to customer_group_7 keys and their boolean values." width="856" height="398" data-path="doc/integration/magento-2/how-it-works/shared-catalogs-attribute.png" />

<Check>
  If you add, edit, or delete a shared catalog, run a full reindex for products and categories.
</Check>

Products and categories outside a shared catalog use default catalog permissions.
These permissions control visibility.
Examples include the **NOT LOGGED IN** and **Default** customer groups.

### Default catalog permissions

Products and categories outside a shared catalog use your **Category Permissions** settings.
These settings control visibility.

<img src="https://mintcdn.com/algolia/6YAuCqOjAR64l9hZ/doc/integration/magento-2/how-it-works/shared-catalogs-category-page.png?fit=max&auto=format&n=6YAuCqOjAR64l9hZ&q=85&s=fa7c8c71c0445ecb00258fb9c549f599" alt="Screenshot of 'Category Permissions' table with 'Main Website' and 'NOT LOGGED IN' settings, showing 'Browsing Category,' 'Display Product Prices,' and 'Add to Cart' options." width="3202" height="1364" data-path="doc/integration/magento-2/how-it-works/shared-catalogs-category-page.png" />

After any permission updates, reindex all affected products and categories.

To customize the `catalog_permissions` attribute,
use **update attribute data** [backend events](/doc/integration/magento-2/customize/custom-back-end-events#update-attribute-data).
