Amazon MWS Marking order as shipped - amazon-mws

I have listed all of my Amazon orders to my site.
Now, i want to have ability to mark order as shipped from my site and the status will be instantly updated on amazon.
I have looked at amazon feed api but not clear about the format of feed xml.
I just want an example feed xml for updating order status.
( actually i want to know which parameters in xml feed should i send to mark order status as shipped.)

If you search for Ship and Confirm Shipment (and get paid) - Order Fulfillment on Seller Central it will bring you to a page that provides the XSD and a sample XML file for this feed.
The XML is provided below per your request:
<?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>My Store</MerchantIdentifier>
</Header>
<MessageType>OrderFulfillment</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderFulfillment>
<MerchantOrderID>1234567</MerchantOrderID>
<MerchantFulfillmentID>1234567</MerchantFulfillmentID>
<FulfillmentDate>2002-05-01T15:36:33-08:00</FulfillmentDate>
<FulfillmentData>
<CarrierCode>UPS</CarrierCode>
<ShippingMethod>Second Day</ShippingMethod>
<ShipperTrackingNumber>1234567890</ShipperTrackingNumber>
</FulfillmentData>
<Item>
<MerchantOrderItemID>1234567</MerchantOrderItemID>
<MerchantFulfillmentItemID>1234567</MerchantFulfillmentItemID>
<Quantity>2</Quantity>
</Item>
</OrderFulfillment>
</Message>
</AmazonEnvelope>
From the documentation:
Once you've shipped the order, send Amazon a shipping confirmation with fulfillment information

The MWS documentation is spead over a number of PDF documents. The XML feed formats are described in depth in Selling on Amazon: Guide to XML.

Related

Encapsulate backend specifics with custom Camel component that wraps existing component

We have different backends (mostly SOAP so I will focus on this) each with its own specifics (security, default timeout, error handling etc).
On the other hand we have a lot of integration services that orchestrate calls to these backends. For example "service A" first calls "backend 1" and then "backend 2" with SOAP requests. Finally it uses the responses of both backends to create a response.
There are a lot of services like "service A", each of them has an individual orchestration. Each of them is an individual project with its own repository and is deployed as a small Spring-Boot unit.
Let's say that 4 out of 10 services call "backend 1". They do not necessarily call the same service of "backend 1", but they all need to implement the specifics of this same backend. For example send special headers, a specific security token, use a retry strategy for this backend etc.
To avoid that every integration service repeats the specifics for "backend 1" or "backend 2", I would like to somehow encapsulate these specifics.
Because we use Apache Camel, I assume that I could do this with a custom Camel component. But because components typically integrate a new type of backend, I don't know if I should do this or if it is a bad idea. My backend types (for example SOAP) already exist as components, I would just wrap them with specifics.
For example to "encapsulate" a SOAP backend I could create a custom component that delegates to the CXF component to create concrete service endpoints with the common specifics of this backend (headers, security, etc).
In the Camel route the endpoints would perhaps look somehow like this
MyBackend://serviceUri?option1=value1
and under the hood it would create
cxf://serviceUri?backendSpecific1=valueA&backendSpecific2=valueB&option1=value1
Or are there other, better suited extension points to use for this use case?
There is a way to achieve this to some level. Its called endpoint reuse. Let me take you on how I typically tackle a problem like this.
I normally declare all my SOAP and JMS enpoints in my camel-context.xml. I then create xml files for each route and reference the endpoints defined in my camel-context.xml from there.
Here is a short example of my camel-context.xml note the routeContextRef element:
<bp:blueprint
xmlns="http://camel.apache.org/schema/blueprint"
xmlns:bp="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.2.0 http://aries.apache.org/schemas/blueprint-ext/blueprint-ext-1.2.xsd">
<camelContext id="foo-bar" trace="{{camel.context.trace}}" autoStartup="true" useMDCLogging="true" useBreadcrumb="true" depends-on="jms" threadNamePattern="#camelId#-thread-#counter#" managementNamePattern="#camelId#-#version#" allowUseOriginalMessage="false" streamCache="false">
<routeContextRef ref="foo-bar-routes"/>
<endpoint id="jms-gateway-v1" uri="jms:queue:Foo.Bar.System.Evt.1.0.T" />
<endpoint id="rs-gateway-v1" uri="cxfrs://bean://rs-gateway-impl-v1" />
</camelContext>
I then create a foo-bar-routes.xml and I reference the endpoint from there like so:
<bp:blueprint xmlns="http://camel.apache.org/schema/blueprint"
xmlns:bp="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ers="http://www.fooxml.com/events/resourceitem/service/v1"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<routeContext id="foo-bar-routes">
<!--
This route receives an event from the JMS queue
-->
<route id="jms-gateway-route-v1">
<from ref="jms-gateway-v1" />
<to ref="rs-gateway-v1" />
</route>
</bp:blueprint>
So in short I wrap my SOAP and JMS components in endpoint definitions and then reuse these in routes that are defined in the own xml document. I could add a second route in another XML file and reuse the endpoint in that route just add, rinse and repeat.
I know the JavaDSL has similar functionality so it is achievable as well using the JavaDSL as well.

How to delete product from inventory on Amazon via mws api

I'm using the client libraries for Amazon MWS to retrieve competitive price info, etc. But I'd like to be able to delete products, or remove them from my inventory via the api. I am unable to find in the docs or via google how to do this.
In find no mention here http://docs.developer.amazonservices.com/en_US/dev_guide/index.html
of how to remove product listings.
I do find this SO post Amazon api not deleting my products from inventory but it seems dated and I find no corresponding section in the docs for
<OperationType>Delete</OperationType>
Any clues appreciated. Thx, Mike.
You need to use the feed API and submit a delete request. This is what the body would look like for two skus.
<?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>YOUR-MERCHANT-IDENTIFIER-GOES-HERE</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<Message>
<MessageID>1</MessageID>
<OperationType>Delete</OperationType>
<Product>
<SKU>YOUR-FIRST-SKU-GOES-HERE</SKU>
</Product>
</Message>
<Message>
<MessageID>2</MessageID>
<OperationType>Delete</OperationType>
<Product>
<SKU>YOUR-SECOND-SKU-GOES-HERE</SKU>
</Product>
</Message>
</AmazonEnvelope>

Docusign settings through master resource file not working

I am trying to disable declining, finishing later, downloading and printing for the user when they are signing a document. I'm trying to do it through the master resource file, as I didn't see those options in the settings interface.
The settings do not take effect after uploading the file, however. The following is the master resource file download after setting those items to false.
<root>
<language twoletterisoname="en">
<data name="DocuSign_DeclineAllow">false</data>
<data name="DocuSign_FinishLaterAllow">false</data>
<data name="DocuSign_SigningAllowDownload">false</data>
<data name="DocuSign_SigningAllowPrint">false</data>
</language>
</root>
Is there something wrong in how they are set? I also tried removing the "en" (and leaving just "") but no difference. We are using standard signing, not captive. We we only have one brand. We are generating a new envelope every submission. Logging out and back in does not resolve the issue either.
Not sure if this makes a difference, but the envelope is being submitted from Salesforce.
When uploading the xml file for signing, you should not upload everyhting from master. Just upload which is the delta change, try uploading xml with only below changes
<root>
<language twoletterisoname="">
<data name="DocuSign_DeclineAllow">false</data>
<data name="DocuSign_FinishLaterAllow">false</data>
<data name="DocuSign_SigningAllowDownload">false</data>
<data name="DocuSign_SigningAllowPrint">false</data>
</language>
</root>
Save above in an xml and then upload this delta and then try it. Hope this will fix it. I tried and it works for me.
I found out what the problem was. We only had one brand, but it wasn't being selected by default. The brand ID had to be explicitly set when generating the envelope through the API. Once that was done the settings started working.

Amazon MWS inventory XML feed doesn't update quantity

I'm trying to upload my inventory to Amazon via XML feed, but my quantity in seller central doesn't update.
My XML feed is below. Can anyone help find my mistake?
<?xml version="1.0" ?><AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>A3QPCC6I4V1QU3</MerchantIdentifier>
</Header>
<MessageType>Inventory</MessageType>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Inventory>
<SKU>BHAL10105</SKU>
<Quantity>1</Quantity>
<Available>true</Available>
<FulfillmentLatency>7</FulfillmentLatency>
</Inventory>
</Message>
</AmazonEnvelope>
When you submit your feed, you will receive a FeedSubmissionId identifying it. Then it will be processed in the background.
When the processing has completed, you can use the GetFeedSubmissionResult operation to retrieve the result to see if it was successful, or why it was unsuccessful.
You can also check the most recent feeds by logging in to Amazon Seller Central and opening this page.
You can also use the Amazon MWS Scratchpad to submit the operation to check the result.
thanks for your advices,i solved !!.
i must upload to amazon a txt file whith the inventory calculated by software.
then i have created an inventory txt file and with api mws i upload it to amazon with this feetype _POST_FLAT_FILE_INVLOADER_DATA_

Exchange 2010 Impersonation trouble when requesting a User's Calendar Availability Details

I'm working on project where an external application is trying to get the availability info (Free/busy) along with the details (Location/Subject/etc) for group of users in Exchange 2010.
I've read enough that I think that the best way to do this is through a service account run by the application that impersonates the user in question and pulls back their calendar information.
I've set up impersonation for the service account and run the basic test that I found on technet: http://msdn.microsoft.com/en-us/library/bb204088(v=exchg.140).aspx
This works for pulling back the mailbox folder (as the example) and if try to pull back the calendar folder.
I also found how to get availability via technet:
http://msdn.microsoft.com/en-us/library/aa563800(v=exchg.140).aspx
which will also work if I login as the user that I'm trying to find the calendar info for.
The problem comes when I try to combine both the impersonation XML with the get availability. Here is what I have for the two combine:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:PrincipalName>[usersname#myorg.org]</t:PrincipalName>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
<soap:Body>
<GetUserAvailabilityRequest xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<t:TimeZone xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<Bias>300</Bias>
<StandardTime>
<Bias>0</Bias>
<Time>02:00:00</Time>
<DayOrder>1</DayOrder>
<Month>11</Month>
<DayOfWeek>Sunday</DayOfWeek>
</StandardTime>
<DaylightTime>
<Bias>-60</Bias>
<Time>02:00:00</Time>
<DayOrder>2</DayOrder>
<Month>3</Month>
<DayOfWeek>Sunday</DayOfWeek>
</DaylightTime>
</t:TimeZone>
<MailboxDataArray>
<t:MailboxData>
<t:Email>
<t:Address>[usersname#myorg.org]</t:Address>
</t:Email>
<t:AttendeeType>Required</t:AttendeeType>
<t:ExcludeConflicts>false</t:ExcludeConflicts>
</t:MailboxData>
</MailboxDataArray>
<t:FreeBusyViewOptions>
<t:TimeWindow>
<t:StartTime>2011-07-28T00:00:00</t:StartTime>
<t:EndTime>2011-07-28T23:59:59</t:EndTime>
</t:TimeWindow>
<t:MergedFreeBusyIntervalInMinutes>5</t:MergedFreeBusyIntervalInMinutes>
<t:RequestedView>DetailedMerged</t:RequestedView>
</t:FreeBusyViewOptions>
</GetUserAvailabilityRequest>
</soap:Body>
</soap:Envelope>
What I get back is this:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorProxyRequestNotAllowed</faultcode>
<faultstring xml:lang="en-US">Client context header found but no request type found in SOAP header.</faultstring>
<detail>
<m:ErrorCode xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">5015</m:ErrorCode>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
Digging around a little more in technet, the ErrorProxyRequestNotAllowed info:
"This error indicates that the request that Exchange Web Services sent to another Client Access server when trying to fulfill a GetUserAvailability request was invalid. This response code typically indicates that a configuration or rights error has occurred, or that someone tried unsuccessfully to mimic an availability proxy request."
What I'm having trouble with, is how impersonation seems to be working in the cases where I'm pulling back the user's mail and calendar folders, but not working for the case where I want to check their availability.
Right now, I'm just sending the straight XML via curl (wrapped in a little python script).
Anyone have any pointers? Thanks in advance!
I finally found a few (old) references that this is known feature/bug with GetUser[blank]Request style calls and Impersonation.
The two just do not work together. I hope this save someone a little time.

Resources