Retrieve Product Attachments from inRiver


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

Product attachments in Sana are files and links added to the product and they are shown on the product details page in the Sana web store.

For example, you are selling electronics or some complex equipment used in mechanical engineering, and you need to provide some manuals to your customers online. These documents can be attached to the products and shown on the product details page in the Sana web store.

In Sana, any file can be a product attachment. In inRiver the product-to-resource relation can be considered as the Sana product attachment. You need to create product-to-resource relations in inRiver and then define which of these relations will be considered as Sana product attachments.

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 product attachments.

On the screenshot below you can see several link types with the Resource target entity type. You need the Link Type Ids of the relations 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 Attachment and Resources relations to Sana. Then you need the Link Type Ids of these relations, which are: ProductAttachments 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_PRODUCTATTACHMENTS_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 into a single string. The strings should be separated with semicolon.

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


You need to add this string to the value of the SANA_PRODUCTATTACHMENTS_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. Then, refresh the site cache.

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