Prerequisites
-
Access to repo.magento.com to download the extension. For key generation and obtaining the necessary rights, see Get your authentication keys.
Save authentication keys for installation by defining them globally in your COMPOSER_HOME directory. Or, save them to an auth.json file in the Adobe Commerce application root directory.
-
Supported version of the B2B extension–Determine the most recent version of the B2B extension that is supported on the deployed Adobe Commerce version.
-
Check the release notes for the most current information about version compatibility, updates, or changes that can affect installation or upgrade requirements.
Install the B2B extension (magento/b2b-extension
) using Composer. The extension is a composer metapackage that includes the collection of modules that enable the B2B capabilities for an Adobe Commerce instance. For a list of included modules, see B2B Packages.
Adobe recommends working in a development branch when adding the B2B extension to your project. If you do not have a branch, see Create a branch for development. When installing the B2B extension, the Magento_B2b
extension name is automatically inserted in the app/etc/config.php
file. There is no need to edit the file directly.
To install the B2B extension:
-
On your local workstation, change to your project directory.
-
Create or check out a development branch.
-
Add the B2B extension to the
require
section of thecomposer.json
file. -
Update the project dependencies.
-
Add, commit, and push code changes.
NOTE
Pushing updates to the cloud environment initiates the Commerce cloud deployment process to apply the changes. Check the deployment status from the deploy log. If you encounter deployment errors, see Recover from component failure. -
After the build and deploy finishes, use SSH to log in to the remote environment and verify that the B2B extension is installed and enabled.
An extension name uses the format:
<VendorName>_<ComponentName>
.Sample response:
-
From the Adobe Commerce application root directory, update the
composer.json
to add the dependencies for the B2B extension:If an error occurs, for example:
Check the package spelling, your version constraint, and that the package is available and matches your minimum-stability (stable) requirement.
-
If prompted, enter your authentication keys.
Your public key is your username; your private key is your password. If you have stored your public and private keys in
auth.json
, you are not prompted to authenticate. -
Run the following commands after Composer finishes updating modules:
NOTE
In Production mode, you might receive a message toPlease rerun Magento compile command
. Enter the commands to complete the installation. Adobe Commerce does not prompt you to run the compile command in Developer mode.
After completing the installation, configure and start message consumers.
Message consumers
The Adobe Commerce B2B extension uses MySQL for message queue management. The following table lists the message consumers that support B2B capabilities. After you install the extension, start the message consumers for the B2B capabilities required for your Commerce storefront.
Consumer | Description |
---|---|
sharedCatalogUpdatePrice | Updates the price for each product in a shared catalog. Required when the Shared Catalogs option is enabled in the Admin System configuration settings. |
sharedCatalogUpdateCategoryPermissions | Updates categories assigned to a shared catalog category. Required when the Shared Catalogs option is enabled in the Admin System configuration settings. |
negotiableQuotePriceUpdate | Updates prices for negotiable quotes. Required when the Quotes option is enabled in the Admin System configuration settings. |
purchaseorder.toorder | Converts purchase order to order. Required when the Purchase Orders option is enabled in the Admin System configuration settings. |
purchaseorder.transactional.email | Send purchase order emails. Required when the Purchase Orders option is enabled in the Admin System configuration settings. |
purchaseorder.validation | Validates purchase order against relevant approval rules. Required when the Purchase Orders option is enabled in the Admin System configuration settings. |
quoteItemCleaner | Deletes invalid or inactive price quotes when a product is deleted from the catalog or removed from the cart. Required when the Quotes option is enabled in the Admin System configuration settings. |
inventoryQtyCounter | Asynchronously corrects the stock index after an order is placed or a product is removed. Required when the Use deferred stock update option is enabled for Inventory Management in the Admin configuration settings. See Performance Best Practices. |
async.operations.all | Creates messages for each individual task of a bulk operation such as importing or exporting items, changing prices on a mass scale, and assigning products to a warehouse. Required when the Admin bulk operations option for Inventory Management is set to Run asynchronously in the Admin System configuration settings. |
Configure message consumers
Prevent possible processing issues or delays by adding the following parameters when you start the message consumers for B2B capabilities.
-
--max-messages <value>
— Specifies the maximum number of messages each consumer must process before terminating (default = 10000). Although Adobe does not recommend it, you can use 0 to prevent the consumer from terminating. The best practice for a PHP application is to restart long-running processes to prevent possible memory leaks. -
--batch-size <value>
— Allows you to limit the system resources consumed by the consumers (CPU, memory). Using smaller batches reduces resource usage and, thus, leads to slower processing. If specified, messages in a queue are consumed in batches of<value>
each. This option is applicable for the batch consumer only. If--batch-size
is not defined, the batch consumer receives all available messages in a queue.
For information about additional configuration options, see Specific-configuration.
Start message consumers
To enable asynchronous operations for B2B capabilities, you must start multiple message consumers.
-
List the available message consumers:
The command returns available message consumers including all B2B message consumers.
-
Start each consumer separately:
For example:
&
to the command, return to a prompt, and continue running commands. For example: bin/magento queue:consumers:start sharedCatalogUpdatePrice &
.For more information, see Manage message queues in the Configuration Guide.
Add message consumers to cron
You can automate the run schedule for the SharedCatalogUpdateCategoryPermissions
and SharedCatalogUpdatePrice
message consumers by adding the schedule to the cron configuration file /app/code/Magento/MessageQueue/etc/crontab.xml.
You can also configure schedules for message consumers from the Store Configuration settings in the Admin.
Enable B2B features in the Admin
After installing the Adobe Commerce B2B extension and starting message consumers, you must also enable B2B features in the Admin.
B2B Reimagined: Transforming Go-to-Market Strategies for Profitable Growth
B2B brands are facing a digital revolution. Buyers expect hyper-relevant content and self-service, while internally AI is transforming...
Wed, Mar 19, 1:00 PM PDT (8:00 PM UTC)
Put the Customer at the Center and Build Relationships That Last a Lifetime
First impressions last a lifetime. Great first impressions feel personal, connected, and relevant right from the start. From the first...
Wed, Mar 19, 2:30 PM PDT (9:30 PM UTC)
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more