         payload:
           version: product.version
           actions: actions
+
       updates.push wrapper
     updates
+
+  _buildAddPriceActions: (variantId, newVariants, productExternalIdMapping, externId, sku) ->
+    actions = []
+    newVariant = newVariants[sku]
+    throw new Error "Import data does not define price for existing product with '#{productExternalIdMapping}' = '#{externId}' and SKU = '#{sku}'" if not newVariant
+    _.each newVariant.prices, (newPrice) ->
+      actions.push utils.buildAddPriceAction(newPrice, variantId)
+
+    actions
 
   _buildInventoryCreates: (skus, newVariants) ->
     creates = []

    @productExternalIdMapping = mappings.productImport.mapping.ProductId.to
    productIds = @_getProductExternalIDs(newProducts, @productExternalIdMapping) if newProducts
    @newVariants = @_transformToVariantsBySku(newProducts)
    @logger.info "[ProductsUpdate] Product updates count: #{_.size productIds}"
    utils.batch(_.map(productIds, (id) => api.queryProductsByExternProductId(@rest, id, @productExternalIdMapping)))
    .then (fetchedProducts) =>
      priceUpdates = @_buildPriceUpdates(fetchedProducts, @newVariants, @productExternalIdMapping) if fetchedProducts
      @logger.info "[ProductsUpdate] Product price updates count: #{_.size priceUpdates}"
      utils.batch(_.map(priceUpdates, (p) => api.updateProduct(@rest, p))) if priceUpdates
    .then (priceUpdatesResult) =>
      @priceUpdatedCount = _.size(priceUpdatesResult)
      skus = _.keys(@newVariants)
      @logger.info "[ProductsUpdate] Inventories to fetch: #{_.size skus}"
      utils.batch(_.map(skus, (sku) => api.queryInventoriesBySku(@rest, sku))) if skus
    .then (fetchedInventories) =>
      @logger.info "[ProductsUpdate] Fetched inventories count: #{_.size fetchedInventories}"
      createInventoryForSkus = []
      updateInventoryItems = []
      _.each fetchedInventories, (i) -> if _.isObject(i) then updateInventoryItems.push(i) else createInventoryForSkus.push(i)
      inventoryCreates = @_buildInventoryCreates(createInventoryForSkus, @newVariants) if _.size(createInventoryForSkus) > 0
      inventoryUpdates = @_buildInventoryUpdates(updateInventoryItems, @newVariants) if _.size(updateInventoryItems) > 0
      promises = []
      promises.push utils.batch(_.map(inventoryUpdates, (inventory) => api.updateInventory(@inventorySync, inventory.newObj, inventory.oldObj))) if inventoryUpdates
      promises.push utils.batch(_.map(inventoryCreates, (inventory) => api.createInventory(@rest, inventory))) if inventoryCreates
      promises
    .spread (updateInventoryResult, createInventoryResult) =>
      @inventoriesCreated = _.size(createInventoryResult)
      # filter out responses where inventory was not updated (i.e.: value did not change)
      @inventoriesUpdated = _.size(_.filter updateInventoryResult, (r) -> r is 200)
      @success = true

  outputSummary: ->

_ = require 'lodash-node'
_s = require 'underscore.string'
{InventorySync} = require 'sphere-node-sync'
SphereClient = require 'sphere-node-client'
{Rest} = require 'sphere-node-connect'
{_u} = require 'sphere-node-utils'
api = require '../../lib/sphere'
