         else
           deferred.reject 'Problem on creating new product: ' + body
     deferred.promise
+
+  adjustmentsAfterCreation: (product, respondedProduct, deferred) ->
+    @addExternalImages(product, respondedProduct).then (respondedProduct) =>
+      @publishProduct(respondedProduct).then (msg) ->
+        deferred.resolve 'New product created.'
+      .fail (msg) ->
+        deferred.reject msg
+    .fail (msg) ->
+      deferred.reject msg
 
   publishProduct: (product, publish = true) ->
     deferred = Q.defer()

        deferred.reject 'Error on creating new product: ' + error
      else
        if response.statusCode is 201
          @publishProduct(JSON.parse(body)).then (msg) ->
            deferred.resolve 'New product created.'
          .fail (msg) ->
            deferred.reject msg
        else if response.statusCode is 400
          parsed = JSON.parse body
          humanReadable = JSON.stringify parsed, null, '  '

        variantId: variant.id
        image:
          url: image.url
          dimensions: image.dimensions
#          label: image.label
      actions.push action

    actions


module.exports = Import
