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!
type: PromotionTypeEnum
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 miscellaneous
Promotion.privateMetadata
● [MetadataItem!]!
non-null object miscellaneous
List of private metadata items. Requires staff permissions to access.
Promotion.privateMetafield
● String
scalar miscellaneous
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
Promotion.privateMetafield.key
● String!
non-null scalar miscellaneous
Promotion.privateMetafields
● Metadata
scalar miscellaneous
Private metadata. Requires staff permissions to access. Use keys
to control which fields you want to include. The default is to include everything.
Promotion.privateMetafields.keys
● [String!]
list scalar miscellaneous
Promotion.metadata
● [MetadataItem!]!
non-null object miscellaneous
List of public metadata items. Can be accessed without permissions.
Promotion.metafield
● String
scalar miscellaneous
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
Promotion.metafield.key
● String!
non-null scalar miscellaneous
Promotion.metafields
● Metadata
scalar miscellaneous
Public metadata. Use keys
to control which fields you want to include. The default is to include everything.
Promotion.metafields.keys
● [String!]
list scalar miscellaneous
Promotion.name
● String!
non-null scalar miscellaneous
Name of the promotion.
Promotion.type
● PromotionTypeEnum
enum discounts
The type of the promotion. Implicate if the discount is applied on catalogue or order level.
Added in Saleor 3.19Promotion.description
● JSON
scalar miscellaneous
Description of the promotion.
Promotion.startDate
● DateTime!
non-null scalar miscellaneous
Start date of the promotion.
Promotion.endDate
● DateTime
scalar miscellaneous
End date of the promotion.
Promotion.createdAt
● DateTime!
non-null scalar miscellaneous
Date time of promotion creation.
Promotion.updatedAt
● DateTime!
non-null scalar miscellaneous
Date time of last update of promotion.
Promotion.rules
● [PromotionRule!]
list object discounts
The list of promotion rules.
Promotion.translation
● PromotionTranslation
object discounts
Returns translated promotion fields for the given language code.
Promotion.translation.languageCode
● LanguageCodeEnum!
non-null enum miscellaneous
A language code to return the translation for promotion.
Promotion.events
● [PromotionEvent!]
list union miscellaneous
The list of events associated with the promotion.
Interfaces
Node
interface miscellaneous
An object with an ID
ObjectWithMetadata
interface miscellaneous
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