---
title: "DiscountAutomaticAppInput"
description: "The input fields to create an app discount"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/inputs/discount-automatic-app-input'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/inputs/discount-automatic-app-input.md'
---
# DiscountAutomaticAppInput

The input fields to create an app discount


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

## Type Signature

`DiscountAutomaticAppInput`

## Input Fields

* `combinesWith`

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

  Identify which discount levels can be merged with this discount.

* `metafields`

  [[MetafieldInput]](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/inputs/metafield-input.md)

  Other metadata linked with the discount.

* `functionId`

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

  Provide the function ID for applying the discount type.

* `startsAt`

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

  The date and time when the discount starts.

* `title`

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

  The title of the discount
  

* `endsAt`

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

  The date and time when the discount concludes. For unlimited discounts, use null.

## Schema Definition

```graphql
input DiscountAutomaticAppInput { 
	combinesWith: DiscountCombinesWithInput
	metafields: [MetafieldInput]
	functionId: String
	startsAt: Date
	title: String
	endsAt: Date 
}
```

## Argument from

* [Mutation](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/mutations/discount-automatic-app-create.md).discountAutomaticAppCreate

  创建App折扣

* [Mutation](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/mutations/discount-automatic-app-update.md).discountAutomaticAppUpdate

  更新自动应用折扣

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

