Marketplaces / Inno Technical Scope [DRAFT] / Inno Product & Offer management / Inno Create Products

Inno Create Products

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)

Version Date Created/Updated Applied changes
1.0 08/12/2022 Hristiyan Georgiev First Publish

The purpose of this document is to give detailed description of the flow of creating 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 of one them is set for revision or creation because they go as separate products on MIRAKL and the only thing which associate them is the variantGroupCode So we can add variants to a variation group only by specifying the correct variantGroupCode If we want to remove a product from a variation we need to push the product for update again without the variantGroupCode

  • POST P41 - Import products to the operator information system

API Call: /api/products/imports

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

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

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 P42 (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

There will be two cases how to handle channel item ids in MIRAKL depends on the type.

  • The first case is after successful product creation we need to fill the Channel Item ID, which will be the SKU.
  • The second case is to use P31 Get products for a list of product references which will map the SKUs between Hemi and MIRAKL and store the MIRAKL id as Channel Item ID.

For INNO integration we will go for first option so we wont need to make P31

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.

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 or Variation Specifics according to their taxonomy which we download and store on the instance.

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

Example File:

women-beauty-faceAndEyeCare-example.xml

<?xml version='1.0' encoding='UTF-8'?>
<import>
  <products>
    <product>
      <attribute>
        <code>category</code>
        <value>women-beauty-faceAndEyeCare</value>
      </attribute>
      <attribute>
        <code>shopSKU</code>
        <value/>
      </attribute>
      <attribute>
        <code>name [nl_BE]</code>
        <value/>
      </attribute>
      <attribute>
        <code>EAN</code>
        <value/>
      </attribute>
      <attribute>
        <code>variantGroupCode</code>
        <value/>
      </attribute>
      <attribute>
        <code>image_2</code>
        <value/>
      </attribute>
      <attribute>
        <code>variant_image_1</code>
        <value/>
      </attribute>
      <attribute>
        <code>image_3</code>
        <value/>
      </attribute>
      <attribute>
        <code>image_4</code>
        <value/>
      </attribute>
      <attribute>
        <code>image_5</code>
        <value/>
      </attribute>
      <attribute>
        <code>productDepthUnit</code>
        <value/>
      </attribute>
      <attribute>
        <code>productDiameterValue</code>
        <value/>
      </attribute>
      <attribute>
        <code>productWidthValue</code>
        <value/>
      </attribute>
      <attribute>
        <code>productHeightUnit</code>
        <value/>
      </attribute>
      <attribute>
        <code>productWidthUnit</code>
        <value/>
      </attribute>
      <attribute>
        <code>productLengthValue</code>
        <value/>
      </attribute>
      <attribute>
        <code>productDiameterUnit</code>
        <value/>
      </attribute>
      <attribute>
        <code>productHeightValue</code>
        <value/>
      </attribute>
      <attribute>
        <code>productWeightUnit</code>
        <value/>
      </attribute>
      <attribute>
        <code>productWeightValue</code>
        <value/>
      </attribute>
      <attribute>
        <code>productLengthUnit</code>
        <value/>
      </attribute>
      <attribute>
        <code>productDepthValue</code>
        <value/>
      </attribute>
      <attribute>
        <code>brands</code>
        <value/>
      </attribute>
      <attribute>
        <code>name [fr_BE]</code>
        <value/>
      </attribute>
      <attribute>
        <code>image_1</code>
        <value/>
      </attribute>
      <attribute>
        <code>color</code>
        <value/>
      </attribute>
      <attribute>
        <code>subbrands</code>
        <value/>
      </attribute>
      <attribute>
        <code>otherColor [nl_BE]</code>
        <value/>
      </attribute>
      <attribute>
        <code>otherColor [fr_BE]</code>
        <value/>
      </attribute>
      <attribute>
        <code>shortDescription [nl_BE]</code>
        <value/>
      </attribute>
      <attribute>
        <code>shortDescription [fr_BE]</code>
        <value/>
      </attribute>
      <attribute>
        <code>longDescription [nl_BE]</code>
        <value/>
      </attribute>
      <attribute>
        <code>longDescription [fr_BE]</code>
        <value/>
      </attribute>
      <attribute>
        <code>collection</code>
        <value/>
      </attribute>
      <attribute>
        <code>seasonal</code>
        <value/>
      </attribute>
      <attribute>
        <code>series</code>
        <value/>
      </attribute>
      <attribute>
        <code>ingredients</code>
        <value/>
      </attribute>
      <attribute>
        <code>formatBeauty</code>
        <value/>
      </attribute>
      <attribute>
        <code>content</code>
        <value/>
      </attribute>
    </product>
  </products>
</import>

Mapping: Please note N/A means we exclude it from the payload.

Mirakl Field Mirakl Notes Integration Required Hemi Field Comment
category The product category Yes Product Account > Primary Category ID
shopSKU The shop sku Yes Product > SKU
name [nl_BE] Product title Yes Product Account > Title
EAN Unique product barcode Yes Product Account > Marketplace 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) Product Account > Marketplace EAN is with priority | | variantGroupCode | The variant group code | No | Product Account > Variation Group | | | image_1 | One of the image url used to retrieve the image from Mirakl | Yes | Product Account Inno> Main Image OR Product > Main Image | Product Account Inno is with priority. | | image_2 | One of the image url used to retrieve the image from Mirakl | No | Product Account Inno> More Images OR Product > More Picture URLs | Inno Specifics. Product Account Inno is with priority. | | image_3 | One of the image url used to retrieve the image from Mirakl | No | Product Account Inno> More Images OR Product > More Picture URLs | Inno Specifics. Product Account Inno is with priority. | | image_4 | One of the image url used to retrieve the image from Mirakl | No | Product Account Inno> More Images OR Product > More Picture URLs | Inno Specifics. Product Account Inno is with priority. | | image_5 | One of the image url used to retrieve the image from Mirakl | No | Product Account Inno> More Images OR Product > More Picture URLs | Inno Specifics. Product Account Inno is with priority. | | productWidthValue | Width of the product | No | Product > Width | | | productWidthUnit | Unit of the width | No | Hardcoded as ‘cm’ | Accepted values by Inno are mm, cm, dm, m. Per standard we will be sending them in cm | | productHeightValue | Height of the product | No | Product > Height | | | productHeightUnit | Unit of the height | No | Hardcoded as ‘cm’ | Accepted values by Inno are mm, cm, dm, m. Per standard we will be sending them in cm | | productWeightValue | Weight of the product | No | Product > Weight | | | productWeightUnit | Unit of the weight | No | Hardcoded as ‘gr’ | Accepted values by Inno are gr, kg, gr/m². Per standard we will be sending them in gr | | productLengthValue | Length of the product | No | Product > Length | | | productLengthUnit | Unit of the length | No | Hardcoded as ‘cm’ | Accepted values by Inno are mm, cm, dm, m. Per standard we will be sending them in cm | | brands | Brand of the product | Yes | Product Account> Item specifics OR Product > Brand | Product Account > Item Specifics is with priority | | color | Color of the product | Yes | Product Account> Item specifics | | | subbrands | | No | Product Account> Item specifics | Inno Specifics | | otherColor [nl_BE] | Other color | No | Product Account> Item specifics | Inno Specifics | | longDescription [nl_BE] | Product description | No | Product Account > Description | Inno Specifics | | collection | Product collection | No | Product Account> Item specifics | Inno Specifics | | series | Product series | No | Product Account> Item specifics | Inno Specifics |

Example Response:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<product_import_tracking>
    <import_id>2035</import_id>
</product_import_tracking>

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

Please note we will also add the feed objects which after processing need to be removed.

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

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

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

Example response:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<product_import_tracking>
    <import_id>2005</import_id>
    <date_created>2019-04-05T12:56:21Z</date_created>
    <has_error_report>false</has_error_report>
    <has_new_product_report>false</has_new_product_report>
    <has_transformation_error_report>false</has_transformation_error_report>
    <has_transformed_file>true</has_transformed_file>
    <import_status>SENT</import_status>
    <shop_id>2000</shop_id>
    <transform_lines_in_error>0</transform_lines_in_error>
    <transform_lines_in_success>1</transform_lines_in_success>
    <transform_lines_read>1</transform_lines_read>
    <transform_lines_with_warning>0</transform_lines_with_warning>
</product_import_tracking>

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 this product.

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 = Pending

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.

  • 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;

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

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

Basically, we read the report and we extract the SKU column. After that we compare the Errors 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 integration (it is kind of standard on every MIRAKL)

Sample file

product-import-errors-file-20220929110013 (1).csv

  • 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://galeriainnobe2-dev.mirakl.net/help/api-doc/seller/mmp.html?#P47

Sample file -

5102-err.xml

  • GET P31 - Get products for a list of product references

API Call: /api/productsAPI Docs:https://galeriainnobe2-dev.mirakl.net/help/api-doc/seller/mmp.html?#P31

Additional Information:

For this integration we will need to make sure the protect flags are working as expected:

Protect Quantity - We can exclude the quantity from the payload when we are doing updates so we do not add the quantity in the payload when have Protect Quantity raised

Protect Price - If we raise Protect Price flag, we would need sent to the MP last updated price, because into the offer is mandatory to send price. Last updated price - the last successfully sent to the MP price. If we successfully have updated the price we need to store Product Account > lastSuccessfulPriceSentValue and Product Account > lastSuccessfulPriceSentTime.

Protect the whole item - We update the quantity only but because we CANNOT exclude the price from the payload we will use again the Item Account > lastSuccessfulPriceSentValue

Closed -will stop all the updates to the MPs apart from the end item (send 0 stock update);

Is this article helpful?
0 0 0