Added key to Embedded Prices and Embedded PriceDrafts, and an update action to set keys for both Standalone and Embedded Prices
In addition to identifying Embedded Prices by their id
, you can now use key
as a user-defined unique identifier. By assigning a human-readable key
to Embedded Prices, you have greater flexibility for referencing Embedded Prices.
The key
field was already available for StandalonePrices and this allowed us to assess and confirm its usefulness. Implementing the key
field in Embedded Prices ensures consistency in offerings for both Standalone Prices and Embedded Prices.
Update actions for setting the key
value has also been added for both Embedded Prices and Standalone Prices, allowing you to efficiently update Price keys without needing to bulk import Prices with the updated price keys.
Changes:
- [API] Added
key
field to Price and PriceDraft. - [API] Added Set Price Key update action.
- [API] Added Set Standalone Price Key update action.
- [API] Added the error code DuplicatePriceKey.
- [API] Added ProductPriceKeySet Message.
- [API] Added StandalonePriceKeySet Message.
- [GraphQL API] Changed the
ProductPrice
type:- Added the
key
field to theProductPrice
type.
- Added the
- [GraphQL API] Changed the
ProductPriceSearch
type:- Added the
key
field to theProductPriceSearch
type.
- Added the
- [GraphQL API] Changed the
ProductPriceDataInput
type:- Input field
key
was added toProductPriceDataInput
type
- Input field
- [GraphQL API] Added the following types to the GraphQL schema:
SetProductPriceKey
,SetStandalonePriceKey
,StandalonePriceKeySet
,ProductPriceKeySet
. - [GraphQL API] Changed the
ProductUpdateAction
type:- Input field
setPriceKey
was added toProductUpdateAction
type
- Input field
- [GraphQL API] Changed the
StandalonePriceUpdateAction
type:- Input field
setKey
was added toStandalonePriceUpdateAction
type
- Input field
The following changes were introduced in terms of GraphQL SDL:
extend type ProductPrice {key: String}extend type ProductPriceSearch {key: String}extend input ProductPriceDataInput {key: String}extend input ProductUpdateAction {setPriceKey: SetProductPriceKey}input SetProductPriceKey {priceId: String!key: Stringstaged: Boolean = true}type ProductPriceKeySet implements MessagePayload {variantId: Int!priceId: StringoldKey: Stringkey: Stringstaged: Boolean!type: String!}extend input StandalonePriceUpdateAction {setKey: SetStandalonePriceKey}input SetStandalonePriceKey {key: String}type StandalonePriceKeySet implements MessagePayload {key: StringoldKey: Stringtype: String!}