Appearance
BRT Integration
The BRT integration handles parcel and pallet shipments via the /brt interface in the back-office.
Interface Behavior
| Condition | Shipment Type |
|---|---|
Pallet > 0 | Pallet branch; the source sends palletType1 (default EPAL) and uses the pallet number for numberOfParcels. |
Pallet = 0 and Parcel > 0 | Parcel shipment with the entered parcel count. |
Both at 0 | Falls back to the parcel count calculated from sold products, with a minimum of one. |
Precedence
When both a palette count and a parcel count are supplied, the source takes the pallet branch; it does not show a separate mixed-shipment rejection in the grouped service. Confirm the intended operator input before sending a live request.
API Mapping
Parcel Shipment
json
{
"numberOfParcels": "<parcel_count>"
}Pallet Shipment
json
{
"palletType1": "EPAL",
"palletType1Number": "<pallet_count>",
"numberOfParcels": "<pallet_count>"
}Tracking Model
- Sold products selected within the same print action share a single logical BRT shipment reference
- Labels from the response are stored on each selected
SaleProduct - Tracking uses the BRT label identifiers from
shipment_infos
Data Flow
View diagram source
sequenceDiagram
participant UI as Back-office /brt
participant SVC as BRT Service
participant API as BRT API
participant SP as SaleProduct
UI->>SVC: Create shipment (parcels or pallets)
SVC->>API: POST shipment request
API-->>SVC: Labels + tracking data
SVC->>SP: Store labels and tracking on SaleProducts
Error Handling
- Missing mandatory consignee data: the grouped request fails before the BRT API call.
- No labels in the provider response: the shipment path records a ticket error on the selected lines.
- API exception or rejected response: the source records
ticket_print_errorand logs the failure. An automatic retry or backoff policy is not established by the reviewed command. - Mixed-sale selection:
BrtServicerejects selected lines belonging to more than one sale.
The local success path sets the BRT carrier, tracking links, ticket files, is_ticket_printed and is_pre_shipped, then checks order completion. These fields do not prove carrier acceptance or delivery; see carrier shipment operations.