15 August 2022
Pricing and DiscountsGraphQL
With Staged Standalone Prices, you can make changes or edits to Standalone Prices without them being visible to your customers. This allows you to prepare and test your changes before applying them with confidence when they are ready. Staged Standalone Prices support DiscountedPrice which means that you can assess how a given Product Discount would affect your Prices before making them live. Staged Standalone Prices is currently available in public beta.
Changes:
- [API] Added StagedStandalonePrice to Standalone Prices API.
- [API] Added field
stagedto StandalonePrice. - [API] Added
applyStagedChangesupdate action to StandalonePrice. - [API] Added
StandalonePriceStagedChangesAppliedMessage. - [API] Added field
stagedtoStandalonePriceValueChangedMessage - [GraphQL API] Added the following types to the GraphQL schema:
ApplyStagedChanges,StagedStandalonePrice,StandalonePriceStagedChangesApplied. - [GraphQL API] Changed the
StandalonePriceUpdateActiontype:- Input field
applyStagedChangeswas added toStandalonePriceUpdateActiontype
- Input field
- [GraphQL API] Changed the
ChangeStandalonePriceValuetype:- Input field
stagedwas added toChangeStandalonePriceValuetype
- Input field
- [GraphQL API] Changed the
StandalonePricetype:- Added the
stagedfield to theStandalonePricetype.
- Added the
- [GraphQL API] Changed the
StandalonePriceValueChangedtype:- Added the
stagedfield to theStandalonePriceValueChangedtype.
- Added the
The following changes were introduced in terms of GraphQL SDL:
extend type StandalonePrice {
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
staged: StagedStandalonePrice
}
extend input StandalonePriceUpdateAction {
applyStagedChanges: ApplyStagedChanges
}
extend input ChangeStandalonePriceValue {
"""
default is `false`
BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
"""
staged: Boolean
}
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
input ApplyStagedChanges {
dummy: String
}
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
type StagedStandalonePrice {
value: BaseMoney!
discounted: DiscountedProductPriceValue
}
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
type StandalonePriceStagedChangesApplied implements MessagePayload {
stagedChanges: StagedStandalonePrice!
type: String!
}
extend type StandalonePriceValueChanged {
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
staged: Boolean!
}