Here is an example of milk crates loaded on to a pallet where Products have not been configured to only stack on Products with the same Product ID.
Although the white and purple small milk crates can likely stack upon each other, albeit different dairy product, the large blue crates can only be stacked on other large blue crates.
Use a Product's placement setting to stack Products upon Products with the same Product ID.
Placement setting have three options, first one is "On top only", second is "On floor only", and third is "Maximum Stack". All three placement settings need to be used to only stack Products with the same Product ID.
To have Products stack upon Products with the same Product ID: 1) click Products menu and navigate to a Product, 2) click the Orientations tab, 3) check "On top only" checkbox, 4) check "On floor only" checkbox, and type a number for "Maximum Stack" field
We would set the Placement settings like above for all Products that can only stack on themselves.
On a side note, Product above is a milk crate, and therefore has orientation set to the "or turned" orientation. "Or turned" means Product cannot be loaded on their ends or side.
Here is the pallet of milk crates optimized while having all milk crates setup to stack upon same Product IDs.