{"id":28936,"date":"2019-03-19T00:55:00","date_gmt":"2019-03-18T23:55:00","guid":{"rendered":"https:\/\/blexin.com\/quando-amazon-ti-fa-il-servizio\/"},"modified":"2021-05-20T19:21:27","modified_gmt":"2021-05-20T17:21:27","slug":"when-amazon-helps-you","status":"publish","type":"post","link":"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/","title":{"rendered":"When Amazon helps you"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"608\" data-attachment-id=\"28930\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/attachment\/500543af-50c3-4d08-b765-cb07fe2301d9-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/500543af-50c3-4d08-b765-cb07fe2301d9.png?fit=1024%2C608&amp;ssl=1\" data-orig-size=\"1024,608\" data-comments-opened=\"0\" data-image-title=\"500543af-50c3-4d08-b765-cb07fe2301d9\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/500543af-50c3-4d08-b765-cb07fe2301d9.png?fit=1024%2C608&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/500543af-50c3-4d08-b765-cb07fe2301d9.png?resize=1024%2C608&#038;ssl=1\" alt=\"\" class=\"wp-image-28930\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/500543af-50c3-4d08-b765-cb07fe2301d9.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/500543af-50c3-4d08-b765-cb07fe2301d9-980x582.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/500543af-50c3-4d08-b765-cb07fe2301d9-480x285.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">During a consulting meeting with a client, that commissioned us the development of an e-commerce for technological products, we should face the lack of technical and commercial information about products provided by suppliers: we would have a bare website, with almost naked products data sheets.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One of the best solution we found, to add and complete products information, was the use of&nbsp;<strong>Amazon Product Advertising API<\/strong>&nbsp;(ex Amazon Web Service AWS):they are different services&nbsp;<strong>Amazon<\/strong>&nbsp;makes available to sell your products on other stores too.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You are required to register for free as&nbsp;<a href=\"https:\/\/programma-affiliazione.amazon.it\/\" target=\"_blank\" rel=\"noreferrer noopener\">Amazon Associate<\/a>, then you can subscribe the Amazon Product Advertising API program and obtain credentials to use different services.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the&nbsp;<a href=\"https:\/\/docs.aws.amazon.com\/en_us\/AWSECommerceService\/latest\/DG\/Welcome.html\" target=\"_blank\" rel=\"noreferrer noopener\">documentation<\/a>,you can find those services available:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>ItemSearch<\/strong>: products research on Amazon;<\/li><li><strong>BrowseNodeLookup<\/strong>: it returns the categories\u2019 pecking order, starting from a product\/category;<\/li><li><strong>ItemLookup<\/strong>: it returns the attributes list for the specified object;<\/li><li><strong>SimilarityLookup<\/strong>: it returns objects similar to the specified one.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">As you invoke these services, you can either add more parameters to obtain personalized results. Among the available parameters to add, we can find&nbsp;for example:&nbsp;<strong>Accessories<\/strong>&nbsp;(items bought together);&nbsp;<strong>EditoralReview<\/strong>&nbsp;(product descrption);&nbsp;<strong>Images<\/strong>&nbsp;(a set of images in different sizes);&nbsp;<strong>ItemAttributes<\/strong>&nbsp;(items particular characteristics);&nbsp;<strong>OfferListing<\/strong>&nbsp;(a list of offers of other sellers);&nbsp;<strong>RelatedItems<\/strong>&nbsp;(items related to the selected one);&nbsp;<strong>Reviews<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Among these services, the most useful to satisfy our demands is ItemSearch. It is also the one that allow us to make the less invocations, since it receives as input the&nbsp;<strong>EAN&nbsp;<\/strong>code and returns information we need, as the response below:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;Item&gt;\n\u00a0\u00a0\u00a0\u00a0&lt;ASIN&gt;B00TZL96BY&lt;\/ASIN&gt;\n\u00a0\u00a0\u00a0\u00a0&lt;ParentASIN&gt;B012E5CKMY&lt;\/ParentASIN&gt;\n\u00a0\u00a0\u00a0\u00a0&lt;DetailPageURL&gt;https:\/\/www.amazon.com\/Lacoste-Womens-Sleeve-Stretch-Varsity\/dp\/B00TZL96BY%3Fpsc%3D1%26SubscriptionId%3D&#x5B;AWS Access Key ID]%26tag%3D&#x5B;Associate ID]%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB00TZL96BY&lt;\/DetailPageURL&gt;\n\u00a0\u00a0\u00a0\u00a0&lt;ItemLinks&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;ItemLink&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;Description&gt;Technical Details&lt;\/Description&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;URL&gt;https:\/\/www.amazon.com\/Lacoste-Womens-Sleeve-Stretch-Varsity\/dp\/tech-data\/B00TZL96BY%3FSubscriptionId%3D&#x5B;AWS Access Key ID]%26tag%3D&#x5B;Associate ID]%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3DB00TZL96BY&lt;\/URL&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;\/ItemLink&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;ItemLink&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;Description&gt;Add To Baby Registry&lt;\/Description&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;URL&gt;https:\/\/www.amazon.com\/gp\/registry\/baby\/add-item.html%3Fasin.0%3DB00TZL96BY%26SubscriptionId%3D&#x5B;AWS Access Key ID]%26tag%3D&#x5B;Associate ID]%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3DB00TZL96BY&lt;\/URL&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;\/ItemLink&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;ItemLink&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;Description&gt;Add To Wedding Registry&lt;\/Description&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;URL&gt;https:\/\/www.amazon.com\/gp\/registry\/wedding\/add-item.html%3Fasin.0%3DB00TZL96BY%26SubscriptionId%3D&#x5B;AWS Access Key ID]%26tag%3D&#x5B;Associate ID]%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3DB00TZL96BY&lt;\/URL&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;\/ItemLink&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0...\n\u00a0\u00a0\u00a0\u00a0&lt;\/ItemLinks&gt;\n\u00a0\u00a0\u00a0\u00a0&lt;ItemAttributes&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;Manufacturer&gt;Lacoste Womens Apparel&lt;\/Manufacturer&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;ProductGroup&gt;Apparel&lt;\/ProductGroup&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;Title&gt;Lacoste Women&#039;s Long Sleeve Stretch Pique Slim Fit Polo Shirt, Varsity Blue, 40&lt;\/Title&gt;\n\u00a0\u00a0\u00a0\u00a0&lt;\/ItemAttributes&gt;\n&lt;\/Item&gt;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The limit of the free version is for 25.000 items until now, then it is particularly useful even for big e-commerce.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To use the services, we need to validate our client id and secret we received as we complete the registration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To&nbsp;implement in&nbsp;<strong><em>.NET<\/em><\/strong>&nbsp;environment, we used a Java class we found in some examples provided by Amazon,&nbsp;<strong><a href=\"https:\/\/docs.aws.amazon.com\/AWSECommerceService\/latest\/DG\/AuthJavaSampleSig2.html\" target=\"_blank\" rel=\"noreferrer noopener\">SignedRequestsHelper<\/a><\/strong>, and we write it again in&nbsp;<strong><em>C#<\/em><\/strong>. This class provides us the access and the use of Amazon services.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We decided to proceed in&nbsp;<strong><em>two different steps<\/em><\/strong>, both to deal with usage limit of the service and to best manage mistakes:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>save product information on a Swap DB;<\/li><li>Equalize the product on Amazon with those on the e-commerce.<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">With this method, in the second step we could decide what to import, define products similarity and restore information modified by error, if needed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s implement the import service&nbsp;<strong>AmazonSwapImportManager<\/strong>, where we instance the object&nbsp;<strong>SignedRequestHelper<\/strong>&nbsp;in the constructor and we pass to its the parameter received when we register to the service:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nSignedRequestHelper helper;\n\u00a0\npublic AmazonSwapImportManager() {\n\u00a0\u00a0\u00a0\u00a0try {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0helper = new SignedRequestHelper(ACCESS_KEY_ID, SECRET_KEY, ENDPOINT);\n\u00a0\u00a0\u00a0\u00a0} catch (Exception e) {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/logga l\u2019eccezione;\n\u00a0\u00a0\u00a0\u00a0}\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">to obtain information related to product, we create the method&nbsp;<strong>GetInfoFromAmazonServices<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nprivate String GetInfoFromAmazonServices(String ean) {\n\u00a0\u00a0\u00a0\u00a0try {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ottieni la url del prodotto richiesto tramite il suo EAN\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0String requestUrl = GetProductUrlRequestByEan(ean);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ottieni l&#039;oggetto XML dalla url del prodotto\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0String xmlObject = GetXmlObjectFromUrl(requestUrl).Result;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/trasforma in JSON l&#039;oggetto XML ricevuto precedentemente.\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return GetJsonFromXml(xmlObject);\n\u00a0\u00a0\u00a0\u00a0} catch (Exception e) {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/logga l\u2019eccezione;\n\u00a0\u00a0\u00a0\u00a0}\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">which is based on other utility methods:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nprivate static String GetJsonFromXml(string xmlObject) {\n\u00a0\u00a0\u00a0\u00a0XmlDocument doc = new XmlDocument();\n\u00a0\u00a0\u00a0\u00a0doc.LoadXml(xmlObject);\n\u00a0\u00a0\u00a0\u00a0var node = doc.DocumentElement.GetElementsByTagName(&quot;Item&quot;);\n\u00a0\u00a0\u00a0\u00a0if (node.Item(0) == null) return &quot;none&quot;;\n\u00a0\u00a0\u00a0\u00a0string json = JsonConvert.SerializeXmlNode(node.Item(0));\n\u00a0\u00a0\u00a0\u00a0return json;\n}\n\u00a0\nprivate String GetProductUrlRequestByEan(String ean) {\n\u00a0\u00a0\u00a0\u00a0IDictionary &lt;string, string&gt; requestParams = new Dictionary &lt;string, String&gt; ();\n\u00a0\n\u00a0\u00a0\u00a0\u00a0requestParams.Add(&quot;Service&quot;, &quot;AWSECommerceService&quot;);\n\u00a0\u00a0\u00a0\u00a0requestParams.Add(&quot;Operation&quot;, &quot;ItemSearch&quot;);\n\u00a0\u00a0\u00a0\u00a0requestParams.Add(&quot;AWSAccessKeyId&quot;, ACCESS_KEY);\n\u00a0\u00a0\u00a0\u00a0requestParams.Add(&quot;AssociateTag&quot;, TAG);\n\u00a0\u00a0\u00a0\u00a0requestParams.Add(&quot;Keywords&quot;, EAN);\n\u00a0\u00a0\u00a0\u00a0requestParams.Add(&quot;IdType&quot;, &quot;EAN&quot;);\n\u00a0\u00a0\u00a0\u00a0requestParams.Add(&quot;ResponseGroup&quot;, &quot;Accessories,AlternateVersions,BrowseNodes,EditorialReview,Images,ItemAttributes,ItemIds,OfferFull,OfferListings,Offers,OfferSummary,PromotionSummary,RelatedItems,Reviews,SalesRank,Similarities&quot;);\n\u00a0\u00a0\u00a0\u00a0requestParams.Add(&quot;SearchIndex&quot;, &quot;All&quot;);\n\u00a0\u00a0\u00a0\u00a0requestParams.Add(&quot;RelationshipType&quot;, &quot;AuthorityTitle&quot;);\n\u00a0\n\u00a0\u00a0\u00a0\u00a0return helper.Sign(requestParams);\n}\n\u00a0\nprivate async Task &lt;String&gt; GetXmlObjectFromUrl(String requestUrl) {\n\u00a0\u00a0\u00a0\u00a0return await requestUrl.GetStringAsync();\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The method&nbsp;<strong>GetInfoFromAmazonServices<\/strong>&nbsp;is used inside a method&nbsp;<strong>ImportProductInfo<\/strong>, that cycles on all store products and try to obtain needed information:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nprivate void ImportProductsInfo(IList &lt;Product&gt; products) {\n\u00a0\/* altre operazioni di utilit\u00e0 *\/\n\u00a0\n\u00a0\u00a0\u00a0\u00a0\/\/cicla sui prodotti\n\u00a0\u00a0\u00a0\u00a0foreach(var product in products) {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0String productInfo = GetInfoFromAmazonServices(product.Ean);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/salva su un DB di swap le informazioni trovate sul prodotto\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0StoreItemToAmazonSwapDB(product.Ean, productInfo);\n\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\/* altre operazioni di riepilogo *\/\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">the object saved on Swap DB is a&nbsp;<strong>SwapItem<\/strong>&nbsp;type, defined as:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\npublic class SwapItem\n{\n\u00a0\u00a0\u00a0\u00a0public int Id { get; set; }\n\u00a0\u00a0\u00a0\u00a0public string Ean { get; set; }\n\u00a0\u00a0\u00a0\u00a0public string Content { get; set; }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">as soon as we saved product data on a Swap DB, we can proceed with the accordance with our production DB. Create a class&nbsp;<strong>AmazonSwapSyncer<\/strong>, that contains the&nbsp;<strong>Sync<\/strong>&nbsp;method, defined as:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npublic void Sync()\n{\n\u00a0\u00a0\u00a0\u00a0SynchronizeProductsInfo(GetItemsFromAmazonSwapDB());\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">which, in turn, is based on&nbsp;<strong>SynchronizeProductsInfo<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nprivate void SynchronizeProductsInfo(IList &lt;SwapItem&gt; swapItems) {\n\u00a0\/* altre operazioni di utilit\u00e0 *\/\n\u00a0\n\u00a0\u00a0\u00a0\u00a0foreach(var swapItem in swapItems) {\n\u00a0\u00a0\u00a0\u00a0\/\/ricerca sul nostro DB se ci sono occorrenze del prodotto con l&#039;EAN specificato\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0var currentProduct = dbContext.Products.FirstOrDefault(p =&gt; p.Ean == swapItem.Ean);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if (currentProduct != null) {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0try {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/deserializza la stringa in un oggetto AmazonItem\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0var amazonItem = JsonConvert.DeserializeObject &lt;AmazonItem&gt; (swapItem.Content);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ottiene la descrizione\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0currentProduct.Description = amazonItem.Item.EditorialReviews.EditorialReview.Content;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ottiene le caratteristiche techiche del prodotto\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0currentProduct.Features = String.Join(&quot; * &quot;, amazonItem.Item.ItemAttributes.Feature);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ottiene la url dell&#039;immagine di grandi dimensioni\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0currentProduct.ImageUrl = amazonItem.Item.LargeImage.Url;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* ottieni altre informazioni *\/\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0} catch (Exception e) {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/logga l\u2019eccezione;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\/\/salva le informazioni ottenute\n\u00a0\u00a0\u00a0\u00a0dbContext.SubmitChanges();\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">the class AmazonItem, with all aggregated classes, is then defined as per our requirements:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npublic class AmazonItem\n{\n\u00a0\u00a0\u00a0\u00a0public Item Item { get; set; }\u00a0\u00a0\u00a0\u00a0\u00a0 \n}\n\u00a0\npublic class Item\n{\n\u00a0\u00a0\u00a0\u00a0public String ASIN { get; set; }\n\u00a0\u00a0\u00a0\u00a0public long SalesRank { get; set; }\n\u00a0\u00a0\u00a0\u00a0public ItemAttributes ItemAttributes { get; set; }\n\u00a0\u00a0\u00a0\u00a0public EditorialReviews EditorialReviews { get; set; }\n\u00a0\u00a0\u00a0\u00a0public AmazonImage LargeImage { get; set; }\n}\n\u00a0\npublic class ItemAttributes\n{\n\u00a0\u00a0\u00a0\u00a0public String Binding { get; set; }\n\u00a0\u00a0\u00a0\u00a0public String Color { get; set; }\n\u00a0\u00a0\u00a0\u00a0public String&#x5B;] Feature { get; set; }\n}\n\u00a0\npublic class EditorialReviews\n{\n\u00a0\u00a0\u00a0\u00a0public EditorialReview EditorialReview { get; set; }\n}\n\u00a0\npublic class EditorialReview\n{\n\u00a0\u00a0\u00a0\u00a0public String Content { get; set; }\n}\n\u00a0\npublic class AmazonImage\n{\n\u00a0\u00a0\u00a0\u00a0public String Url { get; set; }\n\u00a0\u00a0\u00a0\u00a0public int Height { get; set; }\n\u00a0\u00a0\u00a0\u00a0public int Width { get; set; }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Thanks to that, as the synchronization process finishes, we get updated products information thanks to subjects available on Amazon.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can find the code of this article on GitHub, at following&nbsp;<a href=\"https:\/\/github.com\/enricobencivenga\/AmazonProductAdvertisingAPI\" target=\"_blank\" rel=\"noreferrer noopener\">link<\/a>.<\/p>\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>Discover together how to integrate products data sheets from our e-commerce with information from Amazon<\/p>\n","protected":false},"author":196716247,"featured_media":28930,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"","_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","inline_featured_image":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[688637524],"tags":[688637422],"class_list":["post-28936","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-en","tag-asp-net-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>When Amazon helps you - Blexin<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"When Amazon helps you - Blexin\" \/>\n<meta property=\"og:description\" content=\"Discover together how to integrate products data sheets from our e-commerce with information from Amazon\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/\" \/>\n<meta property=\"og:site_name\" content=\"Blexin\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-18T23:55:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-20T17:21:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/500543af-50c3-4d08-b765-cb07fe2301d9.png?fit=1024%2C608&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"608\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Enrico Bencivenga\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Enrico Bencivenga\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/when-amazon-helps-you\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/when-amazon-helps-you\\\/\"},\"author\":{\"name\":\"Enrico Bencivenga\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#\\\/schema\\\/person\\\/74e4443d1d7ad12d5b4a8db7f63f0194\"},\"headline\":\"When Amazon helps you\",\"datePublished\":\"2019-03-18T23:55:00+00:00\",\"dateModified\":\"2021-05-20T17:21:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/when-amazon-helps-you\\\/\"},\"wordCount\":614,\"image\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/when-amazon-helps-you\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/500543af-50c3-4d08-b765-cb07fe2301d9.png?fit=1024%2C608&ssl=1\",\"keywords\":[\"Asp.net\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/when-amazon-helps-you\\\/\",\"url\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/when-amazon-helps-you\\\/\",\"name\":\"When Amazon helps you - Blexin\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/when-amazon-helps-you\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/when-amazon-helps-you\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/500543af-50c3-4d08-b765-cb07fe2301d9.png?fit=1024%2C608&ssl=1\",\"datePublished\":\"2019-03-18T23:55:00+00:00\",\"dateModified\":\"2021-05-20T17:21:27+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#\\\/schema\\\/person\\\/74e4443d1d7ad12d5b4a8db7f63f0194\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/when-amazon-helps-you\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/when-amazon-helps-you\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/when-amazon-helps-you\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/500543af-50c3-4d08-b765-cb07fe2301d9.png?fit=1024%2C608&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/500543af-50c3-4d08-b765-cb07fe2301d9.png?fit=1024%2C608&ssl=1\",\"width\":1024,\"height\":608},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/when-amazon-helps-you\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blexin.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"When Amazon helps you\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/blexin.com\\\/en\\\/\",\"name\":\"Blexin\",\"description\":\"Con noi \u00e8 semplice\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blexin.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#\\\/schema\\\/person\\\/74e4443d1d7ad12d5b4a8db7f63f0194\",\"name\":\"Enrico Bencivenga\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4ea7187309674789d6f02c6b757e1f21c8cf800abb2419b4edaa8b09d4c99548?s=96&d=identicon&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4ea7187309674789d6f02c6b757e1f21c8cf800abb2419b4edaa8b09d4c99548?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4ea7187309674789d6f02c6b757e1f21c8cf800abb2419b4edaa8b09d4c99548?s=96&d=identicon&r=g\",\"caption\":\"Enrico Bencivenga\"},\"url\":\"https:\\\/\\\/blexin.com\\\/en\\\/author\\\/enrico-bencivengablexin-com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"When Amazon helps you - Blexin","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/","og_locale":"en_US","og_type":"article","og_title":"When Amazon helps you - Blexin","og_description":"Discover together how to integrate products data sheets from our e-commerce with information from Amazon","og_url":"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/","og_site_name":"Blexin","article_published_time":"2019-03-18T23:55:00+00:00","article_modified_time":"2021-05-20T17:21:27+00:00","og_image":[{"width":1024,"height":608,"url":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/500543af-50c3-4d08-b765-cb07fe2301d9.png?fit=1024%2C608&ssl=1","type":"image\/png"}],"author":"Enrico Bencivenga","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Enrico Bencivenga","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/#article","isPartOf":{"@id":"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/"},"author":{"name":"Enrico Bencivenga","@id":"https:\/\/blexin.com\/en\/#\/schema\/person\/74e4443d1d7ad12d5b4a8db7f63f0194"},"headline":"When Amazon helps you","datePublished":"2019-03-18T23:55:00+00:00","dateModified":"2021-05-20T17:21:27+00:00","mainEntityOfPage":{"@id":"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/"},"wordCount":614,"image":{"@id":"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/500543af-50c3-4d08-b765-cb07fe2301d9.png?fit=1024%2C608&ssl=1","keywords":["Asp.net"],"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/","url":"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/","name":"When Amazon helps you - Blexin","isPartOf":{"@id":"https:\/\/blexin.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/#primaryimage"},"image":{"@id":"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/500543af-50c3-4d08-b765-cb07fe2301d9.png?fit=1024%2C608&ssl=1","datePublished":"2019-03-18T23:55:00+00:00","dateModified":"2021-05-20T17:21:27+00:00","author":{"@id":"https:\/\/blexin.com\/en\/#\/schema\/person\/74e4443d1d7ad12d5b4a8db7f63f0194"},"breadcrumb":{"@id":"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/#primaryimage","url":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/500543af-50c3-4d08-b765-cb07fe2301d9.png?fit=1024%2C608&ssl=1","contentUrl":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/500543af-50c3-4d08-b765-cb07fe2301d9.png?fit=1024%2C608&ssl=1","width":1024,"height":608},{"@type":"BreadcrumbList","@id":"https:\/\/blexin.com\/en\/blog-en\/when-amazon-helps-you\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blexin.com\/en\/"},{"@type":"ListItem","position":2,"name":"When Amazon helps you"}]},{"@type":"WebSite","@id":"https:\/\/blexin.com\/en\/#website","url":"https:\/\/blexin.com\/en\/","name":"Blexin","description":"Con noi \u00e8 semplice","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blexin.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blexin.com\/en\/#\/schema\/person\/74e4443d1d7ad12d5b4a8db7f63f0194","name":"Enrico Bencivenga","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4ea7187309674789d6f02c6b757e1f21c8cf800abb2419b4edaa8b09d4c99548?s=96&d=identicon&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4ea7187309674789d6f02c6b757e1f21c8cf800abb2419b4edaa8b09d4c99548?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4ea7187309674789d6f02c6b757e1f21c8cf800abb2419b4edaa8b09d4c99548?s=96&d=identicon&r=g","caption":"Enrico Bencivenga"},"url":"https:\/\/blexin.com\/en\/author\/enrico-bencivengablexin-com\/"}]}},"jetpack_publicize_connections":[],"jetpack_likes_enabled":false,"jetpack_shortlink":"https:\/\/wp.me\/pcyUBx-7wI","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/500543af-50c3-4d08-b765-cb07fe2301d9.png?fit=1024%2C608&ssl=1","_links":{"self":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts\/28936","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/users\/196716247"}],"replies":[{"embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/comments?post=28936"}],"version-history":[{"count":4,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts\/28936\/revisions"}],"predecessor-version":[{"id":31199,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts\/28936\/revisions\/31199"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/media\/28930"}],"wp:attachment":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/media?parent=28936"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/categories?post=28936"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/tags?post=28936"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}