This issue is two-fold. The first is that automatic discounts do not appear at all in checkout created/updated webhooks. Discount codes that are entered trigger checkout updated webhooks, but we miss the already-applied automatic discounts.
The second is that while the pixel does contain the automatically-applied discounts in its payload, it does not fire again when the user enters discount codes. If the user enters a discount and then edits something like contact info or shipping address, the pixel updates finally fire and do contain the entered discounts, but this is incredibly unreliable.
I would love to not have to rely on the pixel at all since it rarely fires due to Shop App checkouts not being able to fire pixel events.
One solution I found but dislike is to use the cart_token and fetch the current cart with graph QL. The issue with this method is the payload does not contain shipping discounts…
In any case I would need cumbersome logic to aggregate and merge discounts from the cart. Is there not a way to reliably get cart discounts from a single source? I’m talking all the discounts, including automatic, order-level, product/collection-level, and shipping.