All Release Notes

Added 'active' field to Standalone Prices

9 September 2022
Enhancement
Pricing and DiscountsGraphQL

With the new 'active' field on Standalone Prices you can activate or deactivate individual Standalone Prices. This allows you to make changes or edits to your prices without them being visible to your customers. When a Standalone Price is not active, it is not considered during price selection. All existing Standalone Prices received an active status.

Changes:

  • [API] Added field active to StandalonePrice
  • [API] Added field active to StandalonePriceDraft
  • [API] Added changeActive update action to StandalonePrice
  • [API] Added StandalonePriceActiveChanged Message
  • [GraphQL API] Added the following types to the GraphQL schema: ChangeStandalonePriceActive, StandalonePriceActiveChanged.
  • [GraphQL API] Changed the CreateStandalonePrice type:
    • Input field active was added to CreateStandalonePrice type
  • [GraphQL API] Changed the StandalonePriceUpdateAction type:
    • Input field changeActive was added to StandalonePriceUpdateAction type
  • [GraphQL API] Changed the StandalonePrice type:
    • StandalonePrice type description is changed
    • Added the active field to the StandalonePrice type.

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"
active: Boolean!
expiresAt: DateTime
}
extend input CreateStandalonePrice {
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
active: Boolean! = true
}
extend input StandalonePriceUpdateAction {
changeActive: ChangeStandalonePriceActive
}
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
input ChangeStandalonePriceActive {
active: Boolean!
}
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
type StandalonePriceActiveChanged implements MessagePayload {
active: Boolean!
oldActive: Boolean!
type: String!
}