Skip to main content
All CollectionsSettings and Troubleshooting FAQ
Dynamic pricing - using price variations
Dynamic pricing - using price variations
Dan Macarie avatar
Written by Dan Macarie
Updated over 5 months ago

The other option for implementing dynamic pricing in Nosto recommendations is by using price variations. Please see this article on how to tag the price variations.
Also, note that this method is suitable only, if you have dynamic pricing rules (tax rules, customer groups, location or whatever changes the pricing) available in your e-commerce platform backend and the dynamic price rules are rather simple.

When implementing dynamic prices with price variations you must create all combinations that can be derived from your dynamic pricing rules. One of the most common cases is that visitors will see different prices in different countries. To keep things simple we will use two currencies and two countries in the example below. 

Step-by-step example

In this example, we have configured different prices for visitors from two countries, United States of America (US) and Finland (FI). We are also using two currencies USD and EUR. Visitors can freely choose to view the store in either of the currencies. 

We need to generate price variations for each combination of country and currency and we also need the default one, since our visitors might be located outside Finland or USA. Our product has a base price of 50 USD. We will end up having following price variations:

As a next step, you need to define nosto_variation (active variation) for each page. This variation would be the combination of country and currency code or, if the visitor is outside of USA and Finland, we would use "default" as a country. You can find more info about the variations tagging from here.  

Complete product and variation tagging would look like this, if a visitor is e.g. from USA and using EUR as currency:

<!-- Nosto Price Variation Tagging -->
<div class="nosto_variation" style="display:none">US_EUR</div>
<!-- Nosto Product Tagging -->
<div class="nosto_product" style="display: none">
    <span class="url">http://example.com/product/CANOE123</span>
    <span class="product_id">CANOE123</span>
    <span class="name">ACME Foldable Canoe</span>
    <span class="image_url">http://example.com/i/CANOE123.jpg</span>
    <span class="price">59.00</span>
    <span class="price_currency_code">USD</span>
    <span class="availability">InStock</span>
    <span class="category">/Outdoor/Boats/Canoes</span>
    <span class="category">/Sales/Boats</span>
    <span class="description">This foldable canoe is easy to travel with.</span>
    <span class="list_price">99.00</span>
    <span class="brand">ACME</span>
    <span class="tag1">Men</span>
    <span class="tag2">Foldable</span>
    <span class="tag3">Brown</span>
    <span class="tag3">Black</span>
    <span class="tag3">Orange</span>
    <!-- Base Variation Id  -->
    <span class="variation_id">US_USD</span>
    <div class="variation">
        <span class="variation_id">US_USD</span>
        <span class="price_currency_code">USD</span>
        <span class="price">50.00</span>
        <span class="list_price">50.00</span>
        <span class="availability">InStock</span>
    </div>
    <div class="variation">
        <span class="variation_id">FI_USD</span>
        <span class="price_currency_code">USD</span>
        <span class="price">61.50</span>5
        <span class="list_price">61.50</span>
        <span class="availability">InStock</span>
    </div>
    <div class="variation">
        <span class="variation_id">DEFAULT_USD</span>
        <span class="price_currency_code">USD</span>
        <span class="price">50.00</span>
        <span class="list_price">50.00</span>
        <span class="availability">InStock</span>
    </div>
    <div class="variation">
        <span class="variation_id">US_EUR</span>
        <span class="price_currency_code">EUR</span>
        <span class="price">40.00</span>
        <span class="list_price">40.00</span>
        <span class="availability">InStock</span>
    </div>
    <div class="variation">
        <span class="variation_id">FI_EUR</span>
        <span class="price_currency_code">EUR</span>
        <span class="price">49.20</span>
        <span class="list_price">49.20</span>
        <span class="availability">InStock</span>
    </div>
    <div class="variation">
        <span class="variation_id">DEFAULT_EUR</span>
        <span class="price_currency_code">EUR</span>
        <span class="price">49.20</span>
        <span class="list_price">49.20</span>
        <span class="availability">InStock</span>
    </div>
</div>
Did this answer your question?