Export Discounts by Staff member / Export discounts with conversations

Is there a way to export discounts and include a filter that shows the staff member that created the discount? If not is there a way to export discounts with the conversations included?

We’re doing our yearly discount audit, and these 2 areas are how we are archiving some of the coupons on the site. Does anyone have any suggestions? After poking around with filters and the sales by discount report I cannot figure out a way to do this in a bulk export.

Thanks

Unfortunately there is no way to export the discounts by staff. You would need to use a custom developed solution and utilize the Shopify API.

To export discounts and include a filter that shows the staff member that created the discount with Shopify API, you can use the following code:

var shopifyAPI = require(‘shopify-api-node’);

var client = new shopifyAPI({ shopName: ‘your-shop-name’, apiKey: ‘your-api-key’ });

client.discount.list({ limit: 250 }).then(function(discounts) { var filteredDiscounts = discounts.filter(function(discount) { return discount.created_by_staff_member; }); console.log(filteredDiscounts);