Fixed PriceList prices not behaving as expected

Solved
sebastjans
Tourist
5 1 2
We are trying to implement custom international prices (calculated our own internal rules) using PriceLists and PriceListPrices https://shopify.dev/api/admin/graphql/reference/products-and-collections/pricelist#prices-2021-07
New PriceList for a new currency (for example BGN (Bulgarian Lev)) is created via API with priceListCreate mutation.
The sentence on the documentation page "If a PriceListPrice is defined, then a specific fixed price is applied for the product. This price applies irrespective of foreign exchange rules, or rounding." found here https://shopify.dev/api/examples/product-price-lists#update-an-existing-price-list So, we set the prices on this PriceList by using priceListFixedPricesAdd mutation, which is successful. Price should now be whatever we set in the previous step, when previewing this currency. But that is not the case, when using the currency preview, the price remains the "Automatically calculated" price provided by Shopify, and is NOT our custom fixed price we added via priceListFixedPricesAdd mutation.
 
While debugging we noticed that PriceLists is automatically and immediately populated with EUR (shop default) prices for every variant right after PriceList creation. Could this possibly interfere with the process? Seems a bit strange to have BGN PriceList populated with EUR values...
 
Steps to reproduce the issue:
1. ensure no PriceList with BGN set as currency exists (or destroy them with mutation)
2. run priceListCreate mutation with BGN currency, to get new PriceList in BGN. We remember it's ID.
3. Query for the PriceList via ID and prices listed on it. They are already there for all our Product variants, but the currency symbol is for every variant is in EUR (even though we would assume nothing should be in the list, because we just created it!, or at least, symbol should match the PriceList, and be BGN)??
4.Then, we run the mutation to create custom price priceListFixedPricesAdd
5. query Query for PriceList to list all the prices, we see BGN custom prices added in previous step for the variants passed.
 
So contrary to "If a PriceListPrice is defined, then a specific fixed price is applied for the product." Shopify is still somehow reading EURo prices and auto-converting them.
 
If there is any Shopify internal developer reading this, I am happy to provide Shop info as well as specific IDs of the resources mentioned above.
Accepted Solution (1)

Accepted Solutions
sebastjans
Tourist
5 1 2

This is an accepted solution.

Managed to solve it. Wasn't apparent, but priceListCreate allowed me to create PriceList without any "contextRule". I would assume then it would apply for every customer that selected that currency. But no, you MUST pass in contextRule{ countries: [......] } for every country that should have this currency available. 

Hopefully this helps someone else struggling with the same issue.

 

View solution in original post

Reply 1 (1)
sebastjans
Tourist
5 1 2

This is an accepted solution.

Managed to solve it. Wasn't apparent, but priceListCreate allowed me to create PriceList without any "contextRule". I would assume then it would apply for every customer that selected that currency. But no, you MUST pass in contextRule{ countries: [......] } for every country that should have this currency available. 

Hopefully this helps someone else struggling with the same issue.