Commercial parameters

In order to ingest commercial parameters, the parameters must first be created. Commercial parameters can be ingested to POST /api/parameters. See the full API reference here. An example of parameters can be seen here.

Example

[
  {
    "parameterId": "weather",
    "parameterType": "Rank",
    "partitions": [
      {
        "partitionId": "weather-rank",
        "name": "rank"
      }
    ],
    "name": "Weather"
  },
  {
    "parameterId": "color",
    "parameterType": "Term",
    "partitions": [
      {
        "partitionId": "blue",
        "name": "Blue",
        "term": "0"
      },
      {
        "partitionId": "grey",
        "name": "Grey",
        "term": "1"
      },
      {
        "partitionId": "orange",
        "name": "Orange",
        "term": "2"
      }
    ],
    "name": "Color"
  },
  {
    "parameterId": "click",
    "parameterType": "Rank",
    "partitions": [
      {
        "partitionId": "click-rank",
        "name": "rank"
      }
    ],
    "name": "Click"
  },
  {
    "parameterId": "trend",
    "parameterType": "Rank",
    "partitions": [
      {
        "partitionStatus": "Ready",
        "partitionId": "trend-rank",
        "name": "rank"
      }
    ],
    "name": "Trend"
  },
  {
    "parameterId": "contributionmargin",
    "parameterType": "Rank",
    "partitions": [
      {
        "partitionId": "contributionmargin-rank",
        "name": "rank"
      }
    ],
    "name": "Contribution Margin"
  },
  {
    "parameterId": "instock",
    "parameterType": "Range",
    "partitions": [
      {
        "partitionId": "low",
        "name": "Low",
        "from": 0,
        "to": 20
      },
      {
        "partitionId": "normal",
        "name": "Normal",
        "from": 21,
        "to": 100
      },
      {
        "partitionId": "plenty",
        "name": "Plenty",
        "from": 101,
        "to": 100000
      }
    ],
    "name": "Instock"
  }
]

With these parameters, it is now possible to ingest SKUs with the following commercialParameters.

Example

[{
    "productId": "BZ01",
    "skuNo": "BZ01",
    "name": "Bizzkit T-Shirt",
    {...}
    "commercialParameters": {
        "click": "2500",
        "weather": "rainy",
        "contributionmargin": "50",
        "instock": "few",
        "trend": "6",
        "color": "blue"
    },
    "skuId": "BZ01"
},
{
    "productId": "BZ02",
    "skuNo": "BZ02",
    "name": "BK T-Shirt",
    {...}
    "commercialParameters": {
        "click": "200",
        "weather": "sunny",
        "contributionmargin": "40",
        "instock": "plenty",
        "trend": "8",
        "color": "white"
    },
    "skuId": "BZ02"
}]