     lineItemsXML = orderXML.ele("OrderLines", {'count': order.lineItems.length})
     _.each order.lineItems, (lineItem, index, list) =>
       lineItemXML = lineItemsXML.ele("OrderLine", {num: index + 1})
-      @_lineItemToXML(lineItem, lineItemXML)
-
-  _lineItemToXML: (lineItem, lineItemXML) =>
+      @_lineItemToXML(lineItem, lineItemXML, mappings)
+
+  _lineItemToXML: (lineItem, lineItemXML, mappings) =>
     lineItemXML.e('OrderLineId').t(lineItem.id)
     productId = utils.getVariantAttValue(mappings, 'ProductId', lineItem.variant)
     variationId = utils.getVariantAttValue(mappings, 'VariationId', lineItem.variant)

    .then (writeXMLResult) =>
      if writeXMLResult is 'OK'
        @logger.info "[OrderExport] Successfully created XML file: '#{@fileName}'"
        # update order sync info
        utils.batch(_.map(@fetchedOrders, (o) => @_addSyncInfo(o.id, o.version, @_options.channelid, o.id)), 100) if _.size(@fetchedOrders) > 0
    .fail (error) =>
      @logger.error "Error on execute method; #{error}"
      @logger.error "Error stack: #{error.stack}" if error.stack
      @_processResult(callback, false)
    .done (result) =>
      @logger.info "[OrderExport] Updated order SyncInfo count: '#{_.size result}'" if _.size(result) > 0
      @_processResult(callback, true)

  _getFileName: (path) ->
    if _s.endsWith(path, '.xml')

      ],
      (mappingsJson, fetchedOrders, ordersXsd) =>
        mappings = JSON.parse mappingsJson
        utils.assertProductIdMappingIsDefined mappings.product
        utils.assertVariationIdMappingIsDefined mappings.product
        utils.assertSkuMappingIsDefined mappings.product
        @fetchedOrders = fetchedOrders
        if _.size(@fetchedOrders) > 0
          @logger.info "[OrderExport] Orders to export count: '#{_.size @fetchedOrders}'"
