cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Replicating variants as Size or Color Variants not as Generic Variants via Datahub

0 Likes
867

Able to replicate article from SAP via datahub. Base product importing as type Product and Variants importing as GenericVariantProduct. What are the steps and configurations which I need to follow, to import SAP articles as ApparelProduct(Base Product) and Size or Color Variants(Variants)

Hybris version - 1808, Datahubversion - 18.08.3-RC1

Accepted Solutions (0)

Answers (2)

Answers (2)

Slava
Product and Topic Expert
Product and Topic Expert
0 Likes

I'm not familiar with SAP business cases, so I'm not sure I understand the problem right. Here is what I think the problem is. There is an item in SAP, let's say Product, which when imported to hybris should become an ApparelProduct, ProductSizeVariant and ProductColorVariant or something like that. I know there should be SAP standard extensions for such scenarios, but I don't know whether you use them and how exactly they work, so here is my solution for the problem from scratch.

Correct modeling is fundamental. We can import the SAP item into RawItem as this, then map that raw item type to CanonicalApparelProduct , CanonicalProductSizeVariant and CanonicalProductColorVariant. A single product info is contained in multiple raw item records. During composition they should be combined into one product record, and multiple variant records for colors and sizes. There could be different number of color and size variants produced from the same input set of raw items for the product. To handle this condition and make sure the raw item records are filtered correctly based on whether product, size or color variant is being composed I would use Composition Handler. This kind of modeling can be seen in pcm-apparel extension from the Solutions Book, which is distributed with the datahub-suite.

Another option is to keep the canonical model simple like raw: only CanonicalApparelProduct exists and is mapped to RawApparelProduct, but the target system contains ApparelProduct, ApparelProductSizeVariant and ApparelProductColorVariant, which are mapped similar to the previous case but to the canonical product; and we would need to use Publication Grouping Handlers

If it's not what you need, then please provide a very concrete example to understand your problem

Slava
Product and Topic Expert
Product and Topic Expert
0 Likes

It's all in the item models. If you need to change type in the target system only, e.g. ApparelProduct instead of Product, then you need to provide a customer extension for the target items. the *-items.xml you could define your desired target types and map them to the canonical items you currently use via the transformation expressions.

You can even declare that your target extension depends on the canonical model extension you currently use.

0 Likes

Thanks for answer . I can change the target type into Apparel product but my question is depending on the Sap article characteristic values how to convert them into size or color variants with variants attributes. Is there are any way to identify the characteristics?