18 January 2022
OrdersExtensibilityGraphQL
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
customfield to Parcel and ParcelDraft. - [API] Added Set Parcel Custom Type 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
Parceltype:- Added the
customfield to theParceltype.
- Added the
- [GraphQL API] Changed the
ParcelDataDraftTypetype:- Input field
customwas added toParcelDataDraftTypetype
- Input field
- [GraphQL API] Changed the
StagedOrderUpdateActiontype:- Input field
setParcelCustomFieldwas added toStagedOrderUpdateActiontype - Input field
setParcelCustomTypewas added toStagedOrderUpdateActiontype
- Input field
- [GraphQL API] Changed the
AddOrderParcelToDeliverytype:- Input field
customwas added toAddOrderParcelToDeliverytype
- Input field
- [GraphQL API] Changed the
AddStagedOrderParcelToDeliveryOutputtype:- Added the
customfield to theAddStagedOrderParcelToDeliveryOutputtype.
- Added the
- [GraphQL API] Changed the
ParcelDatatype:- Added the
customfield to theParcelDatatype.
- Added the
- [GraphQL API] Changed the
AddStagedOrderParcelToDeliverytype:- Input field
customwas added toAddStagedOrderParcelToDeliverytype
- Input field
- [GraphQL API] Changed the
OrderUpdateActiontype:- Input field
setParcelCustomFieldwas added toOrderUpdateActiontype - Input field
setParcelCustomTypewas added toOrderUpdateActiontype
- Input field
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!
}