#
# Copyright (c) Open Source Strategies, Inc.
# 
# Opentaps is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Opentaps is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Opentaps.  If not, see <http://www.gnu.org/licenses/>.

#
# Configuration properties for Opentaps Amazon.com integration
#

amazon.title = Opentaps Amazon.com Integration Application

# whether to show the Opentaps tab, what to name the tab, and where it goes
amazon.tab.ofbiz.show = true
amazon.tab.ofbiz.label = opentaps
amazon.tab.ofbiz.target = /opentaps/

# Standard description field contents
opentaps.amazon.createdByAmazonApplication = Created by Opentaps Amazon application

# Amazon web services URL
opentaps.amazon.url = https://merchant-api.amazon.com/gateway/merchant-interface-mime

# Credentials
opentaps.amazon.merchantIdentifier = 
opentaps.amazon.merchantName = 
opentaps.amazon.userName = 
opentaps.amazon.password = 

# Order import configuration
opentaps.amazon.import.productStoreId = AMAZON
opentaps.amazon.import.approveOrders = true
opentaps.amazon.import.decimalPrecision = 2
opentaps.amazon.import.decimalRounding = ROUND_HALF_UP

# Require an Amazon tax jurisdiction -> taxAuthorityGeoId/taxAuthorityPartyId mapping in the AmazonOrderTaxJurisToAuth entity to successfully import orders with tax amounts
opentaps.amazon.import.requireTaxAuthority = true

# Regular expression for parsing telephone numbers
# Note that backslashes (\) must be doubled
opentaps.amazon.import.phone.regexp = ^\\s*(\\d?)\\D*([2-9]{1}[0-9]{1}(?:(?<!1)[1]|[0]|[2-9]){1})\\D*(\\d{3}\\D*\\d{4})\\D*(\\d*)\\s*$

# Capturing group indices for regular expression (begins at 1)
opentaps.amazon.import.phone.regexp.group.countryCode = 1
opentaps.amazon.import.phone.regexp.group.areaCode = 2
opentaps.amazon.import.phone.regexp.group.phoneNumber = 3
opentaps.amazon.import.phone.regexp.group.extension = 4

# Order import shipping configuration
opentaps.amazon.import.carrierPartyId.Standard = UPS
opentaps.amazon.import.carrierPartyId.Expedited = UPS
opentaps.amazon.import.shipmentMethodTypeId.Standard = GROUND
opentaps.amazon.import.shipmentMethodTypeId.Expedited = AIR

# Amazon recognizes three valid carrier codes. This is the carrierCode-to-partyId mapping
opentaps.amazon.shipping.carrierPartyId.fedEx = FEDEX
opentaps.amazon.shipping.carrierPartyId.ups = UPS
opentaps.amazon.shipping.carrierPartyId.usps = USPS

# Days to add to the current date in order to determine a Ship Before Date for the order. Service level numbers
# can be found in Amazon's Seller Central application's Shipping Settings section.
opentaps.amazon.import.maxDaysToShip.Standard = 7
opentaps.amazon.import.maxDaysToShip.Expedited = 3

# Number of times to retry a failed pending order document download before giving up (not implemented yet)
opentaps.amazon.import.document.retry.threshold.download = 3

# Number of times to retry extracting orders from a pending order download before giving up
opentaps.amazon.import.document.retry.threshold.extract = 3

# Number of times to acknowledging a pending order download before giving up (not implemented yet)
opentaps.amazon.import.document.retry.threshold.acknowledge = 3

# Number of times to retry importing an order before giving up
opentaps.amazon.import.order.retry.threshold.import = 3

# Number of times to retry acknowledging an order before giving up (not implemented yet)
opentaps.amazon.import.order.retry.threshold.acknowledge = 3

# Number of times to retry posting new/updated products
opentaps.amazon.export.product.retry.threshold.post = 3

# Age threshold for warning of the last successful product feed processing document download (Amazon feeds can sometimes be held
#   for manual processing and Amazon considers it the merchant's responsibility to notice this and call Amazon to resolve the problem.
#   The age of the last successful processing document download is tracked and an error email is sent if the last success is older than
#   the number of hours defined below
opentaps.amazon.error.email.productFeedProcessingAgeWarning.thresholdHours = 24
opentaps.amazon.error.email.errorEmailScreenUri.productFeedProcessingAgeWarning = component://amazon/widget/products/AmazonProductScreens.xml#productFeedProcessingAgeWarning

# Details for error emails
opentaps.amazon.error.email.sendErrorEmails = true
opentaps.amazon.error.email.errorEmailLocale = en_US
opentaps.amazon.error.email.errorEmailScreenUri.orders = component://amazon/widget/orders/AmazonOrderScreens.xml#errorEmail
opentaps.amazon.error.email.errorEmailScreenUri.orders.orderAckValidate = component://amazon/widget/orders/AmazonOrderScreens.xml#orderAckValidateErrorEmail
opentaps.amazon.error.email.errorEmailScreenUri.orders.orderItemFulfillValidate = component://amazon/widget/orders/AmazonOrderScreens.xml#orderItemFulfillValidateErrorEmail
opentaps.amazon.error.email.errorEmailScreenUri.products = component://amazon/widget/products/AmazonProductScreens.xml#errorEmail
opentaps.amazon.error.email.fromAddress = 
opentaps.amazon.error.email.toAddress = 
opentaps.amazon.error.email.linesForBulkErrorEmails = 1000

# productStoreGroupId for ProductPrice records in the Amazon channel
opentaps.amazon.export.product.price.productStoreGroupId = _NA_

# Remove the 'buy' button from the Amazon product page if no sale price (DEFAULT_PRICE) exists for the productStoreGroupId above
opentaps.amazon.export.product.price.delistProductIfNoSalePrice = false

# Product field which contains the description data to post to Amazon (description or longDescription)
opentaps.amazon.default.product.descriptionField = longDescription

# Use productId or UPC as SKU. If both are false, a GoodIdentification with goodIdentificationTypeId SKU
#   will be required for each product in order to post to Amazon
opentaps.amazon.export.product.useProductIdAsSKU = true
opentaps.amazon.export.product.useUPCAsSKU = false

# Require UPC codes for products posted to Amazon
opentaps.amazon.export.product.requireUpcCodes = true

# Condition for exported products - must be one of:
#   New
#   UsedLikeNew
#   UsedVeryGood
#   UsedGood
#   UsedAcceptable
#   CollectibleLikeNew
#   CollectibleVeryGood
#   CollectibleGood
#   CollectibleAcceptable
#   Refurbished
#   Club
opentaps.amazon.export.product.conditionType = New

# Default Units of Measurement
opentaps.amazon.default.uom.length = IN
opentaps.amazon.default.uom.weight = LB

# URL root for images
opentaps.amazon.image.urlRoot = 

# Default fields for product images in Product entity
opentaps.amazon.default.image.main = LARGE_IMAGE_URL
opentaps.amazon.default.image.search = SMALL_IMAGE_URL
opentaps.amazon.default.image.swatch = 
opentaps.amazon.default.image.pt1 = 
opentaps.amazon.default.image.pt2 = 
opentaps.amazon.default.image.pt3 = 
opentaps.amazon.default.image.pt4 = 
opentaps.amazon.default.image.pt5 = 
opentaps.amazon.default.image.pt6 = 
opentaps.amazon.default.image.pt7 = 
opentaps.amazon.default.image.pt8 = 

# Inventory export
# If postActualInventory is true, the ATP for a product will be posted to Amazon. If false, a simple Available boolean will be posted.
opentaps.amazon.export.inventory.postActualInventory = true

# If postInventoryDaysToShip is true, ProductFacility.daysToShip for a product will be posted to Amazon
opentaps.amazon.export.inventory.postInventoryDaysToShip = true

# If inventoryIsAvailableIfMinimumStock is true, inventory will be posted as Available if ProductFacility.minimumStock > 0
#   even if there is no actual inventory
opentaps.amazon.export.inventory.inventoryIsAvailableIfMinimumStock = true
