Import Inventory Updates to Magento V2
This task will update inventory in Magento. See below for a sample input file.
PUT /V1/products/{sku}/stockItems/1
{sku} You have to provide either the product id or the sku to match the product and successfully update the inventory.
Settings
Connection
Required
The Magento V2 connection to use. See the Connecting to Magento v2 article if you require more information on how to create/manage connections.
Fail File
Required
The XML file to save failed inventory updates to. The data will be written in the same format as the input file.
Input File
Required
The XML file containing the inventory to be updated in Magento.
Success File
Required
The XML file to save successful inventory updates to. The data will be written in the same format as the input file.
Prevent Reprocessing
Required
Set to true to prevent the same record being processed more than once by the task. This setting will only work where an <external_id>
element is provided in the XML.
Store View Code
Required
The magento store view code to perform the API calls against. Default value of 'all'.
Zynk Settings
See Common Task Settings.
Examples
A sample input file is shown below. This will update the stock level of the product with SKU '24-MB01' to 198.
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfStockItem>
<StockItem>
<sku>24-MB01</sku>
<qty>198.00000</qty>
<is_in_stock>true</is_in_stock>
<is_qty_decimal>false</is_qty_decimal>
<show_default_notification_message></show_default_notification_message>
<use_config_min_qty>false</use_config_min_qty>
<min_qty>10</min_qty>
<use_config_min_sale_qty>false</use_config_min_sale_qty>
<min_sale_qty>1</min_sale_qty>
<use_config_max_sale_qty>false</use_config_max_sale_qty>
<max_sale_qty>100</max_sale_qty>
<use_config_backorders>false</use_config_backorders>
<backorders>0</backorders>
<use_config_notify_stock_qty>false</use_config_notify_stock_qty>
<notify_stock_qty>10</notify_stock_qty>
<use_config_qty_increments>false</use_config_qty_increments>
<qty_increments>1</qty_increments>
<use_config_enable_qty_inc>false</use_config_enable_qty_inc>
<enable_qty_increments>false</enable_qty_increments>
<use_config_manage_stock>false</use_config_manage_stock>
<manage_stock>true</manage_stock>
<low_stock_date>2020-01-01T00:00:00</low_stock_date>
<is_decimal_divided>false</is_decimal_divided>
<stock_status_changed_auto>0</stock_status_changed_auto>
</StockItem>
</ArrayOfStockItem>