All Release Notes

Return Items can now be extended with Custom Fields.

19 January 2022
Enhancement
OrdersCustomizationGraphQL

You can now extend the LineItemReturnItem as well as the CustomLineItemReturnItem object on the Order resource with Custom Fields. With these you can, for example, add the courier name or their shipment IDs to the return items of the Orders.

Changes:

  • [API] Added custom field to LineItemReturnItem and CustomLineItemReturnItem.
  • [API] Added custom field to LineItemReturnItemDraft and CustomLineItemReturnItemDraft.
  • [API] Added Set ReturnItem Custom Type and Set ReturnItem CustomField update actions to Orders and Order Edits.
  • [GraphQL API] Added the following types to the GraphQL schema: SetOrderReturnItemCustomField, SetOrderReturnItemCustomType SetStagedOrderReturnItemCustomField, SetStagedOrderReturnItemCustomFieldOutput, SetStagedOrderReturnItemCustomType, SetStagedOrderReturnItemCustomTypeOutput.
  • [GraphQL API] Changed the CustomLineItemReturnItem type:
    • Added the custom field to the CustomLineItemReturnItem type.
  • [GraphQL API] Changed the ReturnItem type:
    • Added the custom field to the ReturnItem type.
  • [GraphQL API] Changed the StagedOrderUpdateAction type:
    • Input field setReturnItemCustomField was added to StagedOrderUpdateAction type
    • Input field setReturnItemCustomType was added to StagedOrderUpdateAction type
  • [GraphQL API] Changed the ReturnItemDraftType type:
    • Input field custom was added to ReturnItemDraftType type
  • [GraphQL API] Changed the ReturnItemDraftTypeOutput type:
    • Added the custom field to the ReturnItemDraftTypeOutput type.
  • [GraphQL API] Changed the OrderUpdateAction type:
    • Input field setReturnItemCustomField was added to OrderUpdateAction type
    • Input field setReturnItemCustomType was added to OrderUpdateAction type
  • [GraphQL API] Changed the LineItemReturnItem type:
    • Added the custom field to the LineItemReturnItem type.

The following changes were introduced in terms of GraphQL SDL:

extend type CustomLineItemReturnItem {
custom: CustomFieldsType
}
extend interface ReturnItem {
custom: CustomFieldsType
}
extend type ReturnItemDraftTypeOutput {
custom: CustomFieldsCommand
}
extend type LineItemReturnItem {
custom: CustomFieldsType
}
extend input StagedOrderUpdateAction {
setReturnItemCustomField: SetStagedOrderReturnItemCustomField
setReturnItemCustomType: SetStagedOrderReturnItemCustomType
}
extend input ReturnItemDraftType {
custom: CustomFieldsDraft
}
extend input OrderUpdateAction {
setReturnItemCustomField: SetOrderReturnItemCustomField
setReturnItemCustomType: SetOrderReturnItemCustomType
}
input SetOrderReturnItemCustomField {
name: String!
value: String
returnItemId: String!
}
input SetOrderReturnItemCustomType {
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
returnItemId: String!
}
input SetStagedOrderReturnItemCustomField {
name: String!
value: String
returnItemId: String!
}
type SetStagedOrderReturnItemCustomFieldOutput implements StagedOrderUpdateActionOutput {
type: String!
name: String!
value: Json
returnItemId: String!
}
input SetStagedOrderReturnItemCustomType {
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
returnItemId: String!
}
type SetStagedOrderReturnItemCustomTypeOutput implements StagedOrderUpdateActionOutput {
type: String!
custom: CustomFieldsCommand!
returnItemId: String!
}