---
title: "DiscountAutomaticBxgyInput"
description: "用于创建或更新自动买 X，送 Y (BXGY) 折扣的输入字段。"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/inputs/discount-automatic-bxgy-input'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/inputs/discount-automatic-bxgy-input.md'
---
# DiscountAutomaticBxgyInput

用于创建或更新自动买 X，送 Y (BXGY) 折扣的输入字段。

- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Input

## Input Fields

* `startsAt`

  [Date](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/date.md)

  折扣开始的日期和时间。

* `customerBuys`

  [DiscountCustomerBuysInput](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/inputs/discount-customer-buys-input.md)

  符合折扣资格的商品以及客户必须购买的每件商品的数量。

* `usesPerOrderLimit`

  [Int](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/int.md)

  折扣可在单个订单中使用的最大次数。若为 `null` 或不传，则表示不限制次数。

* `title`

  [String](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/string.md)

  折扣的标题。

* `endsAt`

  [Date](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/date.md)

  折扣结束的日期和时间。若为 `null` 或不传，则表示该折扣无到期时间。

* `combinesWith`

  [DiscountCombinesWithInput](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/inputs/discount-combines-with-input.md)

  该折扣可叠加使用的折扣类型。若为 `null`、空对象（`{}`）或不传，则该折扣不与其他折扣叠加。

* `customerGets`

  [DiscountCustomerGetsInput](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/inputs/discount-customer-gets-input.md)

  订单中符合条件的商品、每件商品的数量以及折扣总价值。

* `customerSelection`

  [DiscountCustomerSelectionInput](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/inputs/discount-customer-selection-input.md)

  指定可参与此折扣的客户范围。在更新操作中，若为 `null` 或不传，则保持原值不变。

* `usageLimit`

  [Int](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/int.md)

  折扣可使用的最大次数。若为 `null` 或不传，则表示不限制总共使用次数。         
  取值范围：1-99,999,999

* `appliesTimesPerCustomer`

  [Int](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/int.md)

  每个客户可使用该折扣的最大次数。若为 `null` 或不传，则表示不限制使用次数。    
  取值范围：1-99,999,999

## Argument from

* [Mutation](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/mutations/discount-automatic-bxgy-create.md).discountAutomaticBxgyCreate

* [Mutation](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/mutations/discount-automatic-bxgy-update.md).discountAutomaticBxgyUpdate

