Related items are returned from the ERP to Sana against the original product and not the variant. Therefore, in standard Sana, the related items on the frontend are always displayed for all variants of a given product. But the ERP allows the admin to maintain the relationship per variant as well so they would wish to display different related products per the selected variant on the web shop.
Feature request:
ERP — The ERP Related items table/ substitution table already provides the column “Variant No” which allows the admin to maintain the related items per variant (checked in NAV/BC). But Sana does not use it so the ERP does not return in. Return related items set for variants within the variant node instead of on main product node.
Web shop — On the product details page, when displaying the related items, follow the below logic: Always show the related items which do not carry a variant ID (regardless of the variant selected). When a variant is selected, then add the other related items which are set for that specific variant as well. The related items section should be refreshed each time a variant selection is changed.
Changes required to ERP — The GetProduct response should return the related items set for variants within the specific variant node instead of on the main item response.