All Release Notes

Introduced Countries to Stores

10 November 2022
Enhancement
Project configurationMessages/SubscriptionsGraphQL

We have released countries in Stores in public beta. You can now define countries on Stores and filter prices by country in Product Projections and Cart/Order/Shopping List Line Items.

Changes:

  • [API] Added type StoreCountry to Stores.
  • [API] Added countries field to Store and StoreDraft.
  • [API] Added Add Country, Remove Country, and Set Countries update actions to Stores.
  • [API] Added optional countries field to StoreCreated Message.
  • [API] Added StoreCountriesChanged Message.
  • [API] Added the error code CountryNotConfiguredInStore.
  • [GraphQL API] Added the following types to the GraphQL schema: AddStoreCountry, RemoveStoreCountry, SetStoreCountries, StoreCountriesChanged, StoreCountry, StoreCountryInput.
  • [GraphQL API] Changed the StoreUpdateAction type:
    • Input field addCountry was added to StoreUpdateAction type
    • Input field setCountries was added to StoreUpdateAction type
    • Input field removeCountry was added to StoreUpdateAction type
  • [GraphQL API] Changed the CreateStore type:
    • Input field countries was added to CreateStore type
  • [GraphQL API] Changed the StoreCreated type:
    • Added the countries field to the StoreCreated type.
  • [GraphQL API] Changed the Store type:
    • Added the countries field to the Store type.

The following changes were introduced in terms of GraphQL SDL:

extend type StoreCreated {
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
countries: [StoreCountry!]
}
extend type Store {
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
countries: [StoreCountry!]
}
extend input StoreUpdateAction {
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
addCountry: AddStoreCountry
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
removeCountry: RemoveStoreCountry
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
setCountries: SetStoreCountries
}
extend input CreateStore {
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
countries: [StoreCountryInput!]
}
input AddStoreCountry {
country: StoreCountryInput!
}
input RemoveStoreCountry {
country: StoreCountryInput!
}
input SetStoreCountries {
countries: [StoreCountryInput!]
}
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
type StoreCountriesChanged implements MessagePayload {
addedCountries: [StoreCountry!]
removedCountries: [StoreCountry!]
type: String!
}
type StoreCountry {
code: Country!
}
input StoreCountryInput {
code: Country!
}