PIMinRiver

inRiver

Retrieve Product Images from inRiver

 NOTE

In some cases product images cannot be retrieved directly from inRiver, for example due to the inRiver API or network limitations. Nevertheless, there is a possibility to retrieve product images using an external file storage. For more information, see "Retrieve Files from External File Storage".

Sana supports the following image file formats: png, bmp, gif, jpg, jpeg. In inRiver all images are considered as the Resource target entity type. The Resource entity type represents a file. You can fetch product resources (files) from inRiver and transfer them to Sana.

You need to create product-to-resource relations in inRiver and then create a server setting.

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. You need to click on Includes to see the list of relations, because the product-to-resource relation is the parent-to-child relation.

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 Resource. Since the resource entity type links to the Product Model in inRiver, such relation is considered as product-to-resource in inRiver and is used for the Sana images.

On the screenshot below you can see several link types with the Resource target entity type. You need the Link Type Ids you are going to use. Link Type Ids are 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 Product Images and Resources relations to Sana. Then you need the Link Type Ids of these relations, which are: SanaImages and ProductResource.

Step 3: Create the server setting for the product-to-resource relations. Go to the Settings in the inRiver Control Center and create the SANA_PRODUCT_IMAGES_RELATIONS server setting.

Then you need to create a server setting value. Combine the Link Type Ids of the relations you are going to use in a single string. The strings should be separated with semicolon.

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

SanaImages;ProductResource

You need to add this string to the value of the SANA_PRODUCT_IMAGES_RELATIONS 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. When the Product import task is completed, start the Product image import task. Make sure that the setting Import product images from ERP is enabled for the Product image import task.

If product images are added to the products in the inRiver Enrichment Portal, then product images from inRiver will be available in the Sana web store.

Retrieve Product Images from Related Entity

In inRiver you can retrieve product images from both, the entity type you are using as a source entity and the related to it entity type. For example, you are using Item entity type to retrieve product images, but you also need to retrieve product images from the related Product entity type. To do this, you need to enter the correct values in the server setting. The server setting value should consist of two parts: the relation from the Item entity type and the relation from the Product entity type.

Step 1: To get the necessary relation from the Item entity type, open the inRiver Item Model. On the right side of the page you will see 2 sections: Included in and Includes. You need to click on Includes to see the list of relations. All relations which are included in the Item entity type are shown in the Includes section. Select the relation of the Resource target entity type or create a new one. You will need the Link Type Id of the relation to create the server setting.

For example, you want to transfer the Resource relation to Sana. Then you need the Link Type Id of this relation, which is: ItemResource.

Step 2: You need to get the relation which will be used to connect the Product entity type to the Item entity type.

Open the inRiver Item Model. On the right side of the page you will see 2 sections: Included in and Includes. You need to click on Included in to see the list of relations. All related to the Item entity type relations are shown in the Included in section. You will need the Link Type Id of the Product source entity type, which is: ProductItem. You will need this value to create the server setting to connect the Product entity type to the Item entity type.

Now, you need to select the relation which will be used to retrieve images from the Product entity type and used in Sana. Open the inRiver Product Model. Сlick on Includes to see the list of relations. Select the relation of the Resource target entity type or create a new one. You will need the Link Type Id of the relation to create the server setting. For example, SanaImages.

Then, you need to combine the Link Type Id of the relation which is used to connect the Product entity type and the Item entity type and the Link Type Id of the relation which is used to retrieve images from Product entity type, separating the Link Type Ids with an underscore: ProductItem_SanaImages. This string is necessary to create the server setting.

Step 3: Create the server setting. Go to the Settings in the inRiver Control Center and create the SANA_ITEM_IMAGES_RELATIONS server setting.

Then you need to create the server setting value. Enter the string you created in the previous step and add the Link Type Id of the relation used to retrieve images from the Item entity type, separating it with a semicolon. After combining the strings, the setting string will look like this:

ProductItem_SanaImages;ItemResource

You need to add this string to the value of the SANA_ITEM_IMAGES_RELATIONS server setting.

In this way, the product images will be retrieved from both, Item and Product entity types and used in Sana.

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. When the Product import task is completed, start the Product image import task. Make sure that the setting Import product images from ERP is enabled for the Product image import task.

PIMinRiver