All Release Notes

Added 'priceMode' field to CustomLineItemDraft and CustomLineItemImportDraft

17 August 2022
Enhancement
CartsOrdersPricing and DiscountsGraphQL

You can now set the price mode for a Custom Line Item when adding the Custom Line Item to a Cart.

Previously, new Custom Line Items had the Standard price mode set by default for backwards compatibilty. You could only change the price mode on an existing Custom Line Item with the Change CustomLineItem Price Mode update action.

Changes:

  • [API] Added optional priceMode field to CustomLineItemDraft and CustomLineItemImportDraft.
  • [API] Added priceMode field to Add CustomLineItem update action on Cart and OrderEdit.
  • [GraphQL API] Changed the CustomLineItemDraftOutput type:
    • Added the priceMode field to the CustomLineItemDraftOutput type.
  • [GraphQL API] Changed the CustomLineItemImportDraft type:
    • Input field priceMode was added to CustomLineItemImportDraft type
  • [GraphQL API] Changed the AddCartCustomLineItem type:
    • Input field priceMode was added to AddCartCustomLineItem type
  • [GraphQL API] Changed the AddStagedOrderCustomLineItem type:
    • Input field priceMode was added to AddStagedOrderCustomLineItem type
  • [GraphQL API] Changed the CustomLineItemDraft type:
    • Input field priceMode was added to CustomLineItemDraft type

The following changes were introduced in terms of GraphQL SDL:

extend type CustomLineItemDraftOutput {
priceMode: CustomLineItemPriceMode!
}
extend input CustomLineItemImportDraft {
priceMode: CustomLineItemPriceMode
}
extend input AddCartCustomLineItem {
priceMode: CustomLineItemPriceMode = Standard
}
extend input AddStagedOrderCustomLineItem {
priceMode: CustomLineItemPriceMode = Standard
}
extend input CustomLineItemDraft {
priceMode: CustomLineItemPriceMode
}