Update Offerr
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 |
---|---|---|---|
22/11/2022 | 1.0 | Bogomil Pavlov | Initial Version |
Submits an offer package
The Full Offer Update structure is the same as Create Offerr
After each successfully send feed for creation we will receive the packageId
from the response and need to store it in Marketplace Feeds table.
Cdiscount Field | Hemi Field | Comment |
---|---|---|
packageId |
Marketplace Feed > External ID | |
Marketplace Feed > Account | For which account is the feed generated. | |
Marketplace Feed > Type | Hardcoded as “Update Offers“ | |
Marketplace Feed > Submitted Date | When the feed is submitted | |
Marketplace Feed > Sent Objects Count | How many products we have pushed in the feed | |
Marketplace Feed >ZIP Path | The url of the zip | |
Marketplace Feed >Completed Date | When we process the feed | |
Marketplace Feed >External Status | External Feed status |
Please note we will also add the feed objects which after processing need to be removed.
Read Offer Package
API Call: GET https://api.octopia-io.net/seller/v2/offer-integration-packages[?packageId][>in][&pageIndex][&pageSize][&fields][&sort][&desc]
API Doc: https://developer.octopia-io.net/api-details#api=api-rest-seller-v2&operation=get-product-integration-reports
Request parameters
Name | Required | Type | Description |
---|---|---|---|
packageId |
true | string |
Format - int64. Package identifier. |
limit |
false | integer |
Format - int32. Must be written as follows $limit |
page |
false | integer |
Format - int32. Must be written as follows $page |
Sample Request: GET https://api.octopia-io.net/seller/v2/products-integration-reports?packageId=309592003&page=1&limit=50
Sample Response:
{
"package_id": 309592003,
"integration_state": "Integrated",
"number_of_errors": 1,
"offer_log_paged_list": [
{
"log_date": "2022-11-22T00:31:04.75+00:00",
"offer_integration_status": "Integrated",
"product_ean": "5056553233698",
"seller_product_id": "96581",
"property_list": [
{
"log_message": "96581|5056553233698|MP60297644-0004|OK|9000|Offer updated|Cdiscount",
"property_code": "0",
"property_error": "90"
}
]
}
,
{
"log_date": "2022-11-22T08:57:08.12+00:00",
"offer_integration_status": "Rejected",
"product_ean": "5054697499253",
"seller_product_id": "11806603270",
"property_list": [
{
"log_message": "11806603270|5054697499253||KO|3893|Données manquantes|Cdiscount",
"property_code": "93",
"property_error": "38"
}
]
}
],
"seller_id": 51102,
"page": 0,
"count_by_page": 50,
"total_logs_count": 2
}
Request Mapping:
Cdiscount Field | Hemi Field | Comment | ||
---|---|---|---|---|
package_id |
N/A | |||
integration_state |
Marketplace Feed >External Status | |||
number_of_errors |
N/A | |||
offer_log_paged_list |
||||
log_date |
N/A | |||
offer_integration_status |
N/A | Based on this status we will know if the update of the SKU is successful or not | ||
product_ean |
N/A | |||
seller_product_id |
N/A | This is our SKU which we will be using to map the response | ||
property_list |
||||
log_message |
Product Account > Update Item Error |
OR
Product Account >Update Quantity Error
OR
Product Account >Update Price Error
OR
Product Account >End Item Error | Depends on the feed type we have pushed we will have to store the relevant message in the relevant field. |
| | | property_code
| N/A | |
| | | property_error
| N/A | |
| seller_id
| | | N/A | |
| page
| | | N/A | |
| count_by_page
| | | N/A | |
| total_logs_count
| | | N/A | |
In order to pick a product for offer creation we must HAVE Product Account > Channel Item ID populated, the relevant flags set and Product Account > Listing Status = Active/Inactive Product Account > Product Status =Product published Product Account > List / Update the Whole Item = Pending
Once the product is picked for offer creation we will have: Product Account > Listing Status = Active/Inactive Product Account > Product Status =Product published Product Account > List / Update the Whole Item = Sent
When we read the response if successful we will update the product: Product Account > Listing Status = Active/Inactive Product Account > Product Status =Product published Product Account > List / Update the Whole Item = Not Needed
When we read the response if error we will update the product: Product Account > Listing Status = Active/Inactive Product Account > Product Status =Product published Product Account > List / Update the Whole Item = Error With the relevant error message in Product Account > Update Item Error
Limits:
There is a a limit of 200 000 offers in a package but I think in order to have better performance we can set a limit of 50 000 or 100 000 offers per package.
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 - We can exclude the price from the payload when we are doing updates so we do not add the price in the payload when have Protect Price raised.
Protect the whole item - We update the quantity only.
Closed -will stop all the updates to the MPs apart from the end item (send 0 stock update);