I created my own repricer of sorts but the price isn't being updated on Amazon's side.
My code seems to work just fine based off the response from Amazon after submitting it. I'm hoping someone here knows more about why its not actually updating the price.
Here's the XML submitted:
<?xml version="1.0" encoding="utf-8" ?>
<AmazonEnvelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>MERCHANTID</MerchantIdentifier>
</Header>
<MessageType>Price</MessageType>
<Message>
<MessageID>1</MessageID>
<Price>
<SKU>mysku</SKU>
<StandardPrice currency="USD">350.50</StandardPrice>
</Price>
</Message>
</AmazonEnvelope>
Heres the response:
GetFeedSubmissionResultResponse{}(ResponseMetadata: <Element_?/ResponseMetadata_0x7fee61f74248>, GetFeedSubmissionResultResult: <Element_?/GetFeedSubmissionResultResult_0x7fee61f74248>, AmazonEnvelope:
{'xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance', 'xsi:noNamespaceSchemaLocation': 'amzn-envelope.xsd'}, DocumentVersion: '1.02', MerchantIdentifier: 'M_EXAMPLE_1234', Header: '\n\t', MessageType: 'ProcessingReport', MessageID: '1', DocumentTransactionID: '4200000000', StatusCode: 'Complete', MessagesProcessed: '1', MessagesSuccessful: '1', MessagesWithError: '0', MessagesWithWarning: '0', ProcessingSummary: '\n\t\t\t', ProcessingReport: '\n\t\t', Message: '\n\t')
I don't know if showing my code will help in this instance since I get a successful response from Amazon. Here it is regardless:
...
# Provide credentials.
conn = MWSConnection(
aws_access_key_id=AWS_ACCESS_KEY_ID,
aws_secret_access_key=AWS_SECRET_ACCESS_KEY,
Merchant=AMZ_SELLER_ID
)
# Get the service resource
sqs = boto3.resource('sqs')
# Get the queue
queue = sqs.get_queue_by_name(QueueName=SQS_QUEUE_NAME)
for index, message in enumerate(queue.receive_messages(MaxNumberOfMessages=10)):
...
import time
from jinja2 import Environment, PackageLoader
env = Environment(loader=PackageLoader('repricer', 'xml_templates'), trim_blocks=True, lstrip_blocks=True)
template = env.get_template('_POST_PRODUCT_PRICING_DATA_.xml')
class Message(object):
def __init__(self, s, price):
self.SKU = s
self.PRICE = round(price, 2)
self.CURRENCY = USD_CURRENCY
feed_messages = [
Message(sku.sku, new_price),
]
namespace = dict(MerchantId=AMZ_SELLER_ID, FeedMessages=feed_messages)
feed_content = template.render(namespace).encode('utf-8')
print(feed_content)
feed = conn.submit_feed(
FeedType='_POST_PRODUCT_PRICING_DATA_',
PurgeAndReplace=False,
MarketplaceIdList=[MARKETPLACE_ID],
content_type='text/xml',
FeedContent=feed_content
)
feed_info = feed.SubmitFeedResult.FeedSubmissionInfo
print('Submitted product feed: ' + str(feed_info))
while True:
submission_list = conn.get_feed_submission_list(
FeedSubmissionIdList=[feed_info.FeedSubmissionId]
)
info = submission_list.GetFeedSubmissionListResult.FeedSubmissionInfo[0]
submission_id = info.FeedSubmissionId
status = info.FeedProcessingStatus
print('Submission Id: {}. Current status: {}'.format(submission_id, status))
if status in ('_SUBMITTED_', '_IN_PROGRESS_', '_UNCONFIRMED_'):
print('Sleeping and check again....')
time.sleep(60)
elif status == '_DONE_':
feedResult = conn.get_feed_submission_result(FeedSubmissionId=submission_id)
print(feedResult)
break
else:
print("Submission processing error. Quit.")
break
There are a couple of possible reasons, listed roughly in the order of likelihood:
1. Amazon is slower to update values than they say they are. It is possible that although the feed was successful, there is still a period of time before that change reflects on Amazon (even changing values from SellerCentral comes with a messages that it isn't instant).
Wait a few minutes and see if the change eventually shows up.
2. You could have an alternate repricing service still active. If you are currently using another repricer for this SKU, it might be competing with your attempts and reverting the price based on its own ruleset.
It's possible to use the GetFeedSubmissionList call to see if another _POST_PRODUCT_PRICING_DATA_
feed was submitted after yours (though with no way to view the submitted contents).
3. There might be a conflict with the min and max prices on the SKU (whether you set them or not), and the price you tried to set is outside of the allowed range. This is a result of one of Amazon's policies requiring new and updated SKU's to have those set or it uses a default criteria.
In our continued effort to reduce price error risks to sellers and to avoid potentially negative customer experiences, starting on January 14, 2015, you will not be able to use your Seller Central preferences to select a blanket “opt-out” from all potential low- and high-pricing error rules. Instead, you will need to set a minimum and maximum allowed selling price for each product in your inventory if you do not want Amazon’s default potential pricing error rules to apply to that product.
I can't find an announcement page on this so it may have been an email, but it is quoted as such on the forums
Under those circumstances the feed will report back successful (because its references/format are correct), but the price change will silently fail because of the price range limits that are set.
You can verify if this is your issue by viewing the SKU under SellerCentral Manage Inventory page. You may have to turn on the min/max columns to view current values depending on your preferences set for that page.
Unfortunately, there is no way to pull min/max prices on inventory items to know if this will be an issue ahead of time:
Dear Seller,
I am Sharon from Amazon Seller Support and I will be assisting you with your concern today.
From the content of your email, I understand that you are concerned if there's any report where you can download the report for 'Minimum Price' and 'Maximum Price'.
I regret to inform you that as of now the reports which are available will only provide information for 'standard_price' and 'list_price'.
I understand that this is a disappointment for you but please understand that as of not this feature of including 'Minimum Price' and 'Maximum Price' in the inventory reports has not been included and I sincerely apologize for all the inconvenience caused to you in this regard.
via support ticket to Amazon MWS team, Jul 03, 2016
4. It could be possible Amazon does not allow the feed to update a price during an active promotion. You should be able to check if an item is on sale by viewing the SellerCentral Manage Inventory page, where the "price" column would be bordered in green.
Seems unlikely as they require the "StandardPrice" element to be provided with the "Sale" element, but Amazon's own "Automate Pricing" tool lists it as a possible reason for the tool failing.
5. You are applying the price update to the wrong marketplace.
If the id provided to the call under MarketplaceIdList=[MARKETPLACE_ID],
is for a different marketplace than the one you are checking, you won't see the price change.
Amazon does fail the feed submission request if you submit to a marketplace you do not have access to, so this may not be the issue if you only have one marketplace.
6. You are looking for the new price in the wrong spot.
If you are looking under the SellerCentral Manage Inventory page, make sure you are looking at the "Price" column and not the "Lowest Price" column.
If you are looking at the product's detail or offer page (on Amazon's storefront), make sure you are looking at your offer. You may not be the main offer shown on the detail page or the top offer shown on the offer listing page.
And of course, make sure you have the right SKU / ASIN.
7. This is for a different feed, but a user has reported that Amazon just doesn't update information sometimes, requiring the feed to be resent.
There is an alternate feed you can try using to update price information _POST_FLAT_FILE_INVLOADER_DATA_
, but it is a flat file type (tab delimited) so your XML schema would not transfer over. Probably only worth trying if you think the issue is related to the specific feed you're using.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With