Promotion
Represents the promotion that allow creating discounts based on given conditions, and is visible to all the customers.
Added in Saleor 3.17type Promotion implements Node, ObjectWithMetadata {
id: ID!
privateMetadata: [MetadataItem!]!
privateMetafield(key: String!): String
privateMetafields(keys: [String!]): Metadata
metadata: [MetadataItem!]!
metafield(key: String!): String
metafields(keys: [String!]): Metadata
name: String!
description: JSON
startDate: DateTime!
endDate: DateTime
createdAt: DateTime!
updatedAt: DateTime!
rules: [PromotionRule!]
translation(languageCode: LanguageCodeEnum!): PromotionTranslation
events: [PromotionEvent!]
}
Fields
Promotion.id ● ID! non-null scalar
Promotion.privateMetadata ● [MetadataItem!]! non-null object
List of private metadata items. Requires staff permissions to access.
Promotion.privateMetafield ● String scalar
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
Added in Saleor 3.3
Promotion.privateMetafield.key●String!non-null scalar
Promotion.privateMetafields ● Metadata scalar
Private metadata. Requires staff permissions to access. Use
Added in Saleor 3.3keysto control which fields you want to include. The default is to include everything.
Promotion.privateMetafields.keys●[String!]list scalar
Promotion.metadata ● [MetadataItem!]! non-null object
List of public metadata items. Can be accessed without permissions.
Promotion.metafield ● String scalar
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
Added in Saleor 3.3
Promotion.metafield.key●String!non-null scalar
Promotion.metafields ● Metadata scalar
Public metadata. Use
Added in Saleor 3.3keysto control which fields you want to include. The default is to include everything.
Promotion.metafields.keys●[String!]list scalar
Promotion.name ● String! non-null scalar
Name of the promotion.
Promotion.description ● JSON scalar
Description of the promotion.
Promotion.startDate ● DateTime! non-null scalar
Start date of the promotion.
Promotion.endDate ● DateTime scalar
End date of the promotion.
Promotion.createdAt ● DateTime! non-null scalar
Date time of promotion creation.
Promotion.updatedAt ● DateTime! non-null scalar
Date time of last update of promotion.
Promotion.rules ● [PromotionRule!] list object
The list of promotion rules.
Promotion.translation ● PromotionTranslation object
Returns translated promotion fields for the given language code.
Promotion.translation.languageCode●LanguageCodeEnum!non-null enumA language code to return the translation for promotion.
Promotion.events ● [PromotionEvent!] list union
The list of events associated with the promotion.
Interfaces
Node interface
An object with an ID
ObjectWithMetadata interface
Returned by
promotion query
Member of
PromotionCountableEdge object ● PromotionCreate object ● PromotionCreated object ● PromotionDelete object ● PromotionDeleted object ● PromotionEnded object ● PromotionRule object ● PromotionStarted object ● PromotionTranslate object ● PromotionUpdate object ● PromotionUpdated object