Amazon MWS: getting error 99019 for XML productFeeds (SubmitFeed of type _POST_PRODUCT_DATA_) - amazon-mws

When I try to add a product (via a SubmitFeed of type "_POST_PRODUCT_DATA_") to the Amazon Market via the Amazon MWS API I get the following error:
[Marketplace : Amazon.de] A valid value is required in either the
"quantity" or "fulfillment_center_id" field.
But there is no "quantity" or "fulfillment_center_id" field in my Product.xsd nor in the official documentation. Also the exact same feed does work without an error on my Amazon MWS sandbox account. What am I missing?
Complete XML:
<?xml version="1.0" encoding="UTF-8"?>
<AmazonEnvelope>
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>XXX</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Product>
<SKU>123456</SKU>
<StandardProductID>
<Type>EAN</Type>
<Value>767715012826</Value>
</StandardProductID>
<ProductTaxCode>A_GEN_TAX</ProductTaxCode>
<Condition>
<ConditionType>New</ConditionType>
<ConditionNote>Zustand/condition: neu OVP</ConditionNote>
</Condition>
<DescriptionData>
<Title>Bellydance for Fitness and Fun</Title>
<Manufacturer>New World 2011</Manufacturer>
</DescriptionData>
<ProductData>
<Music>
<ProductType>
<MusicPopular>
<MediaType>audioCD</MediaType>
<NumberOfDiscs>1</NumberOfDiscs>
<Genre>New Age</Genre>
</MusicPopular>
</ProductType>
</Music>
</ProductData>
</Product>
</Message>
</AmazonEnvelope>

Make sure that you use the correct "Merchant Token" (NOT merchant id) in the tag "MerchantIdentifier" inside your feed (this isn't well documented).
<MerchantIdentifier>YOUR_MERCHANT_TOKEN</MerchantIdentifier>
You should see your Merchant Token by navigating to Sellercentral > Settings > Account Info and clicking on Your Merchant Token inside the box Business Information. If the Merchant Token isn't there (which was a common error in the past), contact the Seller Support and ask for the correct Merchant Token: Please send me my Merchant Token (NOT merchant id) for use with 3rd party software.
Try to omit additional tags describing the product, especially the whole <ProductData> section inside the <Product> element. Whenever i specified the <ProductData> section I got error 99019.

The field names in MWS error messages do not match the XML structure. I'm assuming they match the flat file (CSV) columns, but haven't actually checked.
You stated "I try to add a product", while I'm guessing that above error happened when subitting an inventory feed, which is why you won't find the anything of that sort in Product.xsd.
The corresponding XML elements are Quantity and FulfillmentCenterID, both defined in Inventory.xsd.

Related

Implementing Sage Intacct API via Postman

I would like to get the invoice link from the purchase order implementing Sage Intacct API via Postman.
I suppose it can be done by following sequences(or by only one api request? not sure about this).
Order a purchase
Create a purchase receipt
Get an invoice link from it
Please refer to this API document (https://developer.intacct.com/api).
i.e. This is the body of a request to create a purchase transaction.
<?xml version="1.0" encoding="UTF-8"?>
<request>
<control>
<senderid>{{sender_id}}</senderid>
<password>{{sender_password}}</password>
<controlid>{{$timestamp}}</controlid>
<uniqueid>false</uniqueid>
<dtdversion>3.0</dtdversion>
<includewhitespace>false</includewhitespace>
</control>
<operation>
<authentication>
<sessionid>{{temp_session_id}}</sessionid>
</authentication>
<content>
<function controlid="{{$guid}}">
<create_potransaction>
<transactiontype>Purchase Requisition</transactiontype>
<datecreated>
<year>2013</year>
<month>6</month>
<day>19</day>
</datecreated>
<vendorid>1001</vendorid>
<referenceno>1234</referenceno>
<vendordocno>vendordocno001</vendordocno>
<datedue>
<year>2013</year>
<month>6</month>
<day>20</day>
</datedue>
<payto>
<contactname>Jameson Company</contactname>
</payto>
<exchratetype>Intacct Daily Rate</exchratetype>
<customfields/>
<potransitems>
<potransitem>
<itemid>75300GL</itemid>
<quantity>100</quantity>
<unit>Each</unit>
<price>1</price>
<locationid>MGMT-US</locationid>
<departmentid>IT</departmentid>
</potransitem>
</potransitems>
</create_potransaction>
</function>
</content>
</operation>
</request>
Thank you in advance.
You can download the Postman collection file (API) from the developer docs.
And then just refer to Purchasing/Purchasing Transactions/Create Transaction (Legacy).
You can change the body (SOAP) content.
I'm sure you can manage it.

Signing SAML2 AuthnRequest with ECDSA-SHA256 in LightSAML SP Bundle

In IdP definition that the bundle uses, among other things, to generate AuthnRequest:
HOW/WHERE do I specify that I want the AuthnRequest signed e.g. with ECDSA-SHA256?
Do I have to override a factory service to achieve that?
<?xml version="1.0"?>
<md:EntityDescriptor
xmlns:mdalg="urn:oasis:names:tc:SAML:metadata:algsupport"
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
entityID="some-entity">
<md:IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol" WantAuthnRequestsSigned="true">
<md:KeyDescriptor use="signing">
<mdalg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"/>
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"/>
<ds:X509Data>
I tried adding mdalg:SigningMethod and ds:SignatureMethod, as above, but I don't really know what I'm doing, as the config schema is not really well-defined in the documentation.
It seems like your placement of mdalg:SigningMethod is wrong. It is an extension to the original SAML2 standard and as such needs to live in an block. Take this as hearsay from me as I don't actually use that myself.
Here is the mailing list post regarding simpleSAMLphp software, and credit for the content goes to Peter Schober:
https://groups.google.com/forum/#!msg/simplesamlphp/HSdZXaYUuRI/bdz7mQJLBgAJ
An example of the placement in the XML is in there.

IBM Watson Dialog API: detailed <entityRules> documentation

The IBM Watson Dialog API documentation on the following page refers to an entityRules node for expert dialog designers to extract the system-programmed entities but does not say anything else about the node:
http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/dialog/reference_nodes.shtml#reference_entityRules
Is there more detailed documentation on how this node can be used?
You can use entities to create your own data type. So in the doc, we see the example
<entities>
<entity name="currency" entityExample="dollar" entityType="GENERIC">
<value name="USD" value="USD">
<grammar>
<item>dollar </item>
<item>buck</item>
</grammar>
</value>
<value name="EUR" value="EUR">
<grammar>
<item>euro</item>
<item>eur</item>
<item>european buck</item>
</grammar>
</value>
<entityRules></entityRules>
</entity>
</entities>
This "currency" entity has a couple of value types (USD and EUR) but it could be extended to have more rows with more examples of each value. We could also add more values (say YEN, AUD etc or Japanese Yen, Australia Dollar etc).
The next thing would be to utilize the entity in a variation. So you could add a variation in an Input node, example:
I want to convert (currency) to (currency) tomorrow!
You can use any entities in a variation by simply including brackets around it.
You can also assign entity info into a profile variable so you can later access it and utilize it in your Dialog logic. Example variation:
I want to convert (currency)={CURRENCY1} to (currency)={CURRENCY2} tomorrow!
In this example, CURRENCY1 and CURRENCY2 are profile variables, that at run time, contain the entity match info.
Hope this helps.

Unable to submit order fulfilment feed amazon mws

I am trying to update shipping information through the feed API and here is my xml feed
<?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>Merchant id</MerchantIdentifier>
</Header>
<MessageType>OrderFulfillment</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderFulfillment>
<MerchantOrderID>AmazonOrderId</MerchantOrderID>
<FulfillmentDate>2015-05-23T04:57:09+00:00</FulfillmentDate>
<FulfillmentData>
<CarrierCode>Fedex</CarrierCode>
<ShipperTrackingNumber>78066505</ShipperTrackingNumber>
</FulfillmentData>
<Item>
<MerchantOrderItemID>OrderItemId</MerchantOrderItemID>
</Item>
</OrderFulfillment>
</Message>
</AmazonEnvelope>
When I submit the feed getting response as We are unable to process the XML feed because one or more items are invalid. Please re-submit the feed. But both the order id and order item id is valid one.
In the sample feed provided by amazon I can see <MerchantFulfillmentID>1234567</MerchantFulfillmentID> and <MerchantFulfillmentItemID>1234567</MerchantFulfillmentItemID> but where can I find these ids.
As stated here Selling on Amazon Guide to XML:
You can send your own unique order and item identifiers
(MerchantOrderID and MerchantOrderItemID) rather than Amazon's order
and item identifiers, if you established your own in the
OrderAcknowledgement feed.
MerchantOrderID:
Optional seller supplied order ID. The first step is to establish the
MerchantOrderID in the acknowledgem ent feed. Amazon will map the
MerchantOrderID to the AmazonOrderID, and you can then use your own
order ID (MerchantOrderID) for subsequent feeds relating to that
order. See the base XSD for the definition.
MerchantFulfillmentID:
Seller supplied unique identifier for the shipment (not used by Amazon)
If you did not established your own ID´s in the OrderAcknowledgement feed, you can not use this fields in the Order Fulfillment feed.
Instead you have to speficy AmazonOrderID and Item.AmazonOrderItemCode. The AmazonOrderItemCode is an code for this specific product in this specific order. It has nothing todo with the famous ASIN or something.
Working example for an _POST_ORDER_FULFILLMENT_DATA_ feed would like like:
<AmazonEnvelope>
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>M_TESTSHOP_1337</MerchantIdentifier>
</Header>
<MessageType>OrderFulfillment</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderFulfillment>
<AmazonOrderID>110-64133780-1337563</AmazonOrderID>
<FulfillmentDate>2015-11-02T13:02:14</FulfillmentDate>
<FulfillmentData>
<CarrierName>DHL</CarrierName>
<ShippingMethod>Paket</ShippingMethod>
<ShipperTrackingNumber>1337</ShipperTrackingNumber>
</FulfillmentData>
<Item>
<AmazonOrderItemCode>033521337643</AmazonOrderItemCode>
<Quantity>1</Quantity>
</Item>
</OrderFulfillment>
</Message>
</AmazonEnvelope>

Spring Security 3.1 ActiveDirectoryLdapAuthenticationProvider returning partial result exception

I am trying to authenticate users to an Active Directory Instance using spring security, I am getting an Partial Results Exception. I am going around in circles trying to figure this out. Below is my config.
security-app-context
<authentication-manager erase-credentials="true">
<authentication-provider>
<user-service>
<user name="admin#damien.com" authorities="ROLE_ADMINISTRATOR" password="123admin123" />
</user-service>
</authentication-provider>
<authentication-provider ref="ldapActiveDirectoryAuthProvider"/>
</authentication-manager>
<bean id="ldapActiveDirectoryAuthProvider"
class="org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider">
<constructor-arg value="myDomain.com" />
<constructor-arg value="ldap://ldapurl:389/" />
<property name="convertSubErrorCodesToExceptions" value="true"/>
</bean>
Error I am getting
org.springframework.dao.IncorrectResultSizeDataAccessException: Incorrect result size: expected 1, actual 0 org.springframework.security.ldap.SpringSecurityLdapTemplate.searchForSingleEntryInternal(SpringSecurityLdapTemplate.java:239)
I am struggling to find examples and the documentation indicates I am working in the right direction.
This is from the logs
SpringSecurityLdapTemplate.java 213 - Searching for entry under DN '', base = 'dc=myDomain,dc=com', filter = '(&(objectClass=user)(userPrincipalName={0}))'
and this is what I would expect that to look like on a successful attempt from some scripts that work
Searching for entry under DN 'OU=Users and Groups,DC=one,DC=two,DC=myDomain,DC=com', base = 'OU=Users and Groups,DC=one,DC=two,DC=myDomain,DC=com', filter = '(&(objectClass=user)(userPrincipalName={0}))'
Do I need to get the DN populated? How? I have looked through the ActiveDirectoryLdapAuthenticationProvider properties and don't see a way? Also the base is off but myDomain.com is the correct domain for users e.g john.doe#myDomain.com. Has anyone come across a similar problem?
To solve this I used the default LDAP provider which enables user search base to be specified, specifying the user search base and user search filter.
<ldap-authentication-provider
user-search-base="OU=Users and Groups,DC=abc,DC=myDomain,DC=com"
user-search-filter="userPrincipalName={0}" />
A user would then be logging in with john.doe#myDomain.com but the usersearch base is more specific(abc.myDomain.com). I believe AD Spring was falling down due to this.

Resources