-
Notifications
You must be signed in to change notification settings - Fork 679
Description
Describe the issue
When users try to synchronize prices through the action available on Shopify Catalogs page. Only the 100 first prices are synchronized. So if the Shopify Catalog contains more than 100 product, only 100 of them will be updated.
This problem results from a difference between two GraphQL requests made during this process:
1) codeunit 30296 "Shpfy GQL CatalogPrices"
'{"query": "query { catalog(id: "gid://shopify/Catalog/{{CatalogId}}") { id priceList {id currency prices(first:100) {edges {cursor node {variant {id product {id}} price {amount} compareAtPrice {amount}}} pageInfo {hasNextPage}}}}}"}'2) codeunit 30297 "Shpfy GQL NextCatalogPrices"
'{"query": "query { catalog(id: "gid://shopify/Catalog/{{CatalogId}}") { id priceList {id prices(first:100, after:"{{After}}") {edges {cursor node {variant {id} price {amount} compareAtPrice {amount}}} pageInfo {hasNextPage}}}}}"}'
Some necessary nodes are missing in NextCatalogPrices. Here is a fixed request :
'{"query": "query { catalog(id: "gid://shopify/Catalog/{{CatalogId}}") { id priceList {id currency prices(first:100, after:"{{After}}") {edges {cursor node {variant {id product {id}} price {amount} compareAtPrice {amount}}} pageInfo {hasNextPage}}}}}"}'
Indeed, the lack of node variant.product.id node in Shopify's response does not allow the connector to work properly, since this json node is used in the codeunit 30290 "Shpfy Catalog API"
Expected behavior
Being able to sync prices for catalogs with more than 100 products.
Steps to reproduce
- Setup Shopify connector to sync catalogs
- Go to page Shpfy Catalogs (30159, List)
- Use action Get Catalog
- Check Sync Prices on a record related to a Shopify Catalog with more than 100 products / prices
- Use action Sync Prices
Additional context
Issue found in version 24.5.23489.24156 and 25.0.23364.25445 of Shopify Connector
It would be great if a patch could be released for Business Central Saas 24.5.
I will provide a fix for a bug
- I will provide a fix for a bug