MyWorks Sync supports syncing orders containing discounts / coupon codes into Xero in several different ways - all controlled within MyWorks Sync > Settings > Order in our sync on your site.
Syncing Discounts to the Xero "Discount" sub-total field:
By default, MyWorks Sync will sync any discounts in a WooCommerce order to the Xero Sub-total field for Discounts. This means having your Discount sub-total field enabled in Accounts and settings in QuickBooks. If this setting is not enabled in Xero, discounts can not sync with the order.
This would be shown in the Xero order like the following example.
Syncing Discounts within the original product line item:
Alternatively, MyWorks can sync discounts within the original line item. For example, if the item in WooCommerce is $10, with a 20% discount bringing it to $8, we'd sync it as a single $8 line item in Xero.
This setting can be enabled in MyWorks Sync > Settings > Order: Sync Order discounts within the original product line item.
Syncing Discounts as an additional negative line item:
Or MyWorks Sync can sync discounts an additional, separate, negative line item.
For example, if the item in WooCommerce is $10, with a 20% discount bringing it to $8, we'd sync the line item for the product at $10 and we would sync an additional line item using that same Xero product with a negative line of $2.
This setting can be enabled in MyWorks Sync > Settings > Order: Sync Order discounts as an additional negative line.