Documentation
Feedback
Guides
Storefront Development

Storefront Development
(Legacy) CMS Portal
Configure the price history control
Configure the price history control

The past price control in VTEX is intended to show the lowest price invoiced for an item per month. In other words, it can show the lowest price for selling a particular item in your store.

Configuration

The control should be included in the product page's template as follows:


_10
_10
<b style={{ fontFamily: "Inconsolata, monospace", }}><vtex.cmc:StockKeepingUnitPriceHistory Months="6" Percentile="100"/>

See the complete list of template controls here.

Behavior

The default exhibition method for the values looks like the image below. The year, month, and lowest amount invoiced this month are shown in sequence.

{"base64":"  ","img":{"width":1226,"height":729,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":158426,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/configure-the-price-history-control-0.png"}}

If you want to show these details in another way, you must get a layout agency to customize the model.

The Months and Percentile parameters

To allow more flexibility in showing values on the product page, you can use the Months parameter to define the number of months to be taken into account by the control.

If the parameter is "6", for example, the control will show the lowest amount invoiced for the item in each of the last six months.

In addition, it can happen that the lowest amount invoiced for the item is below the price usually applied by the store, for example, because of a specific promotion. You can use the parameter Percentile to avoid showing this value.

This allows you to ignore peripheral values. For example, using the parameter with a value of 95 (Percentile="95"), 5% of the amounts are ignored.

Using the parameter with a value of 90 (Percentile="90"), 10% of the amounts are ignored.

In such cases, prices much below those normally applied will not be shown.

If there are price variations in a particular month, the control shows the lowest value invoiced for the item during the month.

If there were no sales of an item during the month, the control will not show a value for it.

Contributors
3
Photo of the contributor
Photo of the contributor
Photo of the contributor
+ 3 contributors
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
3
Photo of the contributor
Photo of the contributor
Photo of the contributor
+ 3 contributors
On this page