How to detect the usage of an BxGy on an Order?

It is possible to know how much was discounted to a line item by each of the discount applications, but I can’t find a way to distinguish whether the discount comes from an automatic BxGy or from the other types of discount. Is there a way?

Long ago was this thread but the accepted solution doesn’t answer the question.

From GraphQL Admin API Troubleshooting to Products and Orders APIs

Added admin-api-discounts and removed general-gql-troubles

This documentation suggests there is a way to get the type of discount applied based on querying for it using its ID.

You may try asking the .dev Assistant for an exact code example to test with.

yes, but the discount can change after the order is placed. Moreover, you can’t just get the ID from the order