allegro / allegro/allegro-api

[NEWS] Reguły cenowe - udostępniliśmy nowe opcje automatycznego przeliczania cen / Pricing rules - we have introduced new options for automatic price conversion

Abierto
#9,578 0 comentarios 0 reacciones 1 asignado Reclamado por @PrzemyslawLukanowski Ver en GitHub
News Offer - management
Lenguaje dominante
Sin datos de lenguaje
Estrellas
244
Forks
40
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Reguły cenowe to funkcjonalność, która pozwoli Ci zarządzać ceną oferty bez edytowania jej ręcznie. Do tej pory udostępnialiśmy tylko jedną regułę - [Przelicznik cen](https://developer.allegro.pl/news/przelicznik-cen-udostepnilismy-nowe-zasoby-do-zarzadzania-cena-w-serwisach-dodatkowych-6MBgWnzx7s7), za pomocą której automatycznie przeliczamy cenę w serwisie dodatkowym w oparciu o kurs publikowany przez Europejski Bank Centralny.

Od dziś możesz tworzyć własne reguły, dzięki którym przeliczymy cenę zarówno w serwisie bazowym, jak i w zagranicznych. Reguły ustawisz osobno dla każdego rynku, na którym dana oferta jest widoczna. Oznacza to, że z jedną ofertą możesz połączyć kilka reguł.

**Co zmieniliśmy?**

* udostępniliśmy nową regułę **“FOLLOW_BY_ALLEGRO_MIN_PRICE”** (Najniższa cena na Allegro), dzięki której będziemy zmieniać cenę w Twojej ofercie na podstawie:

* Twojej ceny produktu w tej ofercie
* aktualnie najniższej ceny danego produktu na Allegro, którą sprawdzamy co godzinę
* zdefiniowanego przez Ciebie zakresu, w ramach którego chcesz zmieniać swoją cenę.
* dodaliśmy nowe endpointy:

* [POST /sale/price-automation/rules](https://developer.allegro.pl/documentation#operation/createAutomaticPricingRulesUsingPost) - utwórz nową regułę cenową
* [PUT /sale/price-automation/{ruleId}](https://developer.allegro.pl/documentation#operation/updateAutomaticPricingRuleUsingPut) - edytuj regułę cenową
* [DELETE /sale/price-automation/{ruleId}](https://developer.allegro.pl/documentation#operation/deleteAutomaticPricingRuleUsingDelete) - usuń regułę cenową

* dodaliśmy nowe pola w dotychczasowych zasobach związanych z automatycznym przeliczaniem cen:

* **“default”** - w którym informujemy, czy dana reguła została utworzona przez Allegro (true) lub przez sprzedawcę (false). Np. regułę “EXCHANGE_RATE” (Przelicznik cen), dla której zwrócimy wartość true, tworzymy automatycznie w oparciu o ofertę z cennikiem dostawy dla rynku zagranicznego. Po [zmianie procesu widoczności ofert na dodatkowych rynkach](https://developer.allegro.pl/news/uruchomilismy-nowy-proces-widocznosci-oferty-w-serwisach-dodatkowych-D7PX3M7oZuV) regułę automatycznie przypisujemy do ofert, które kwalifikują się do widoczności w serwisach zagranicznych. Reguły oznaczone są jako “default”: true nie zawierają dodatkowych konfiguracji cen, które zdefiniować może wyłącznie sprzedający.

* **“configuration.priceRange”** - w którym określisz zakres cenowy, gdy przypisujesz regułę typu “FOLLOW_BY_ALLEGRO_MIN_PRICE” (pola nie da się uzupełnić dla reguły “EXCHANGE_RATE”) do ofert za pomocą [POST /sale/offer-price-automation-commands](https://developer.allegro.pl/documentation#operation/offerPriceAutomationModificationCommandUsingPOST). Jeśli go nie zdefiniujesz, nie będziemy stosować reguły i aktualizować ceny w ofercie. W ten sposób chronimy Cię przed automatyczną obniżką poniżej kwoty, która jest dla Ciebie opłacalna.

**Przykład 1**

1. Dla oferty z ceną 20 zł ustawiasz regułę cenową typu “FOLLOW_BY_ALLEGRO_MIN_PRICE”. Podajesz zakres cen dla tej oferty: od 15 do 25 zł.
2. Aktualna najniższa cena danego produktu na Allegro to 16 zł.
3. Najniższa cena na Allegro mieści się w Twoim zakresie cen – dlatego zaktualizujemy cenę oferty na 16 zł.

**Przykład 2**

1. Dla oferty z ceną 20 zł ustawiasz regułę cenową typu “FOLLOW_BY_ALLEGRO_MIN_PRICE”. Podajesz zakres cen dla tej oferty: od 18 do 25 zł.
2. Aktualna najniższa cena danego produktu na Allegro to 16 zł.
3. Najniższa cena na Allegro nie mieści się w Twoim zakresie cen – dlatego ustawimy w ofercie najniższą możliwą cenę z tego zakresu: 18 zł.

* **“configuration.changeByPercentage”** - w którym, gdy tworzysz lub edytujesz regułę cenową, możesz określić czy od danej ceny mamy odjąć lub dodać określony % (maksymalnie 50%).

W przypadku reguł cenowych typu “FOLLOW_BY_ALLEGRO_MIN_PRICE” – dodamy lub odejmiemy określony procent do nowej najniższej ceny danego produktu i dodatkowo sprawdzimy, czy otrzymana kwota mieści się w zakresie cen.

W przypadku reguł cenowych typu “EXCHANGE_RATE” – dodamy lub odejmiemy określony procent do ceny w walucie rynku rejestracji, czyli przed przewalutowaniem ceny.

**Przykład dla reguły typu “FOLLOW_BY_ALLEGRO_MIN_PRICE”:**

1. Dla oferty z ceną 20 zł ustawiasz własną regułę cenową, która:
- porównuje Twoją cenę z najniższą ceną na Allegro i dodaje 5%
- zmienia cenę tylko w zakresie od 15 do 25 zł.
2. Aktualna najniższa cena danego produktu na Allegro to 16 zł.
3. Zgodnie z Twoją regułą, najpierw dodajemy do tej kwoty 5% – będzie to 16,80 zł.
4. Sprawdzamy, czy nowa cena mieści się w zakresie od 15 do 25 zł. W tym przykładzie – tak.
5. Aktualizujemy cenę oferty na 16,80 zł.

**Przykład dla reguły typu “EXCHANGE_RATE”:**

1. Wystawiasz ofertę z ceną 15 zł i udostępniasz ją na allegro.sk.
2. Dla rynku allegro.sk ustawiasz regułę cenową, która:
- dodaje 10% do ceny w złotówkach
- korzysta z Przelicznika cen, aby przeliczyć tę kwotę na euro po aktualnym kursie.
4. Aby ustalić cenę na słowacki rynek, najpierw dodamy 10% do ceny w złotówkach – będzie to 16,50 zł.
5. Kurs walut, który jest aktualny dla Przelicznika cen w tym dniu, to 1 PLN = 0,231 EUR. Dlatego po przeliczeniu cena Twojej oferty na allegro.sk będzie równa 3,81 EUR.
6. Kilka dni później w tej samej ofercie obniżasz cenę w złotówkach do 14 zł.
7. Zastosujemy wtedy Twoją regułę, aby zaktualizować cenę w euro. Po dodaniu 10% do nowej ceny w złotówkach otrzymamy 15,40 zł – tę kwotę przeliczymy po aktualnym kursie (1 PLN = 0,246 EUR). Nowa cena na allegro.sk wyniesie zatem 3,79 EUR.

Całość zmian opisaliśmy w [naszym poradniku](https://developer.allegro.pl/tutorials/jak-zarzadzac-ofertami-7GzB2L37ase#reguly-cenowe).

**Jak reguły cenowe wpływają na oferty, które biorą udział w kampaniach?**

Nie zmieniamy automatycznie cen w ofertach, które aktualnie biorą udział w kampaniach lub programach wpływających na cenę bazową oferty. Dzięki temu tymczasowe obniżki nie wpłyną na Twoją politykę cenową. Gdy Twoja oferta zakończy udział w kampanii, ponownie zaczniemy stosować w niej wybraną regułę cenową.

-----

Pricing rules are functionalities that help you manage the offer price without editing it manually. So far, we have provided only one type of rule - [“Exchange Rate”](https://developer.allegro.pl/news/przelicznik-cen-udostepnilismy-nowe-zasoby-do-zarzadzania-cena-w-serwisach-dodatkowych-6MBgWnzx7s7) - with which we automatically convert the price in the additional marketplaces based on the exchange rate published by the European Central Bank.

From now on, you can create your own rules, thanks to which we will convert the price on the base marketplace and additional. You can set rules separately for each marketplace where the offer is visible. It means that in one offer you can include a few pricing rules.

**What have we changed?**

* we have introduced a new type of rule - **“FOLLOW_BY_ALLEGRO_MIN_PRICE”** (Lowest Price on Allegro), owing to which we will automatically change the price in your offer based on:

* your product price in the offer
* the lowest price of the product on Allegro that we check once an hour
* the price range you define within which you want to change your price
* we have added new endpoints:

* [POST /sale/price-automation/rules](https://developer.allegro.pl/documentation#operation/createAutomaticPricingRulesUsingPost) - create a new pricing rule
* [PUT /sale/price-automation/{ruleId}](https://developer.allegro.pl/documentation#operation/updateAutomaticPricingRuleUsingPut) - modify an existing rule
* [DELETE /sale/price-automation/{ruleId}](https://developer.allegro.pl/documentation#operation/deleteAutomaticPricingRuleUsingDelete) - delete an existing rule

* we have added new fields in the existing resources associated with automated price conversion:

* **“default”** - in which we inform whether the given pricing rule was created by Allegro (true) or by the merchant (false). For example, the “EXCHANGE_RATE” (Price Converter) rule, for which we return true, we create automatically based on the offer with delivery price list for additional marketplace. After [the change of offer visibility process on additional marketplaces](https://developer.allegro.pl/news/we-launched-a-new-offer-visibility-process-on-additional-marketplaces-E7bALEKW9c2) we automatically assign the rule for every offer that qualifies to be displayed on the foreign services. Rules marked as “default”: true does not include additional price configuration, which can be set only by the merchant.

* **“configuration.priceRange”** - in which you can specify the price range when you assign the “FOLLOW_BY_ALLEGRO_MIN_PRICE” type of rule (the field cannot be provided for the “EXCHANGE_RATE” rule) using [POST /sale/offer-price-automation-commands](https://developer.allegro.pl/documentation#operation/offerPriceAutomationModificationCommandUsingPOST). Until you provide the price range, we will not update the offer price. That way, we protect you from an automatic price reduction that would not be profitable for you.

**Example 1**

1. For an offer with the price of 20 PLN, you set the “FOLLOW_BY_ALLEGRO_MIN_PRICE” pricing rule. You set the price range for that offer: from 15 to 25 PLN.
2. Currently, the lowest price of a given product on Allegro is 16 PLN.
3. The lowest price on Allegro is within your price range — we will update your offer price to 16 PLN.

**Example 2**

1. For an offer with the price of 20 PLN, you set the “FOLLOW_BY_ALLEGRO_MIN_PRICE” pricing rule. You set the price range for that offer: from 18 to 25 PLN.
2. Currently, the lowest price of a given product on Allegro is 16 PLN.
3. The lowest price on Allegro is outside your price range — we will set the lowest price from that range in your offer: 18 PLN.

* **“configuration.changeByPercentage”** - in which you can specify whether we should add or subtract the provided % (maximally 50%) for the given offer when you create or modify the pricing rule

In the case of the “FOLLOW_BY_ALLEGRO_MIN_PRICE” type of rule - we will add or subtract the defined percent from the new lowest price of the given product and we will additionally check whether the received amount is within the price range.

In the case of the “EXCHANGE_RATE” type of rule - we will add or subtract the provided % from the price in the base marketplace currency, so before the currency conversion of the price.

**Example for the “FOLLOW_BY_ALLEGRO_MIN_PRICE” type of rule:**

1. For an offer with the price of 20 PLN, you set your own pricing rule which:
- compare your price with the lowest price on Allegro and add 5%
- change the price only within the 15 - 25 PLN price range.
2. The current lowest price on Allegro for the given product is 16 PLN.
3. According to your rule, we first add 5% to this amount - it will be 16,80 PLN.
4. We check whether the new price is within the range of 15 to 25 PLN. In this example - yes.
5. We update the offer price to 16,80 PLN.

**Example for the “EXCHANGE_RATE” type of rule:**

1. You list an offer for 15 PLN and share it on allegro.sk.
2. For the allegro.sk marketplace, you set the pricing rule that:
- adds 10% to the price in PLN
- uses the Price Converter to convert the price to EUR at the current exchange rate.
4. To set the price for the Slovak marketplace, firstly, we will add 10% to the price in PLN — that gives 16.50 PLN.
5. The exchange rate applicable for the Price Converter on that day is 1 PLN = 0.231 EUR. That is why, your offer price converted for allegro.sk will be 3.81 EUR.
6. A few days later, you reduce the price in PLN in the same offer to 14 PLN.
7. In that case, we will apply your rule to update the price in EUR. When we add 10% to the new price in PLN, it makes 15.40 PLN — then, we will convert that amount based on the current exchange rate (1 PLN = 0.246 EUR). The new price on allegro.sk will be 3.79 EUR.

We describe all of the changes in [our tutorial](https://developer.allegro.pl/tutorials/how-to-process-list-of-offers-m09BKA5v8H3#pricing-rules).

**How do pricing rules affect offers that participate in campaigns?**

We do not automatically change prices in offers that are participating in campaigns or programs that affect their base price. That way, temporary price reductions will not affect your pricing. When the campaign in which your offer takes part ends, we will start applying the selected pricing rule again.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.