Get Inventory Source info by Source Name using Multi-Source (MSI) Magento 2.

Retrieve the Inventory Source Details info by Source Name using MSI module Magento 2 is pretty simple.

The source name is the visible entity in the Manage source grid with column ‘name’ to separate out the list of different sources in a system.

You can fetch details info from the column name in MSI using SourceRepositoryInterface and SearchCriteriaBuilder interface.

Magento MSI module natively supports the Default source and its name is “Default Source”.

Example of retrieving the default source data by name column.

You can call a function to fetch a list of information from the source,

This way, You can get the information of your Inventory Source by Source Name only.