       @_loadMappings @_options.mapping
       @_loadProductsXML @_options.products
       ],
-      (mappings, productsXML) =>
+      (mappingsJson, productsXML) =>
+        mappings = JSON.parse mappingsJson
         utils.assertProductIdMappingIsDefined mappings
         utils.assertSkuMappingIsDefined mappings
         @toBeImported = _.size(productsXML.Products?.ProductUpdate)

      stock = variant.tempstock
      pair =
        newObj:
          quantityOnStock: _s.toNumber(stock)
        oldObj: old

      updates.push pair

      stock = variant.tempstock
      inventory =
        sku: sku
        quantityOnStock: parseInt(stock, 10)
      creates.push inventory

    count = _.size(creates)
