Marketplaces / ASOS - Technical Scope / ASOS Product Management / ASOS - Create Product

ASOS - Create Product

Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)

Date Version Applied changes
28/09/2022 1.1 Statuses changed based on a comment
30/09/2022 1.2 Complete flow described
26/10/2022 1.3 Include Variation Groups in MIRAL

The purpose of this document is to describe in details the process of creating products on MIRAKL.

The specifics on MIRAKL are we must create a product first, and then we must create/send an offer for the already created product.

In order to create a product we will need to make couple of API Calls, which are POST P41 ( Import products to the operator information system), GET P42 (Get the import status for a product import) , GET P44 (Get the error report file for a product import), GET P47 (Get the transformation error report file for a product import)

How to handle variations in MIRAKL

The way we treat a product as a Variation is when we have Product Account > Variation Group populated. Each Product Account in Hemi can have Item Specifics and Variation Specifics which we validate the same way against the MIRAKL taxonomy but we use them only in certain cases.

If we DO NOT HAVE Product Account > Variation Group:

We use only the Item Specifics from the product if any Variation Specifics are also populated we ignore them

If we HAVE Product Account > Variation Group:

We use all of the Variation Specifics and all of the Item Specifics. If there are no Variation Specifics we should return an error. If we have the same attribute added as a Variation Specific and as a Item Specific we pick it only from the Variation Specifics.

Please note we do not need to select all variants if only one them is set for revision or creation because they goes as separate products on MIRAKL and the only thing which associate them is the supplier-ref. So we can add variants to a variation group only by specifying the correct supplier-ref. If we want to remove a product from a variation we need to push the product for update again without the supplier-ref.

  • POST P41 - Import products to the operator information system

API Call: /api/products/imports

Docs: https://asosuk-dev.mirakl.net/help/api-doc/seller/mmp.html#P41

Parameter Notes Required
File Import file (CSV or XML or XLSX) to upload. Use multipart/form-data with name file Yes
operator_format Force the use of the operator product format No

Note: Every time we send products for creation we have to do internal check if all required attributes are part of the the product as Item Specifics according to their taxonomy which we download and store on the instance. Please note that for the ASOS we will have only 5 categories that we will use! Also, there are no required attributes and values

Complete flow:

In order to push products for creation we should have:

Product status = Awaiting Creation ; Listing Status **= Inactive; List/Update the whole item= Pending**

If we successfully pick a product for creation, we will have following statuses:

Product status -Awaiting Creation ; Listing Status - Inactive; List/Update the whole Item = Sent (in order to be picked by Offer creation)

If the internal product validation is not successful and we receive an error, we will set following statuses and store the relevant error message in Item Account > Update Item Error:

Product status = Awaiting Creation ; Listing Status=Inactive; List/Update the whole item= Error

If we receive success after performing P44 (when we send product to MIRAKL & When both "has_error_report" and "has_transformation_error_report" are equal to “false“ ) we can proceed to following:

Product status -Product Created ; Listing Status - Inactive; List/Update the whole Item = Pending

Аfter successful product creation we need to fill the Channel Item ID, which for MIRAKL integration is the SKU!

If we receive an error (any of "has_error_report" and "has_transformation_error_report" are equal to “true“):

Product status -Awaiting Creation ; Listing Status - Inactive; List/Update the whole Item = Error

And we need to store the relevant error message into the Product Account >Update Item Error.

The file which we will import must be an xml file with the following structure:

clothing-example (1).xml

<?xml version='1.0' encoding='UTF-8'?><import><products>
    <product>
      <attribute>
        <code>product-category</code>
        <value>clothing</value>
      </attribute>
      <attribute>
        <code>seller-sku</code>
        <value>4063699279412</value>
      </attribute>
      <attribute>
        <code>name</code>
        <value>PUMA Mens BMW M Motorsport Sweatpants Track Bottoms Sports Pants - Medium Gray H</value>
      </attribute>
      <attribute>
        <code>description</code>
        <value>PUMA Mens BMW M Motorsport Sweatpants Track Bottoms Sports Pants - Medium Gray H</value>
      </attribute>
      <attribute>
        <code>brand</code>
        <value>PUMA</value>
      </attribute>
      <attribute>
        <code>ean</code>
        <value>4063699279412</value>
      </attribute>
      <attribute>
        <code>image-1</code>
        <value>https://images.puma.net/images/193148/01/sv01/fnd/GBR/</value>
      </attribute>
      <attribute>
        <code>color</code>
        <value/>
      </attribute>
      <attribute>
        <code>supplier-ref</code>
        <value/>
      </attribute>
    </product>
  </products></import>

Mapping:

Mirakl Field Mirakl Notes Integration Required Hemi Field Comment
product-category Yes Product Account > Primary Category ID
seller-sku Yes Product > SKU
name Yes Product Account > Title
description Yes Product Account > Description
brand Yes Product Account> Item specifics

OR Product > Brand | | | ean | | Yes | Product Account > MP EAN OR Product > EAN | If we do not have EAN filled, we should display an error ( EAN is required and we could not proceed to product creation without EAN) | | image-1 | | Yes | Product > Main Image or Product Account Asos > Main Image | | | color | | No | Product Account> Item specifics | Per category | | supplier-ref | | No | Product Account > Variation Group | Please refer to “How to handle variations section“ |

Example Response:

{
  "import_id": 2035
}

After each successfully send feed for creation we will receive the feed id from the response and need to store it in Marketplace Feeds table.

Mirakl Field Hemi Field Comment
import_id Marketplace Feed > External ID
Marketplace Feed > Account For which account is the feed generated.
Marketplace Feed > Type Hardcoded as “Listing Create“
Marketplace Feed > Submitted Date When the feed is submitted
Marketplace Feed > Sent Objects Count How many products we have pushed in the feed
N/A N/A

Please note we will add all successfully sent products as feed objects which after processing need to be removed from the object table.

  • GET P42 -Get the import status for a product import

API Call: /api/products/imports/{import}

API Docs: https://asosuk-dev.mirakl.net/help/api-doc/seller/mmp.html#P42

Example response:

{
  "date_created": "2019-04-05T12:56:21Z",
  "has_error_report": false,
  "has_new_product_report": false,
  "has_transformation_error_report": false,
  "has_transformed_file": true,
  "import_id": 2005,
  "import_status": "SENT",
  "shop_id": 2000,
  "transform_lines_in_error": 0,
  "transform_lines_in_success": 1,
  "transform_lines_read": 1,
  "transform_lines_with_warning": 0
}

Depends on the response of:"has_error_report" and "has_transformation_error_report" we will need to call each of the error reports if we receive "true". Also if we already have the item pushed into another feed from the same type we remove it from the objects (table 2511) and need to add it in the latest sent feed. Via this way we wont read any old or previous responses for the particular SKU.

When both "has_error_report" and "has_transformation_error_report" are equal to “false“ is the success case (Import status = Completed) and we could proceed to creating and offer to all products inside the feed.

If we receive success (When both "has_error_report" and "has_transformation_error_report" are equal to “false“ ) we can proceed to following:

Product status -Product Created ; Listing Status - Inactive; List/Update the whole Item = Not Needed

Аfter successful product creation we need to fill the Channel Item ID, which for MIRAKL integration is the SKU!

If we receive an error (any of "has_error_report" and "has_transformation_error_report" are equal to “true“):

Product status -Awaiting Creation ; Listing Status - Inactive; List/Update the whole Item = Error

And we need to store the relevant error message into the Product Account >Update Item Error.

Note: See below detailed information for mentioned API calls ("has_error_report" and "has_transformation_error_report" )

  • GET P44 - Get the error report file for a product import

We need to perform this call if we receive has_error_report = true, into the response from P42;

Basically, we rad the report and we extract the SKU column. After that we compare the Errors or Warninngs columns and we need to store them.

Also, the record for the SKUs that have matched need to be removed from Marketplace Feed Object table.

We will consider Warning=Success in the ASOS integration (it is kind of standard on every MIRAKL)

API Call: /api/products/imports/{import}/error_report

API Docs: https://asosuk-dev.mirakl.net/help/api-doc/seller/mmp.html#P44

Sample file - To be added

  • GET P47 - Get the transformation error report file for a product import

This call returns if the import is successful and how may warnings and errors we have in the file. We need to call this if we receive has_transformation_error_report = true

API Call: /api/products/imports/{import}/transformation_error_report

API Docs: https://asosuk-dev.mirakl.net/help/api-doc/seller/mmp.html#P47

Sample file - To be added

Is this article helpful?
0 0 0