Preparing files for MWS
The Feeds API works with files. To submit data into MWS using the Feeds API, you need to do the following:
Step 1. Create a flow which extracts data from a third party API or database and creates files that can be uploaded into MWS.
Step 2. Create a flow which submits the files prepared in step 1 to MWS.
Step 3. Combine the flows created in steps 1 and 2 into a single nested flow.
Configuring data formats for the Feeds API
The Feeds API accepts data in two formats: XML and Tab-delimited flat files. Each feed type requires its own template. For simplicity, we will be describing only flat files in this documentation. Read more about the available flat file templates.
Below is an example of a typical flat file for office supplies (to see a more readable version, copy and paste it into your favorite text editor):
TemplateType=office Version=2017.0511 The top 3 rows are for Amazon.com use only. Do not modify or delete the top 3 rows. Offer-These attributes are required to make your item buyable for customers on the site Dimensions-These attributes specify the size and weight of a product Discovery-These attributes have an effect on how customers can find your product on the site using browse or search Images-These attributes provide links to images for a product Fulfillment-Use these columns to provide fulfillment-related information for either Amazon-fulfilled (FBA) or seller-fulfilled orders. Variation-Populate these attributes if your product is available in different variations (for example color or wattage) Compliance-Attributes used to comply with consumer laws in the country or region where the item is sold Ungrouped - These attributes create rich product listings for your buyers.
Seller SKU Product ID Product ID Type Product Type Product Name Brand Name Manufacturer Manufacturer Part Number Product Description Category (item-type) Update Delete Product Tax Code Launch Date Is Gift Wrap Available Offering Can Be Gift Messaged Package Quantity Manufacturer's Suggested Retail Price Standard Price Sale Price Sale Start Date Sale End Date Quantity Production Time Release Date Restock Date Max Aggregate Ship Quantity Is Discontinued by Manufacturer Registered Parameter Max Order Quantity Shipping-Template Item Weight Item Weight Unit Of Measure Item Height Item Length Item Width Item Dimensions Unit Of Measure Shipping Weight Website Shipping Weight Unit Of Measure Key Product Features1 Key Product Features2 Key Product Features3 Key Product Features4 Key Product Features5 Intended Use Target Audience Subject Matter Catalog Number Search Terms Main Image URL Other Image URL1 Other Image URL2 Other Image URL3 Fulfillment Center ID Package Length Package Width Package Height Package Length Unit Of Measure Package Weight Package Weight Unit Of Measure Parentage Parent SKU Relationship Type Variation Theme Cpsia Warning CPSIA Warning Description Prop 65 Other Attributes Power Source Additional Features1 Additional Features2 Additional Features3 Additional Features4 Additional Features5 Additional Features6 Additional Features7 Additional Features8 Additional Features9 Additional Features10 Additional Features11 Additional Features12 Additional Features13 Additional Features14 Battery Type Telephone Frequency Colour Colour Map Number of Batteries Required Display Type Display Technology Size maximum-expandable-size Maximum Size Unit Of Measure Line Size Line Size Unit Of Measure paper-size Size Map Paper Size Unit of Measure Printer Connectivity Type Printer Type Printer Output Type Color Pages per Minute B&W Pages per Minute Ink Colour1 Ink Colour2 Ink Colour3 Ink Colour4 Ink Colour5 Ink Colour6 Ink Colour7 Ink Colour8 Ink Colour9 Ink Colour10 Ink Colour11 Ink Colour12 Ink Colour13 Ink Colour14 Ink Colour15 Ink Colour16 Ink Colour17 Ink Colour18 Ink Colour19 Ink Colour20 Material Type DrawerType Furniture Finish Number of Hooks Computer Platform1 Computer Platform2 Computer Platform3 Computer Platform4 Computer Platform5 Computer Platform6 Computer Platform7 Paper Finish Brightness
item_sku external_product_id external_product_id_type feed_product_type item_name brand_name manufacturer part_number product_description item_type update_delete product_tax_code product_site_launch_date offering_can_be_giftwrapped offering_can_be_gift_messaged item_package_quantity list_price standard_price sale_price sale_from_date sale_end_date quantity fulfillment_latency merchant_release_date restock_date max_aggregate_ship_quantity is_discontinued_by_manufacturer missing_keyset_reason max_order_quantity merchant_shipping_group_name item_weight item_weight_unit_of_measure item_height item_length item_width item_dimensions_unit_of_measure website_shipping_weight website_shipping_weight_unit_of_measure bullet_point1 bullet_point2 bullet_point3 bullet_point4 bullet_point5 specific_uses_keywords target_audience_keywords thesaurus_subject_keywords catalog_number generic_keywords main_image_url other_image_url1 other_image_url2 other_image_url3 fulfillment_center_id package_length package_width package_height package_length_unit_of_measure package_weight package_weight_unit_of_measure parent_child parent_sku relationship_type variation_theme cpsia_cautionary_statement cpsia_cautionary_description prop_65 thesaurus_attribute_keywords power_source_type special_features1 special_features2 special_features3 special_features4 special_features5 special_features6 special_features7 special_features8 special_features9 special_features10 special_features11 special_features12 special_features13 special_features14 battery_type radio_bands_supported color_name color_map number_of_batteries display_type display_technology size_name maximum_size maximum_size_unit_of_measure line_size line_size_unit_of_measure paper_size size_map paper_size_unit_of_measure connectivity_technology printer_technology printer_output max_printspeed_color max_printspeed_black_white ink_color1 ink_color2 ink_color3 ink_color4 ink_color5 ink_color6 ink_color7 ink_color8 ink_color9 ink_color10 ink_color11 ink_color12 ink_color13 ink_color14 ink_color15 ink_color16 ink_color17 ink_color18 ink_color19 ink_color20 material_type drawer_type furniture_finish number_of_hooks operating_system1 operating_system2 operating_system3 operating_system4 operating_system5 operating_system6 operating_system7 paper_finish brightness
03AMZNTRUF01 079346140763 UPC OfficeProducts Amazon Face Care Cleansing Pillows Amazon Skincare Amazon.com AMZN-234890 A whole new way to reveal softer, smoother, healthier-looking skin. software Update A_GEN_NOTAX 10 works with Amazon MWS https://etlworks.com/assets/img/cloud_data_integration_etlworks.png
As you can see, the first 2 lines are part of the template and cannot be changed. The third line contains the column headers, and the rest is data. Let's configure the format for a Tab-delimited file with a header so that it can be understood by the Amazon MWS Feeds API.
Step 1. Go to Connections->Formats and click the +
button. Type csv
into the Search field.
Step 2. Select the CSV format and configure the parameters.
1) Select Tab
as the Delimiter.
2) Enter "
as the Quote.
3) Enter 3
as the Start Row
.
4) Select Header
as Transformation type.
5) Copy and paste the text below into Filter or Preprocessor or Header:
TemplateType=office Version=2017.0511 The top 3 rows are for Amazon.com use only. Do not modify or delete the top 3 rows. Offer-These attributes are required to make your item buyable for customers on the site Dimensions-These attributes specify the size and weight of a product Discovery-These attributes have an effect on how customers can find your product on the site using browse or search Images-These attributes provide links to images for a product Fulfillment-Use these columns to provide fulfillment-related information for either Amazon-fulfilled (FBA) or seller-fulfilled orders. Variation-Populate these attributes if your product is available in different variations (for example color or wattage) Compliance-Attributes used to comply with consumer laws in the country or region where the item is sold Ungrouped - These attributes create rich product listings for your buyers.
Seller SKU Product ID Product ID Type Product Type Product Name Brand Name Manufacturer Manufacturer Part Number Product Description Category (item-type) Update Delete Product Tax Code Launch Date Is Gift Wrap Available Offering Can Be Gift Messaged Package Quantity Manufacturer's Suggested Retail Price Standard Price Sale Price Sale Start Date Sale End Date Quantity Production Time Release Date Restock Date Max Aggregate Ship Quantity Is Discontinued by Manufacturer Registered Parameter Max Order Quantity Shipping-Template Item Weight Item Weight Unit Of Measure Item Height Item Length Item Width Item Dimensions Unit Of Measure Shipping Weight Website Shipping Weight Unit Of Measure Key Product Features1 Key Product Features2 Key Product Features3 Key Product Features4 Key Product Features5 Intended Use Target Audience Subject Matter Catalog Number Search Terms Main Image URL Other Image URL1 Other Image URL2 Other Image URL3 Fulfillment Center ID Package Length Package Width Package Height Package Length Unit Of Measure Package Weight Package Weight Unit Of Measure Parentage Parent SKU Relationship Type Variation Theme Cpsia Warning CPSIA Warning Description Prop 65 Other Attributes Power Source Additional Features1 Additional Features2 Additional Features3 Additional Features4 Additional Features5 Additional Features6 Additional Features7 Additional Features8 Additional Features9 Additional Features10 Additional Features11 Additional Features12 Additional Features13 Additional Features14 Battery Type Telephone Frequency Colour Colour Map Number of Batteries Required Display Type Display Technology Size maximum-expandable-size Maximum Size Unit Of Measure Line Size Line Size Unit Of Measure paper-size Size Map Paper Size Unit of Measure Printer Connectivity Type Printer Type Printer Output Type Color Pages per Minute B&W Pages per Minute Ink Colour1 Ink Colour2 Ink Colour3 Ink Colour4 Ink Colour5 Ink Colour6 Ink Colour7 Ink Colour8 Ink Colour9 Ink Colour10 Ink Colour11 Ink Colour12 Ink Colour13 Ink Colour14 Ink Colour15 Ink Colour16 Ink Colour17 Ink Colour18 Ink Colour19 Ink Colour20 Material Type DrawerType Furniture Finish Number of Hooks Computer Platform1 Computer Platform2 Computer Platform3 Computer Platform4 Computer Platform5 Computer Platform6 Computer Platform7 Paper Finish Brightness
Step 3. Save the format. It can now be used when creating flat files that can be understood by the Amazon MWS Feeds API.
Creating a flow to prepare input files for the Feeds API.
Step 1. Create a source (FROM) connection. It can be a Database connection, Cloud storage, File storage or a Web service.
Step 2. Create a Server Storage connection. Use this as the destination (TO) connection.
Step 3. Depending on your source (the place you are pulling data from), select one of the following flow types:
Database to file
or Web service to file
or File to file
Step 4. Continue by configuring a Transformation, where the source (FROM) connection is the connection created in step 1, the destination (TO) connection is the connection created in step 2, and the destination (TO) format is a format defined here. In the TO field, enter the name of the file to create, for example inventory.txt
.
Step 5. Configure the Mapping and Parameters for the transformation.
Amazon limits the size of the file you can upload through the Feeds API to 1 GB and approximately 30,000 records. If you expect to upload large files, it is recommended that you split them into smaller chunks. Integrator can automatically split files if you set the property Partition By. Go to Mapping->Additional Transformations->Partition By and set Partition By to whatever number of records you want Integrator to split your file by. The number must be less than 30K. For example, if you expect your source dataset to have 100K records, but MWS can only load 30K at one time, you need to set Partition By to 30K. If, for example, the file name is inventory.txt
, Integrator will create 4 files: inventory_1.txt
(30K records), inventory_2.txt
(30K records), inventory_3.txt
(30K records) and inventory_4.txt
(10K records).
Creating a flow which submits files into the Feeds API.
Step 1. Create an Amazon MWS Feeds connection. Use this as the source (FROM) connection.
Step 2. Start creating the flow in Flows window by typing upload data into Amazon MWS
into the search field.
Step 3. Configure a Transformation, where the source (FROM) connection is the Server Storage connection that was created for the first flow, where FROM is a wildcard file name which matches the original file name, for example: inventory.txt->inventory*.txt
, the destination (TO) connection is the connection created in step 1 and, finally, TO is any string, for example inventory
.
Step 4. Set the flow parameters by clicking Mapping->Parameters. The following parameters are available:
Action - select Move
if you want to delete the source files after they are submitted to MWS or Copy
if you want to keep them.
Wait before making next API call - if there are multiple files to upload, this parameter is used to prevent throttling. If the value is greater than 0, multi-threading will be disabled regardless of the value of the property Maximum Simultaneous Operations.
Maximum Simultaneous Operations - if there are multiple files to upload, they can be uploaded in simultaneous parallel threads. This parameter controls the maximum number of simultaneous submit operations allowed. It is recommended that you use the default value, which is 1.
Putting it all together
Combine flows 1 and 2 into a single nested flow.
You have now created a flow which:
1) Extracts data from the source and creates files to upload.
2) Uploads files into MWS.
Comments
0 comments
Please sign in to leave a comment.