Discount Codes In Customer Sales Channel not being tracked by reports

Hi,

All of our shopify traffic comes through our custom store/Sales Channel. We use the js-buy-sdk which interacts with the storefront api, this has been tested with js-buy-sdk as well as just using the storefront graphql api.

The problem is the discounts applied to orders in our store don’t seems to be tracked. This means the sales by discount report is blank even though there have clearly been sales with discount codes in this date range.

It also means when I use the graphQL admin api and query for codeDiscount the asyncUsageCount values of the code is always 0. Even when the code has been used 100s if not 1000s of times.

Orders show up with discounts applied

A point in the right direction would be appreciated.

1 Like

Hi SimplyCoffee,

It sounds like your custom store and Sales Channel implementation isn’t correctly registering the discount code usage in a way that Shopify’s reporting system can track. When you create orders using the JS Buy SDK it doesn’t interact with the same flows as a normal checkout process would, which could be why these discount usages aren’t being tracked.

It could be worth opening an issue on this directly on the JS Buy SDK GitHub repo here, as the people there would have the most context on this library.

Hope this helps,