All Release Notes

Parcels can now be extended with Custom Fields.

18 January 2022
Enhancement
OrdersCustomizationGraphQL

You can now extend the Parcel object on the Order resource with Custom Fields. With these you can, for example, add meta data associated with your ERP system to the deliveries of the Orders.

Changes:

  • [API] Added custom field to Parcel and ParcelDraft.
  • [API] Added Set Parcel CustomType and Set Parcel CustomField update actions to Orders and Order Edits.
  • [GraphQL API] Added the following types to the GraphQL schema: SetOrderParcelCustomField, SetOrderParcelCustomType, SetStagedOrderParcelCustomField, SetStagedOrderParcelCustomFieldOutput, SetStagedOrderParcelCustomType, SetStagedOrderParcelCustomTypeOutput.
  • [GraphQL API] Changed the Parcel type:
    • Added the custom field to the Parcel type.
  • [GraphQL API] Changed the ParcelDataDraftType type:
    • Input field custom was added to ParcelDataDraftType type
  • [GraphQL API] Changed the StagedOrderUpdateAction type:
    • Input field setParcelCustomField was added to StagedOrderUpdateAction type
    • Input field setParcelCustomType was added to StagedOrderUpdateAction type
  • [GraphQL API] Changed the AddOrderParcelToDelivery type:
    • Input field custom was added to AddOrderParcelToDelivery type
  • [GraphQL API] Changed the AddStagedOrderParcelToDeliveryOutput type:
    • Added the custom field to the AddStagedOrderParcelToDeliveryOutput type.
  • [GraphQL API] Changed the ParcelData type:
    • Added the custom field to the ParcelData type.
  • [GraphQL API] Changed the AddStagedOrderParcelToDelivery type:
    • Input field custom was added to AddStagedOrderParcelToDelivery type
  • [GraphQL API] Changed the OrderUpdateAction type:
    • Input field setParcelCustomField was added to OrderUpdateAction type
    • Input field setParcelCustomType was added to OrderUpdateAction type

The following changes were introduced in terms of GraphQL SDL:

extend type Parcel {
custom: CustomFieldsType
}
extend type ParcelData {
custom: CustomFieldsCommand
}
extend type AddStagedOrderParcelToDeliveryOutput {
custom: CustomFieldsCommand
}
extend input AddStagedOrderParcelToDelivery {
custom: CustomFieldsDraft
}
extend input ParcelDataDraftType {
custom: CustomFieldsDraft
}
extend input StagedOrderUpdateAction {
setParcelCustomField: SetStagedOrderParcelCustomField
setParcelCustomType: SetStagedOrderParcelCustomType
}
extend input AddOrderParcelToDelivery {
custom: CustomFieldsDraft
}
extend input OrderUpdateAction {
setParcelCustomField: SetOrderParcelCustomField
setParcelCustomType: SetOrderParcelCustomType
}
input SetOrderParcelCustomField {
name: String!
value: String
parcelId: String!
}
input SetOrderParcelCustomType {
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
parcelId: String!
}
input SetStagedOrderParcelCustomField {
name: String!
value: String
parcelId: String!
}
type SetStagedOrderParcelCustomFieldOutput implements StagedOrderUpdateActionOutput {
type: String!
name: String!
value: Json
parcelId: String!
}
input SetStagedOrderParcelCustomType {
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
parcelId: String!
}
type SetStagedOrderParcelCustomTypeOutput implements StagedOrderUpdateActionOutput {
type: String!
custom: CustomFieldsCommand!
parcelId: String!
}