#8554 [Shopify] Fix incorrect G/L line on credit memo for refund with exchange item
Shopify connector now correctly handles credit memos for refunds involving exchange items by tracking exchange line items separately and emitting offsetting credit memo lines instead of incorrect G/L refund account entries.
- 17files
- 9AL files
- 9objects
Pull request · merged into main (BC30) on 2026-07-21 by onbuyuka · 17 files (+416 -1), 9 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Tracks exchange items from Shopify via new paginated GraphQL queries on both order and refund imports
- Marks exchange-item order lines and skips them during sales invoice creation to prevent double-counting
- Generates synthetic negative-quantity refund lines during refund import to offset the exchange value in credit memos
- Resolves location from the fulfillment data when creating the credit memo line for exchange items
- Fixes incorrect G/L account posting that previously doubled the customer-balance impact of exchange values
- Behaviour changes for users or extensions.
AL objects touched
- Enum 30111 “Shpfy GraphQL Type”, Shopify: modified
- Codeunit 30228 “Shpfy Refunds API”, Shopify: modified
- Page 30146 “Shpfy Refund Lines”, Shopify: modified
- Table 30145 “Shpfy Refund Line”, Shopify: modified
- Codeunit 30246 “Shpfy Create Sales Doc. Refund”, Shopify: modified
- Codeunit 30161 “Shpfy Import Order”, Shopify: modified
- Codeunit 30166 “Shpfy Process Order”, Shopify: modified
- Page 30122 “Shpfy Order Subform”, Shopify: modified
- Table 30119 “Shpfy Order Line”, Shopify: modified
Context
- Work items: AB#637828
- Labels: AL: Apps (W1), Team: Integrations
- Systems: integration
Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).