Product Variant

What is a Product Variant?

Product variants are variations of a product with different attributes like size, color, material, etc. If you offer various purchase options for your products than your integration will slightly be different, please follow the guidelines below for a Variant based implementation.

What is an Item Group ID?

Item Group ID is used to group different variants of one given product. For example, a shirt will have a different VariantID for every size and color variation and all variants will be grouped under one unique Item Group ID. 

There are 4 different areas affected by Variant based implementation:

  1. Product View Event
  2. Add to Cart Event
  3. Product Purchase Event
  4. Product File

Example:

For our shirt example, let’s say that the Item Group ID is “PCShirt123” with a color option Blue, VariantID “PCShirt123-BL”.

Most apparel companies prefer to break down to only color level since the size does not matter much in terms of product personalization.

Product View Event

Product View Event
<script type="text/javascript">
function OnVisilabsLoaded(){
var VL = new Visilabs();
VL.AddParameter("OM.pv","Variant ID");//VL.AddParameter("OM.pv","PCShirt123-BL");
VL.AddParameter("OM.pn","Product Name");
VL.AddParameter("OM.inv" , "Number of items in stock");
VL.AddParameter("OM.ppr", "Product Price");
VL.AddParameter("OM.pv.1", "Product Brand");
VL.AddParameter("OM.pv.2", "Item Group ID");//VL.AddParameter("OM.pv.2", "PCShirt123");
VL.Collect();
VL.SuggestActions();
}
</script>




Add To Cart Event 

Add To Cart Event
<script type="text/javascript">
function OnVisilabsLoaded(){
var VL = new Visilabs();
VL.AddParameter("OM.pbid","Basket ID");
VL.AddParameter("OM.pb","Variant Code 1;Variant Code2");
VL.AddParameter("OM.pb.2","Item Group ID 1;Item Group ID 2");
VL.AddParameter("OM.pu" ,"product Quantity 1;product Quantity 2")
VL.AddParameter("OM.ppr" ,"Product Price1*Product Quantity 1;Product Price2*Product Quantity2");
VL.Collect();
VL.SuggestActions();
}
</script>



Product Purchase Event 

Product Purchase Event
<script type="text/javascript">
function OnVisilabsLoaded(){
var VL = new Visilabs();
VL.AddParameter("OM.tid","TransactionID");
VL.AddParameter("OM.pp","Variant Code 1;Variant Code2");
VL.AddParameter("OM.pp.2","Item Group ID 1;Item Group ID 2");
VL.AddParameter("OM.pu","product Quantity 1;product Quantity 2");
VL.AddParameter("OM.ppr","Product Price1*Product Quantity 1;Product Price2*Product Quantity2");
VL.AddParameter("OM.exVisitorID","User ID");
VL.Collect();
VL.SuggestActions();
}
</script>



Product File

Variants appear in rows. In the product file, you must have one product variant per row. Let’s say you have 4 variants: Blue, Red, Green, Yellow within the same product, you will have 4 rows, one for each variant, and they will all be grouped under the same Item Group ID.

1st Column: Send Variant ID instead of product code

28th Column: Send Item Group ID




Parent Topic: Sending Data to RMC


Copyright 2020 Related Digital