Creates a
[buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y)
that's automatically applied on a cart and at checkout.
> Note:
> To create code discounts, use the
[`discountCodeBxgyCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBxgyCreate)
mutation.
Access Scopes
Apps must have `write_discounts` access scope.
Arguments
automaticBxgyDiscount:
DiscountAutomaticBxgyInput! -
The input data used to create the automatic BXGY discount.
Returns
automaticDiscountNode:
DiscountAutomaticNode
The automatic discount that was created.
userErrors:
DiscountUserError!
The list of errors that occurred from executing the mutation.