First of all, the loading space optimization is indeed not directly integrated in the route optimization process.
It is expected to be used after a route optimization, to find the best possible packing of the items in the bins.
It allows to check that all items can indeed be loaded in the bins, considering different constraints, and trying to minimize the number of required bins for the previously calculated tour.
It is then also easier to show the results of the packing.
From a model perspective, the integrator can decide whether bins are representing a trailer or a pallet, and whether items are representing pallets or boxes to be loaded in the bins.
The loading optimization could perhaps be processed in multiple steps. First optimize the load of the doors (and cubes?) in the pallets, and then optimize the load of the pallets and boxes (and cubes?) in the trailers.
One thing is that we don't know in advance the size of the pallets. But if the size of the doors and cubes are known, the integrator could find out by himself which bin sizes are possible, and send in the request the corresponding templates as bin types. The loading space optimization would then minimize the number of required bins.
Please remember also that sequencing constraints are supported only for one bin (e.g. multiple stops for 1 trailer). And for the pickup phase, the loading space optimization only supports cuboid shapes.