Receive goods
There are two ways to announce the buyer has received goods:
- using the actual delivery, which is preferred over the delivered indicator, as it is more precise regarding partial deliveries.
- using the delivered indicator
Actual delivery history
Section titled “Actual delivery history”The delivery history contains the actual physical deliveries. With the actual deliveries versus the planned deliveries, Tradecloud can calculate which goods should still be delivered or are overdue.
The actual delivery history is matched against the planned delivery schedule by date and quantity, not by delivery line position – deliveryHistory.position and deliverySchedule.position do not have to use the same values.
There are three ways to send the delivery history to Tradecloud:
Send the delivery history by updating an order using the /order endpoint
Section titled “Send the delivery history by updating an order using the /order endpoint”Send the actual delivery schedule by setting the lines.deliveryHistory field when your ERP system supports a delivery schedule natively, and update the order using the Send order endpoint.
Send the actual delivery by setting the lines.actualDelivery field when using the single delivery per order line feature, and update the order using the Send single delivery order endpoint.
Send delivery events using the /api-connector/order/deliveries endpoint
Section titled “Send delivery events using the /api-connector/order/deliveries endpoint”Send delivery events for one or multiple existing order lines using the Send order deliveries events endpoint. This will append the deliveries to the order line’s delivery history.
Replace the delivery history using the /api-connector/order/deliveryHistory endpoint
Section titled “Replace the delivery history using the /api-connector/order/deliveryHistory endpoint”Replace the delivery history for one or multiple existing order lines using the Send order delivery history endpoint. Unlike /order/deliveries, which appends deliveries, this endpoint replaces the delivery history per order line with the deliveries in the request.
Only the lines present in the request are affected; lines not included are left untouched. To clear the delivery history of a line, send that line with an empty deliveryHistory array. As with the other methods, the delivery history is matched against the planned delivery schedule by date and quantity.
Delivered indicator
Section titled “Delivered indicator”The delivered indicator marks an order or line as delivered, regardless of the actual quantity or date. It is intended for stock items (lineType Item) where your ERP applies delivery tolerances – a quantity received within tolerance is considered sufficiently delivered.
When an order or line is received, it can be marked as delivered by setting indicators.delivered on either order or line level. Unlike the actual delivery history (matched by date and quantity), the delivered indicator is applied by order line or delivery line position. When set on the order line, all its delivery schedule lines become delivered, including delivery schedule lines without a position. A logistics status sent per delivery schedule line (deliverySchedule.status) is matched by position, so delivery schedule lines without a position are not changed by it. When the line has an actual delivery history, a later order update recalculates its delivery schedule line statuses from that history. The line then goes back to logistics status Open, unless the actual delivery history covers its full quantity. To keep the line delivered, set lines.indicators.delivered again in that update; the order level indicators.delivered does not keep a line that is already delivered.
Mark as delivered by updating an order using the /order endpoint
Section titled “Mark as delivered by updating an order using the /order endpoint”The existing order or line can be marked as delivered by setting indicators.delivered on either order or line level and updating the order using the Send order endpoint:
Mark as delivered by sending the delivered indicator using the /order/indicators endpoint
Section titled “Mark as delivered by sending the delivered indicator using the /order/indicators endpoint”The order or line can be marked as delivered by setting indicators.delivered on either order or line level and sending this indicator only, using the Send order indicators endpoint.
