Marketplaces / BOL Technical Scope [In Progress] / Bol Product Management / Bol Create Offer

Bol Create Offer

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 Created / Updated Notes
10/05/2023 v1.0 Bogomil Pavlov First publish

The purpose of this document is to describe how we create offer on Bol

We want all triggers, validations and standardizations which are not mentioned here to be a per Product Listing general requirements

The trigger for Offer Creation is: Product Account > Product Status = “Product created” OR “Product Removed“Product Account > List / Update the Whole Item = Pending

API Call: POST https://api.bol.com/retailer/offersAPI Docs: https://api.bol.com/retailer/public/redoc/v9/retailer.html#tag/Invoices/operation/get-invoice-specification

Sample Request:

{
  "ean": "0000007740404",
  "condition": {
    "name": "AS_NEW",
    "category": "SECONDHAND",
    "comment": "Heeft een koffie vlek op de kaft."
  },
  "reference": "REF12345",
  "onHoldByRetailer": false,
  "unknownProductTitle": "Unknown Product Title",
  "pricing": {
    "bundlePrices": [
      {
        "quantity": 1,
        "unitPrice": 9.99
      }
    ]
  },
  "stock": {
    "amount": 6,
    "managedByRetailer": false
  },
  "fulfilment": {
    "method": "FBR",
    "deliveryCode": "24uurs-23"
  }
}

Sample Response:

{
  "processStatusId": "1234567",
  "entityId": "987654321",
  "eventType": "CREATE_OFFER",
  "description": "Example process status description for processing 987654321.",
  "status": "SUCCESS",
  "errorMessage": "Example process status error message.",
  "createTimestamp": "2018-11-14T09:34:41+01:00",
  "links": [
    {
      "rel": "self",
      "href": "https://api.bol.com/shared/process-status/1234567",
      "method": "GET"
    }
  ]
}

Mapping:

Bol Field Bol Comment Required MP Hemi Field Comment
ean Yes Product > EAN

OR Product Account > Marketplace EAN | Product Account > Marketplace EAN with priority | | condition | | | | | | | | | name | | Enum: "NEW" "AS_NEW" "GOOD" "REASONABLE" "MODERATE" The condition of the offered product. | Yes | Product > ConditionID | State Mapping: 1000 => 'NEW',3000 => 'AS_NEW',5000 => 'GOOD',2750 => 'REASONABLE',6000 => 'MODERATE' Please note if we specify any other ConditionID we want to return an error | | | category | | Enum: "NEW" "SECONDHAND" The category of the condition. If not given NEW or SECONDHAND is derived from NAME. | No | N/A | | | | comment | | | | N/A | | | reference | | | | Yes | Product > SKU | | | onHoldByRetailer | | | | Yes | “false“ | Hardcoded as “false“ | | unknownProductTitle | | | | No | Product Account > Title | | | pricing | | | | | | | | | bundlePrices | | | | | | | | | quantity | | Yes | “1“ | Hardcoded as “1” | | | | unitPrice | | Yes | Product Account > Price | | | stock | | | | | | | | | amount | | | Yes | Product Account > Quantity | | | | managedByRetailer | | Configures whether the retailer manages the stock levels or that Bol should calculate the corrected stock based on actual open orders. In case the configuration is set to 'false', all open orders are used to calculate the corrected stock. In case the configuration is set to 'true', only orders that are placed after the last offer update are taken into account. | Yes | “true“ | Hardcoded as “true” | | fulfilment | | | | | | | | | method | | | Yes | Account Bol > Fulfilment Method | | | | deliveryCode | | Enum: "24uurs-23" "24uurs-22" "24uurs-21" "24uurs-20" "24uurs-19" "24uurs-18" "24uurs-17" "24uurs-16" "24uurs-15" "24uurs-14" "24uurs-13" "24uurs-12" "1-2d" "2-3d" "3-5d" "4-8d" "1-8d" "MijnLeverbelofte" "VVB" The delivery promise that applies to this offer. This value will only be used in combination with fulfilmentMethod 'FBR'. | Yes | Shipping Method > Shipping Service | We want to use our standard shipping template logic and get the Service from the the actual template.

In order to get the shipping template we first check the Product Account > Shipping Template if we have already assigned one.

If nothing is selected in Product Account we get the default Shipping Template

If nothing is selected and no default shipping template is set we want to return an error. |

Sample Response:

{
    "processStatusId": "832492885",
    "eventType": "CREATE_OFFER",
    "description": "Create an offer with ean 3275056058603.",
    "status": "PENDING",
    "createTimestamp": "2023-08-28T22:17:17+02:00",
    "links": [
        {
            "rel": "self",
            "href": "https://api.bol.com/shared/process-status/832492885",
            "method": "GET"
        }
    ]
}

The offer creation is asynchronous and we will have to create a new feed in Marketplace Feeds table. After each successfully sent feed for offer creation we will receive the processStatusIdfrom the response and need to store it in Marketplace Feeds table with the rest of the details as follows.

Bol Field Hemi Field Comment
processStatusId Marketplace Feed > External ID
Marketplace Feed > Account For which account is the feed generated.
eventType Marketplace Feed > External Type
Marketplace Feed > Type Hardcoded as “Create Offer
createTimestamp 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 > Status If the external status is “PENDING“ we want to set the status as “Processing“.
If the external status is “SUCCESS“ or “FAILURE” or “TIMEOUT” we want to set the status as “Completed“.
status Marketplace Feed > External Status

Based on the response reader afterwards we need to mark the products as Offer Created mark them as: Product Account > Product Status = “Offer Created” (new Product Status)Product Account > List / Update the Whole Item = Not Needed

If any errors are returned we want to store them in Product Account > Update Item Error after Bol Product Response Reader

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

We want to include additional logic for already created offers and if we receive a error response:

{
    "processStatusId": "828429751",
    "eventType": "CREATE_OFFER",
    "description": "Create an offer with ean 3275055840834.",
    "status": "FAILURE",
    "errorMessage": "[Duplicate Offer] Duplicate found: retailer offer '2a9644cc-98a6-459f-b14f-5e9f93cd6997' already has EAN 3275055840834 and condition NEW.",
    "createTimestamp": "2023-08-28T21:31:16+02:00",
    "links": [
        {
            "rel": "self",
            "href": "https://api.bol.com/shared/process-status/828429751",
            "method": "GET"
        }
    ]
}

We want to get the offer ID from the error message and get everything between the apostrophes (') `which the offer id'2a9644cc-98a6-459f-b14f-5e9f93cd6997'` and store it as Product Account > Channel Item Id and mark the product as: Product Account > Product Status = “Product published”Product Account > List / Update the Whole Item = Not Needed

Is this article helpful?
0 0 0