PIMinRiver

inRiver

Retrieve Related Products from inRiver

Related products are used by Sana to add similar or substitute products like accessories or spare parts and build relationships between the related products and the original item. These product relations are used for cross- and up-selling, or it can be also used to provide alternatives in case any of these products is out of stock.

In inRiver any product-to-product relation can be considered as the related product. You need to create product-to-product relations in inRiver and then define which of these relations will be considered as Sana related products.

Step 1: To find the necessary relation in inRiver, open the inRiver Product Model. On the right side of the page you will see 2 sections: Included in and Includes. Because it is a product-to-product relation you can use either Included in or Includes to see the list of relations. As an example, I will click Includes.

Step 2: You can create a new relation or use the already existing relations. If you create a new relation, the target entity type of this relation must be Product. Since we create the product entity type relation for the Product Model, such relations are considered as product-to-product in inRiver and can be used for the Sana related products.

On the screenshot below you can see several link types with the Product target entity type. You need the Link Type Ids of the relations you are going to use. Link Type Id is necessary to create a server setting. You can use one or several relations to create a server string.

For example, you want to transfer the Upsell and Spare Parts relations to Sana. You need the Link Type Ids of these relations, which are: ProductProductUpsell and ProductSpareParts.

Step 3: Create the server setting for the product-to-product relations. Go to the Settings in the inRiver Control Center and create the SANA_PRODUCT_RELATEDPRODUCTS_GROUPS server setting. Then you need to create a server setting value.

In Sana, each relation is denoted by an integer. The texts are created for each relation in Sana based on the integer. You can also change the texts using Page elements & messages in Sana Admin.

To create the correct server setting, you need to add the integer to the string. For example, 12 will be used for the Upsell relation and 13 will be used for the Spare Parts relation. You need to create the key=value pairs, in which a key is the Link Type Id of the relation and a value is an integer.  When you combine the strings, you should separate them with semicolon.

As a result, the strings will look like this:

  • for the Upsell: ProductProductUpsell=12
  • for the Spare Parts: ProductSpareParts=13

After combining the strings, the setting string will look like this:

ProductProductUpsell=12;ProductSpareParts=13

Then you need to add the created string to the value of the SANA_PRODUCT_RELATEDPRODUCTS_GROUPS server setting.

Step 4: When the server setting is created, you need to rebuild the product index. Open Sana Admin and click: Tools > Scheduled tasks. Run Rebuild index for the Product import task. Then, refresh the site cache.

If related products are set up in the inRiver Enrichment Portal, then after product index is rebuilt, related products from inRiver will be available in the Sana web store.

PIMinRiver