VeePee Update 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 | Name | Applied changes |
---|---|---|---|
13.02.23 | v1.0 | Bogomil Pavlov | First Publish |
24.02.23 | v1.1 | Danail Deltchev | Remove Price from payload addition / Fix Protect flags specifications |
06.04.2023 | v1.2 | Bogomil Pavlov | VeePee Status details added |
20.06.2023 | v1.3 | Bogomil Pavlov | Update Protect Whole item logic |
The purpose of this document is to detailed describe the flow of updating products. The update flow use the same request and exact the same logic, mapping and structure as create product apart from the details below.
For VeePee we want to group all variants when we are updating products and if we have one product set on pending to include all other products with the same variation group which are already with Product status = Product Published and all other products from the same variation group which are not create to receive an error in Update item error field because we are not able to add or amend variations on the marketplace!
When we are sending a product for full update using Product Account > List Update the Whole Item flag we need to set Product Account > Update Price - Pending as well because the prices are not updated using the full product update.
Please note: due to the above mentioned reasons we DO NOT want to send the price at all with the Product Update (manufacturer_recommended_price and retail_price_justification)
Complete product flow:
We are able to send updates to products in 2 cases. Once the product listing status is Active and Inactive(i.e. after successfully zero stock updates)
We pick the product for update when we have:
Product status **= Product Published ; Listing Status **= Active/Inactive; List/Update the whole item = Pending If we send the offer for update successfully we set: Product status **= Product Published ; Listing Status **= Active/Inactive; List/Update the whole item = Sent;
Once we receive success, we need to set following statuses:
Product status = Product Published; **Listing Status =Active/Inactive; List/Update the whole item = Not Needed; Update Price = Pending**
If we receive an error we will have:
Product status **= Product Published ; Listing Status **= Active/Inactive; List/Update the whole item = Error
(The error need to be stored into Update item error field.)
After each successfully send feed for update we need to store the filename which is returned from VeePee in the response and need to store it in Marketplace Feeds table. All products that are included in the feed need to be marked as Product Account > List/Update the whole Item - Sent
VeePee Field | Hemi Field | Comment |
---|---|---|
FileName | Marketplace Feed > External ID | This field is used to get the response of the import. |
Marketplace Feed > Account | For which account is the feed generated. | |
Marketplace Feed > Type | Hardcoded as “Listing Update“ | |
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 the import status for a product import
API Call: {{BaseURL}}/status/{filename}
API Docs: https://pinkstaging.pink-connect.com/swagger#operation/getFileStatus
UPDATED: the change was successfully imported (we treat this as success)
SKIPPED: there was no change compared to the last feed (we treat this as success)
NEW: New product is created (we treat this as success)
ERROR: the data was not imported due to an error (we treat this as error)
WARNING: The update/create is successful but with warnings (we treat this as success)
Example pending response:
{
"status": "PENDING",
"result": null,
"stats": "",
"errorList": []
}
Example success response:
{
"status": "FINISHED",
"result": "ok",
"stats": "PRODUCT [ UPDATED :1, ERROR :0, NEW :0, SKIPPED :0, WARNING :1]",
"errorList": []
}
Example error response #1:
{
"status": "FINISHED",
"result": "ok",
"stats": "PRODUCT [ UPDATED :0, ERROR :2, NEW :0, SKIPPED :0, WARNING :0]",
"errorList": [
{
"category": "113991",
"gtin": 5055286279677,
"model": "36306124510",
"sku": "36306124511",
"status": "ERROR",
"error_description": [
"Category not found 113991"
]
},
{
"category": "113992",
"gtin": 5055286279678,
"model": "36306124512",
"sku": "36306124512",
"status": "ERROR",
"error_description": [
"Category not found 113992"
]
}
]
}
If we have errors during the product creation we will receive each product in separate node and we want to map directly the "sku"
and store the "error_description"
as error.
Example error response #2:
{
"status": "FINISHED",
"result": "ok",
"stats": "PRODUCT [ UPDATED :0, ERROR :1, NEW :0, SKIPPED :0, WARNING :1]",
"errorList": [
{
"category": "11529",
"gtin": 1234567891012,
"model": "1234",
"sku": "1234",
"status": "ERROR",
"error_description": [
"Mandatory attribute shoe_size_fr was not provided",
"Mandatory attribute color was not provided",
"Mandatory attribute retail_price_justification was not provided",
"Not valid value España for attribute size_country_origin (fr)",
"Not valid value Hombre for attribute morphogender (fr)"
]
}
]
}
If we have multiple errors during the product creation for single product we want to map directly the "sku"
and store all the "error_description"
as error.
Example error response #3:
{
"status": "FINISHED",
"result": "critical",
"stats": "",
"errorList": [
"description: Provided file SHOP_CATALOG_1160_20230404105456.json content is corrupt "
]
}
We can receive an error without status as well which we want to treat as full feed error and mark all products (feed objects) as error with the relevant error message from the “errorList“
Example error response #4
{
"status": "FINISHED",
"result": "ok",
"stats": "OFFER [ SKIPPED :0, UPDATED :0, NOT_FOUND :0, ERROR :0]",
"errorList": []
}
We can receive a response with 0 processed products as well which we want to treat as full feed error and mark all products (feed objects) as error
Based on the response we need to map each product and we will have to update the products either with error or success as well as the Marketplace Feed > Status and Marketplace Feed > External Status. If the product is updated successfully and we do not receive and error in the errorList from the response we want to update: Product Account > Product status - Product Published Product Account > Listing Status - Active/Inactive Product Account > List/Update the whole Item - Not Needed
If we receive and error and the product is not updated: Product Account > Product status - Product Published Product Account > Listing Status - Inactive/Active Product Account > List/Update the whole Item - Error
Any Triggers or Validations that are not specifically mentioned, changed or removed from the above mentioned scope should follow the standard flor as per the Product Listing general requirements abstraction.
Additional Information:
For this integration we will need to make sure the protect flags are working as expected:
Protect Quantity (Stop all quantity updates) If Protect Quantity = Yes and List/Update the Whole Item = Pending - We pick the product for full update but do NOT include the quantity in the payload
Protect the whole item - (Stop all product updates apart from Quantity)Protect the whole item - (Stop all product updates apart from Quantity)(v1.3)If Protect the whole item = Yes and List/Update the Whole Item = Pending - We skip the product.
Closed -will stop all the updates to the MPs