Hi Everyone,
I am working on a customization involving the standard Shopify Connector in Dynamics 365 Business Central and would like to know if anyone has encountered a similar scenario or if there is a standard approach that I might be overlooking.
Environment
- Business Central: 28.2
- Standard Microsoft Shopify Connector
- Sales Orders are automatically posted after synchronization.
- Some products are BOM/Assembly items that are exploded into child Sales Lines before posting.
Current Behavior
When a Shopify order is synchronized, both the Shopify line-level discount and the Shopify order-level (cart) discount are combined and imported as a Line Discount on the Sales Line.
This appears to be the standard behavior of the Shopify connector.
The Problem
The issue occurs when a BOM item is exploded.
For example:
- Kit Item: $100
- Shopify Line Discount: $10
- Shopify Order Discount: $5
The connector imports the combined discount ($15) as a Sales Line Discount.
When the BOM is exploded:
- The parent line is replaced by child lines.
- The original line discount information is lost.
- The resulting document total no longer matches the amount already paid by the customer in Shopify.
Proposed Solution
Our client has requested that the discounts be separated as follows:
- Shopify Item/Line Discount → Business Central Line Discount
- Shopify Order/Cart Discount → Business Central Invoice Discount
To achieve this, my approach is:
- Read the original Shopify order data stored in Shpfy Data Capture.
- Extract the actual line-level discount and order-level discount separately.
- Update the Sales Lines with only the line discount.
- Allow the BOM explosion to occur.
- Calculate and apply the Invoice Discount on the Sales Order.
- Validate that the final Sales Order total matches the Shopify payment before automatic posting.
My Questions
- Is there any standard functionality in the Microsoft Shopify Connector that already separates line discounts and order discounts, or is parsing the stored Shopify JSON the only practical approach?
- Has anyone implemented a similar customization for BOM/Assembly items where preserving the distinction between line discounts and order discounts was required?
- Are there any known pitfalls or upgrade concerns with modifying discounts after Shopify synchronization but before the Sales Order is automatically posted?
Any guidance or recommendations would be greatly appreciated.
Thank you!

Report
All responses (
Answers (