Promotion Object
Represents the promotion that allow creating discounts based on given conditions, and is visible to all the customers.
type 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!
externalReference: String
type: PromotionTypeEnum
description: JSON
startDate: DateTime!
endDate: DateTime
createdAt: DateTime!
updatedAt: DateTime!
rules: [PromotionRule!]
translation(languageCode: LanguageCodeEnum!): PromotionTranslation
events: [PromotionEvent!]
}
Interfaces
Fields
id
id · ID!
privateMetadata
privateMetadata · [MetadataItem!]!
List of private metadata items. Requires staff permissions to access.
privateMetafield
privateMetafield · String
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
key
key · String!
privateMetafields
privateMetafields · Metadata
Private metadata. Requires staff permissions to access. Use keys to control which fields you want to include. The default is to include everything.
keys
keys · [String!]
metadata
metadata · [MetadataItem!]!
List of public metadata items. Can be accessed without permissions.
metafield
metafield · String
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
key
key · String!
metafields
metafields · Metadata
Public metadata. Use keys to control which fields you want to include. The default is to include everything.
keys
keys · [String!]
name
name · String!
Name of the promotion.
externalReference
externalReference · String
External ID of this promotion.
Added in Saleor 3.23type
type · PromotionTypeEnum
The type of the promotion. Implicate if the discount is applied on catalogue or order level.
Added in Saleor 3.19description
description · JSON
Description of the promotion.
startDate
startDate · DateTime!
Start date of the promotion.
endDate
endDate · DateTime
End date of the promotion.
createdAt
createdAt · DateTime!
Date time of promotion creation.
updatedAt
updatedAt · DateTime!
Date time of last update of promotion.
rules
rules · [PromotionRule!]
The list of promotion rules.
translation
translation · PromotionTranslation
Returns translated promotion fields for the given language code.
languageCode
languageCode · LanguageCodeEnum!
A language code to return the translation for promotion.
events
events · [PromotionEvent!]
The list of events associated with the promotion.
Used by
- PromotionCountableEdge (objects)
- PromotionCreate (objects)
- PromotionCreated (objects)
- PromotionDelete (objects)
- PromotionDeleted (objects)
- PromotionEnded (objects)
- PromotionRule (objects)
- PromotionStarted (objects)
- PromotionTranslate (objects)
- PromotionUpdate (objects)
- PromotionUpdated (objects)
- promotion (queries)
Schema: Saleor 3.23.43. Download SDL.