[NEWS] "Ważne informacje dla sprzedającego" w zamówieniu - określ, czy pole ma być obowiązkowe / "Important information for the seller" in the order - set whether the field should be required
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 244
- Fork
- 40
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Podczas składania zamówienia kupujący może wprowadzić opcjonalną wiadomość dla sprzedającego. Wyświetlimy ją w polu "messageToSeller", gdy pobierzesz zamówienie poprzez:
- [GET /order/checkout-forms](https://developer.allegro.pl/documentation/#operation/getListOfOrdersUsingGET),
- [GET /order/checkout-forms/{id}](https://developer.allegro.pl/documentation/#operation/getOrdersDetailsUsingGET).
Sprzedający mógł dotychczas określić, czy podczas zakupu w formularzu opcji dostawy i płatności:
- wyświetlamy kupującemu pole "Ważne informacje dla sprzedającego" jako opcjonalne,
- nie wyświetlamy kupującemu pola "Ważne informacje dla sprzedającego".
**Co zmieniliśmy?**
Zgodnie [z zapowiedzią](https://developer.allegro.pl/news/wazne-informacje-dla-sprzedajacego-w-zamowieniu-ustaw-czy-pole-ma-byc-opcjonalne-czy-ukryte-E7Zr6xKEVfG), od teraz, sprzedający może również ustawić pole "Ważne informacje dla sprzedającego" jako obowiązkowe. Dlatego, w strukturze oferty, w obiekcie "**messageToSellerSettings**":
- w polu "**mode**" możesz przekazać nową wartość **REQUIRED**, dzięki czemu w formularzu dostawy i płatności poinformujemy kupującego o konieczności uzupełnienia wiadomości dla sprzedającego,
- wprowadziliśmy nowe pole "**hint**", w którym sprzedający uzupełni podpowiedź dla kupującego.
Podpowiedź w polu "**hint**" możesz przekazać tylko dla wartości REQUIRED w polu "**mode**" - będzie to także dla tej opcji **obowiązkowe**.
**Przykład prawidłowo uzupełnionej struktury:**
```
{
"id": "7276261934",
"name": "iPhone",
…
"messageToSellerSettings": {
"mode": "REQUIRED" – określ, czy “Ważna wiadomość do
sprzedającego“ ma być wymagana
(REQUIRED), opcjonalna (OPTIONAL), czy
ukryta (HIDDEN),
"hint": "Wybierz wzór" – podpowiedź dla kupującego - dostępna i
wymagana tylko dla wartości REQUIRED w
polu “mode“.
}
…
}
```
Wartość **REQUIRED** dostępna jest tylko w wybranych kategoriach. Dlatego, w odpowiedzi dla[ GET /sale/categories/{categoryId}](https://developer.allegro.pl/documentation/#operation/getCategoryUsingGET_1) w polu "**options**" wprowadziliśmy nową flagę "**sellerCanRequirePurchaseComments**". Dzięki niej dowiesz się, czy w danej kategorii sprzedający może skorzystać z obowiązkowej "Ważnej informacji dla sprzedającego".
Informacje o zmianie znajdziesz również w [naszym poradniku](https://developer.allegro.pl/tutorials/jak-jednym-requestem-wystawic-oferte-powiazana-z-produktem-D7Kj9gw4xFA#wazne-informacje-dla-sprzedajacego).
--------
When placing an order, the buyer can enter an optional message for the seller, which we will then display in the "messageToSeller" field when you retrieve the order through:
- [GET /order/checkout-forms](https://developer.allegro.pl/documentation/#operation/getListOfOrdersUsingGET),
- [GET /order/checkout-forms/{id}](https://developer.allegro.pl/documentation/#operation/getOrdersDetailsUsingGET).
The seller could previously specify whether to:
- display the "Important information for the seller" field to the buyer as optional,
- hide the "Important information for the seller" field from the buyer.
**What changes have we made?**
[As announced](https://developer.allegro.pl/news/important-information-for-the-seller-in-the-order-set-whether-the-field-should-be-optional-or-hidden-eK8O9v75ncP), from now on, the seller can also set the "Important information for the seller" field for the buyer as required. Therefore, in the offer structure, in the "**messageToSellerSettings**" object:
- in the "**mode**" field you can pass new value **REQUIRED**, thanks to which in the delivery and payment form we will inform the buyer to complete the message for the seller,
- we have introduced a new field "**hint**", where the seller will enter a hint for the buyer.
You can pass a hint in the "**hint**" field only for **REQUIRED** value in "**mode**" field - it will be as well **mandatory** for this option.
**Sample request structure:**
```
{
"id": "7276261934",
"name": "iPhone",
…
"messageToSellerSettings": {
"mode": "REQUIRED" – specify whether “Important
message to seller“ should be required
(REQUIRED), optional (OPTIONAL)
or hidden (HIDDEN),
"hint": "Select a pattern" – hint for the buyer - available
the REQUIRED value in the
“mode“ field.
}
…
}
```
The **REQUIRED** value is only available for selected categories. Therefore, in the response for [GET /sale/categories/{categoryId}](https://developer.allegro.pl/documentation/#operation/getCategoryUsingGET_1) in the "**options**" field we introduced a new flag "**sellerCanRequirePurchaseComments**". It will indicate whether a seller in a given category can use the required "Important information for the seller".
You can also find information about the change in [our guide](https://developer.allegro.pl/tutorials/list-offer-assigned-product-one-request-D7Kj9M71Bu6#important-information-for-the-seller).
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.