{"id":342979,"date":"2022-07-13T06:53:49","date_gmt":"2022-07-13T06:53:49","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=342979"},"modified":"2022-07-13T13:17:42","modified_gmt":"2022-07-13T13:17:42","slug":"magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/","title":{"rendered":"Magento 2 Assign Inventory Source for bulk product And Assign Inventory programmatically"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>In this article, You will learn about how to Assign Inventory sources to bulk products and also you&#8217;ll learn how the inventory sources are assigned with the source code. And which files we have to use to assign the inventory sources programmatically.<\/p>\n\n\n\n<p>Please follow these steps one by one:<\/p>\n\n\n\n<p>Step-1: On the Admin Panel, go to the Catalog menu then select the products menu.(catalog &gt; products). See the below Screenshot.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"609\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247-1200x609.png\" alt=\"Selection_247\" class=\"wp-image-343039\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247-1200x609.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247-300x152.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247-250x127.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247-768x390.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247.png 1264w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Step-2: Now you&#8217;ll see the products grid from here you can select one or more than one products to assign inventory sources.<br>And then check the Actions dropdown after selecting the products where you&#8217;ll find the Assign Inventory Sources menu click on the same. See the below Screenshot.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"965\" height=\"490\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_246-2.png\" alt=\"Selection_246-2\" class=\"wp-image-343040\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_246-2.png 965w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_246-2-300x152.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_246-2-250x127.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_246-2-768x390.png 768w\" sizes=\"(max-width: 965px) 100vw, 965px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Step-3: Now after clicking, You&#8217;ll see the page where you&#8217;ll find all the sources. see below screenshot.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"538\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_248-1200x538.png\" alt=\"Selection_248\" class=\"wp-image-343041\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_248-1200x538.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_248-300x134.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_248-250x112.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_248-768x344.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_248-604x270.png 604w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_248.png 1259w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Step-4: Now select the source which you want to assign to all the selected products. And then click on the Assign sources button which you&#8217;ll see on the upper right corner of the page click on the button assign source. See the below screenshot.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1172\" height=\"500\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_249.png\" alt=\"Selection_249\" class=\"wp-image-343042\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_249.png 1172w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_249-300x128.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_249-250x107.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_249-768x328.png 768w\" sizes=\"(max-width: 1172px) 100vw, 1172px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Step-5: After that, you&#8217;ll be redirected to the product grid where you&#8217;ll find the Quantity per source coloumn in the product grid. see below screenshot<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1190\" height=\"652\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_250.png\" alt=\"Selection_250\" class=\"wp-image-343043\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_250.png 1190w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_250-300x164.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_250-250x137.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_250-768x421.png 768w\" sizes=\"(max-width: 1190px) 100vw, 1190px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>In this way, you can bulk assign the inventory sources to the selected product .<\/p>\n\n\n\n<p>Now to do the same programmatically go to file path vendor\/magento\/moduel-inventory-catalog\/Model\/ResourceModel\/BulkSourceAssign.php<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">public function execute(array $skus, array $sourceCodes): int\n{\n    $types = $this-&gt;getProductTypesBySkus-&gt;execute($skus);\n    $connection = $this-&gt;resourceConnection-&gt;getConnection();\n    $tableName = $this-&gt;resourceConnection-&gt;getTableName(SourceItem::TABLE_NAME_SOURCE_ITEM);\n    $count = 0;\n    foreach ($types as $sku =&gt; $type) {\n        if ($this-&gt;isSourceItemManagementAllowedForProductType-&gt;execute($type)) {\n            foreach ($sourceCodes as $sourceCode) {\n            try {\n                $connection-&gt;insert($tableName, &#091;\n                SourceItemInterface::SOURCE_CODE =&gt; $sourceCode,\n                SourceItemInterface::SKU =&gt; $sku,\n                SourceItemInterface::QUANTITY =&gt; 0,\n                SourceItemInterface::STATUS =&gt; SourceItemInterface::STATUS_OUT_OF_STOCK,\n                ]);\n                $count++;\n            } catch (DuplicateException $e) {\n                \/\/ Skip if source assignment is duplicated\n                continue;\n            }\n        }\n    }\n    }\n    return $count;\n}<\/pre>\n\n\n\n<p>here you will get the code with the function execute by which you can assign inventory sources for bulk products just use this function on your code where ever you want.<\/p>\n\n\n\n<p>In this function, you have to pass two params<br>1: SKU as an array.<br>2: Source code as an array.<\/p>\n\n\n\n<p><strong>Note<\/strong>: By bulk assign inventory source product quantity will get changed with zero as by default bulk source assign Quantity is 0 from the core file.<\/p>\n\n\n\n<p><br>To update the source quantity you can follow the next blog: <a href=\"https:\/\/webkul.com\/blog\/magento-2-update-assigned-source-inventory-from-admin-end-and-programmatically\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/webkul.com\/blog\/magento-2-update-assigned-source-inventory-from-admin-end-and-programmatically\/<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, You will learn about how to Assign Inventory sources to bulk products and also you&#8217;ll learn how the inventory sources are assigned with the source code. And which files we have to use to assign the inventory sources programmatically. Please follow these steps one by one: Step-1: On the Admin Panel, go <a href=\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":439,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-342979","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Magento 2 Assign Inventory Source for bulk product And Assign Inventory programmatically - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Magento 2 Assign Inventory Source for bulk product And Assign Inventory programmatically - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"In this article, You will learn about how to Assign Inventory sources to bulk products and also you&#8217;ll learn how the inventory sources are assigned with the source code. And which files we have to use to assign the inventory sources programmatically. Please follow these steps one by one: Step-1: On the Admin Panel, go [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-13T06:53:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-13T13:17:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247-1200x609.png\" \/>\n<meta name=\"author\" content=\"Ajay Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ajay Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/\"},\"author\":{\"name\":\"Ajay Singh\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/a34da891d20d341126f02e0f2716b63f\"},\"headline\":\"Magento 2 Assign Inventory Source for bulk product And Assign Inventory programmatically\",\"datePublished\":\"2022-07-13T06:53:49+00:00\",\"dateModified\":\"2022-07-13T13:17:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/\"},\"wordCount\":338,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247-1200x609.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/\",\"url\":\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/\",\"name\":\"Magento 2 Assign Inventory Source for bulk product And Assign Inventory programmatically - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247-1200x609.png\",\"datePublished\":\"2022-07-13T06:53:49+00:00\",\"dateModified\":\"2022-07-13T13:17:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247.png\",\"width\":1264,\"height\":642,\"caption\":\"Selection_247\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Magento 2 Assign Inventory Source for bulk product And Assign Inventory programmatically\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/a34da891d20d341126f02e0f2716b63f\",\"name\":\"Ajay Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/eb0e5d7a768feaf55e3b627fb8a98b0d994cf89381c4ca02db24fefe188aec5d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/eb0e5d7a768feaf55e3b627fb8a98b0d994cf89381c4ca02db24fefe188aec5d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Ajay Singh\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/ajaysingh-tomar648\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Magento 2 Assign Inventory Source for bulk product And Assign Inventory programmatically - Webkul Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/","og_locale":"en_US","og_type":"article","og_title":"Magento 2 Assign Inventory Source for bulk product And Assign Inventory programmatically - Webkul Blog","og_description":"In this article, You will learn about how to Assign Inventory sources to bulk products and also you&#8217;ll learn how the inventory sources are assigned with the source code. And which files we have to use to assign the inventory sources programmatically. Please follow these steps one by one: Step-1: On the Admin Panel, go [...]","og_url":"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2022-07-13T06:53:49+00:00","article_modified_time":"2022-07-13T13:17:42+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247-1200x609.png","type":"","width":"","height":""}],"author":"Ajay Singh","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Ajay Singh","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/"},"author":{"name":"Ajay Singh","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/a34da891d20d341126f02e0f2716b63f"},"headline":"Magento 2 Assign Inventory Source for bulk product And Assign Inventory programmatically","datePublished":"2022-07-13T06:53:49+00:00","dateModified":"2022-07-13T13:17:42+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/"},"wordCount":338,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247-1200x609.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/","url":"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/","name":"Magento 2 Assign Inventory Source for bulk product And Assign Inventory programmatically - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247-1200x609.png","datePublished":"2022-07-13T06:53:49+00:00","dateModified":"2022-07-13T13:17:42+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/07\/Selection_247.png","width":1264,"height":642,"caption":"Selection_247"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/magento-2-assign-inventory-source-for-bulk-product-and-assign-inventory-programmatically\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Magento 2 Assign Inventory Source for bulk product And Assign Inventory programmatically"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/a34da891d20d341126f02e0f2716b63f","name":"Ajay Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/eb0e5d7a768feaf55e3b627fb8a98b0d994cf89381c4ca02db24fefe188aec5d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eb0e5d7a768feaf55e3b627fb8a98b0d994cf89381c4ca02db24fefe188aec5d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Ajay Singh"},"url":"https:\/\/webkul.com\/blog\/author\/ajaysingh-tomar648\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/342979","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/439"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=342979"}],"version-history":[{"count":6,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/342979\/revisions"}],"predecessor-version":[{"id":344063,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/342979\/revisions\/344063"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=342979"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=342979"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=342979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}