Synchronizing Product Resources

Sitecore Commerce Connect has a functionality to sync artifacts from external commerce system. As a part of artifacts sync, the resources are synchronized. Resources could be images, manuals, specs, zip files related to products. Synchronizing the images would be absolute necessity because the images are artifacts that are shown on the website and they are not a “downloadable” artifacts. Manuals, installation guide, specs are “downloadable” artifacts because generally they are just displayed are a reference material on the site and the user clicks it to open the document or download a document. An example of this is shown below (PDFs)

Based on the design, whether a resource is a linked item or a direct item on the website, you will have to sync the artifacts. If the resource is a link, then you do not need the resource to be synched during artifacts sync. Commerce connect has a “URI” property on the resource and you can add the “uri” of the resource when you are synchronizing the product resources

If the resource is not “downloadable” or “linked”, then the process to sync resource involves synchronizing the resource as a part of artifacts sync. This process needs to copy the resource from external system and then create a resource in Sitecore product repository.

Add the resource to “pipelineArgs.Request.Properties["Resources"]” of the Synchronize Artifacts pipeline.

Synchronize the resource at the product level when the “SynchronizeResource” pipeline runs. External Id should map to the same Id used in artifacts sync.

I would recommend, if it’s not necessary to sync the artifact, leave it in the ECS and use a link. Synchronizing the artifacts takes a longer time and copying all the resources to Sitecore will take a considerable time and thereby it will take a longer time for the products artifacts to sync.