Create 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
After we have successfully created a product we can push the offers using Submits an offer package request.
API Call: POST https://api.octopia-io.net/seller/v2/offer-integration-packages
API Docs:https://developer.octopia-io.net/api-details#api=api-rest-seller-v2&operation=post-offer-integration-packages
Body: We specify the zip file url.
The name given to the Zip package has no importance. There is no specific norm.
The structure of the package must contain this tree structure necessarily.
- Folder _rels containing the file .rels
- Folder Content containing the file Offers.xml
- File [Content_Types].xml
Download examples of package Full
Product Condition Mapping:
Cdiscount Value | Hemi Value | Comment |
---|---|---|
6 | New with tags (1000) | New |
4 | Good (5000) | AverageState |
2 | Very Good (4000) | VeryGoodState |
1 | Like New (2750) | LikeNew |
Feed Mapping:
Cdiscount Field | Integration Required | Hemi Field | Comment | ||
---|---|---|---|---|---|
Offer |
|||||
SellerProductId |
Yes | Product > SKU | |||
ProductEan |
Yes | Product Account Cdiscount > EAN |
OR
Product Account > Marketplace EAN
OR
Product > EAN | First priority is Product Account Cdiscount > EAN
then Product Account > Marketplace EAN then Product > EAN |
| | ProductCondition
| | Yes | Product > Condition | Please refer to the mapping |
| | Price
| | Yes | Product Account > Price | |
| | EcoPart
| | Yes | Product Account Cdiscount > Eco Part | |
| | DeaTax
| | Yes | Product Account Cdiscount > Dea Tax | |
| | Vat
| | Yes | Account > VAT
OR
Product Account > VAT | First priority is Account > VAT |
| | Stock
| | Yes | Product Account > Quantity | |
| | StrikedPrice
| | No | Product Account >RRP | |
| | PreparationTime
| | Yes | Product Account >Dispatch Time Max
OR
Product Account > Shipping Template (Dispatch Time Max)
Shipping Template > Dispatch Time Max | First priority is Product Account >Dispatch Time Max then the selected Dispatch Time from the selected Product Account > Shipping Template and finally is the default
Shipping Template > Dispatch Time Max |
| Offer.ShippingInformationList
| | | | | |
| | ShippingInformationList
| | | | |
| | | AdditionalShippingCharges
| No | Shipping Methods >Shipping Service Additional Cost | |
| | | DeliveryMode
| No | Shipping Methods >Shipping Service | Only Registered and Tracked are mandatory and we must have default shipping template with always Registered and Tracked shipping methods |
| | | ShippingCharges
| No | Shipping Methods >Shipping Service Cost | |
| Offer.PriceAndDiscountLis
| | | | | |
| | DiscountComponentList
| | | | • Sales that are only active during the official sales period in France (January and June). Type=3 and DiscountUnit=1. The SalesreferencePrice is the price that will be applied to the sale (usually equal to the Price) and the DiscountValue is the discount percentage. Be careful, in your example, you make a discount of 99.90%. Not combinable with flash sales.
flash sales. Limited to 72h maximum for each SKU with a mandatory 3x the time of the flash sale between each sale. Type=1 and DiscountUnit=1. The DiscountValue is applied directly on the Price. And the spacing between StartDate and EndDate must not exceed 48h. Not combinable with sales. |
| | | DiscountUnit
| No | Product Account Cdiscount > Discount Type | |
| | | DiscountValue
| No | N/A | The percentage will be calculated between the RRP and the Price. |
| | | SalesReferencePrice
| No | Product Account > RRP | TBC |
| | | Type
| No | Product Account Cdiscount > Promotion Type | 1 or 3 are the available options |
| | | EndDate
| No | Product Account Cdiscount > End Date | Date Format "2019-02-05T00:00"
|
| | | StartDate
| No | Product Account Cdiscount > Start Date | Date Format "2019-02-05T00:00"
|
Sample Request:
POST https://api.octopia-io.net/seller/v2/offer-integration-packages
Body:
"http://arcade.myhemisphere.com/.temp/cdiscount/upload/products/Products_2022-11-17_19-00-36.zip"
Sample Response:
{
424325363619
}
Response Mapping:
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 “Create 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 = Inactive Product Account > Product Status =Product created Product Account > List / Update the Whole Item = Pending
Once the product is picked for offer creation we will have: Product Account > Listing Status = Inactive Product Account > Product Status =Product created 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 WONT populate the Product Account > Channel Item ID and update the product: Product Account > Listing Status = Inactive Product Account > Product Status =Product created 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);