ScriptDiscountApplication

Version 2019-04

Script discount applications capture the intentions of a discount that was created by a Shopify Script for an order's line item or shipping line.

Show definition
"""
Script discount applications capture the intentions of a discount that
was created by a Shopify Script for an order's line item or shipping line.
"""
type ScriptDiscountApplication implements DiscountApplication {
  """
  The method by which the discount's value is allocated to its entitled items.
  """
  allocationMethod: DiscountApplicationAllocationMethod!
  """
  The description of the application as defined by the Script.
  """
  description: String!
  """
  An ordered index that can be used to identify the discount application and indicate the precedence
  of the discount application for calculations.
  """
  index: Int!
  """
  How the discount amount is distributed on the discounted lines.
  """
  targetSelection: DiscountApplicationTargetSelection!
  """
  Whether the discount is applied on line items or shipping lines.
  """
  targetType: DiscountApplicationTargetType!
  """
  The title of the application as defined by the Script.
  """
  title: String!
  """
  The value of the discount application.
  """
  value: PricingValue!
}

Implements

Fields

allocationMethod (DiscountApplicationAllocationMethod!)

The method by which the discount's value is allocated to its entitled items.

index (Int!)

An ordered index that can be used to identify the discount application and indicate the precedence of the discount application for calculations.

targetSelection (DiscountApplicationTargetSelection!)

How the discount amount is distributed on the discounted lines.

targetType (DiscountApplicationTargetType!)

Whether the discount is applied on line items or shipping lines.

title (String!)

The title of the application as defined by the Script.

value (PricingValue!)

The value of the discount application.

Deprecated fields

Show/Hide
description (String!) deprecated

The description of the application as defined by the Script.

Deprecation warning

Use title instead

Version 2019-07 (Latest)

Script discount applications capture the intentions of a discount that was created by a Shopify Script for an order's line item or shipping line.

Show definition
"""
Script discount applications capture the intentions of a discount that
was created by a Shopify Script for an order's line item or shipping line.
"""
type ScriptDiscountApplication implements DiscountApplication {
  """
  The method by which the discount's value is allocated to its entitled items.
  """
  allocationMethod: DiscountApplicationAllocationMethod!
  """
  The description of the application as defined by the Script.
  """
  description: String!
  """
  An ordered index that can be used to identify the discount application and indicate the precedence
  of the discount application for calculations.
  """
  index: Int!
  """
  How the discount amount is distributed on the discounted lines.
  """
  targetSelection: DiscountApplicationTargetSelection!
  """
  Whether the discount is applied on line items or shipping lines.
  """
  targetType: DiscountApplicationTargetType!
  """
  The title of the application as defined by the Script.
  """
  title: String!
  """
  The value of the discount application.
  """
  value: PricingValue!
}

Implements

Fields

allocationMethod (DiscountApplicationAllocationMethod!)

The method by which the discount's value is allocated to its entitled items.

index (Int!)

An ordered index that can be used to identify the discount application and indicate the precedence of the discount application for calculations.

targetSelection (DiscountApplicationTargetSelection!)

How the discount amount is distributed on the discounted lines.

targetType (DiscountApplicationTargetType!)

Whether the discount is applied on line items or shipping lines.

title (String!)

The title of the application as defined by the Script.

value (PricingValue!)

The value of the discount application.

Deprecated fields

Show/Hide
description (String!) deprecated

The description of the application as defined by the Script.

Deprecation warning

Use title instead

Version 2019-10 (Release candidate)

Script discount applications capture the intentions of a discount that was created by a Shopify Script for an order's line item or shipping line.

Show definition
"""
Script discount applications capture the intentions of a discount that
was created by a Shopify Script for an order's line item or shipping line.
"""
type ScriptDiscountApplication implements DiscountApplication {
  """
  The method by which the discount's value is allocated to its entitled items.
  """
  allocationMethod: DiscountApplicationAllocationMethod!
  """
  The description of the application as defined by the Script.
  """
  description: String!
  """
  An ordered index that can be used to identify the discount application and indicate the precedence
  of the discount application for calculations.
  """
  index: Int!
  """
  How the discount amount is distributed on the discounted lines.
  """
  targetSelection: DiscountApplicationTargetSelection!
  """
  Whether the discount is applied on line items or shipping lines.
  """
  targetType: DiscountApplicationTargetType!
  """
  The title of the application as defined by the Script.
  """
  title: String!
  """
  The value of the discount application.
  """
  value: PricingValue!
}

Implements

Fields

allocationMethod (DiscountApplicationAllocationMethod!)

The method by which the discount's value is allocated to its entitled items.

index (Int!)

An ordered index that can be used to identify the discount application and indicate the precedence of the discount application for calculations.

targetSelection (DiscountApplicationTargetSelection!)

How the discount amount is distributed on the discounted lines.

targetType (DiscountApplicationTargetType!)

Whether the discount is applied on line items or shipping lines.

title (String!)

The title of the application as defined by the Script.

value (PricingValue!)

The value of the discount application.

Deprecated fields

Show/Hide
description (String!) deprecated

The description of the application as defined by the Script.

Deprecation warning

Use title instead

Sign up for a Partner account to get started.

Sign up