Skip to main content

PromotionRule

Represents the promotion rule that specifies the conditions that must be met to apply the promotion discount.

Added in Saleor 3.17
This API is currently in Feature Preview and can be subject to changes at later point.
type PromotionRule implements Node {
id: ID!
name: String
description: JSON
promotion: Promotion
channels: [Channel!]
rewardValue: PositiveDecimal
rewardValueType: RewardValueTypeEnum
predicateType: PromotionTypeEnum
cataloguePredicate: JSON
orderPredicate: JSON
rewardType: RewardTypeEnum
translation(languageCode: LanguageCodeEnum!): PromotionRuleTranslation
giftIds: [ID!]
giftsLimit: Int
}

Fields

PromotionRule.id ● ID! non-null scalar miscellaneous

PromotionRule.name ● String scalar miscellaneous

Name of the promotion rule.

PromotionRule.description ● JSON scalar miscellaneous

Description of the promotion rule.

PromotionRule.promotion ● Promotion object discounts

Promotion to which the rule belongs.

PromotionRule.channels ● [Channel!] list object channels

List of channels where the rule applies.

Requires one of the following permissions: AUTHENTICATED_APPAUTHENTICATED_STAFF_USER

PromotionRule.rewardValue ● PositiveDecimal scalar miscellaneous

The reward value of the promotion rule. Defines the discount value applied when the rule conditions are met.

Added in Saleor 3.19
This API is currently in Feature Preview and can be subject to changes at later point.

PromotionRule.rewardValueType ● RewardValueTypeEnum enum discounts

The type of reward value of the promotion rule.

PromotionRule.predicateType ● PromotionTypeEnum enum discounts

The type of the predicate that must be met to apply the reward.

Added in Saleor 3.19
This API is currently in Feature Preview and can be subject to changes at later point.

PromotionRule.cataloguePredicate ● JSON scalar miscellaneous

The catalogue predicate that must be met to apply the rule reward.

PromotionRule.orderPredicate ● JSON scalar miscellaneous

The checkout/order predicate that must be met to apply the rule reward.

Added in Saleor 3.19
This API is currently in Feature Preview and can be subject to changes at later point.

PromotionRule.rewardType ● RewardTypeEnum enum discounts

The reward type of the promotion rule.

Added in Saleor 3.19
This API is currently in Feature Preview and can be subject to changes at later point.

PromotionRule.translation ● PromotionRuleTranslation object discounts

Returns translated promotion rule fields for the given language code.

PromotionRule.translation.languageCode ● LanguageCodeEnum! non-null enum miscellaneous

A language code to return the translation for promotion rule.

PromotionRule.giftIds ● [ID!] list scalar miscellaneous

Product variant IDs available as a gift to choose.

Added in Saleor 3.19
This API is currently in Feature Preview and can be subject to changes at later point.

PromotionRule.giftsLimit ● Int scalar miscellaneous

Defines the maximum number of gifts to choose from the gifts list.

Added in Saleor 3.19
This API is currently in Feature Preview and can be subject to changes at later point.

Interfaces

Node interface miscellaneous

An object with an ID

Member Of

Promotion object ● PromotionRuleCreate object ● PromotionRuleCreated object ● PromotionRuleDelete object ● PromotionRuleDeleted object ● PromotionRuleTranslate object ● PromotionRuleUpdate object ● PromotionRuleUpdated object