1

There seem to be several way to add an image to a Product2 object:

  1. Add a rich text field
  2. Upload image to documents and then add the URL for the image to Product2 and use a formula text field to display.
  3. Upload image to a 3rd party (ex. AWS) and add the URL for the image to Product2 and use a formula text field to display.
  4. others?

Which is Salesforce's recommended method and also which is the method most commonly used today?

2 Answers 2

2

which is the method most commonly used today?

I am not aware of a "most common way", I think it all comes down to what you feel more comfortable with. For example, I highly doubt that most admins host their images using 3rd party services, such as AWS, as this requires more effort, then you need to associate each url to the appropriate product.

Doing a quick search I went through several posts, and many of them seemed to reference this blog for building product catalogs and adding the pictures to the documents object and referencing them using a custom field in the product object through a formula field.

In the end, I think it all comes down to personal preference/company policy, and/or what method you feel more comfortable with.

(company policy: example, some companies would want to avoid 3rd party services, and have all the data in Salesforce).

Which is Salesforce's recommended method?

I am not aware of any.

However, Salesforce Labs does have an Appexchange listing (Free) for creating Product Catalogs here.

An important consideration, # of images that will be added in the long run. (scalability), if you are planing on having thousands.hundreds of thousands or as many images as @sfdcfox, then a third party hosting service would make sense.

6
  • We do use AWS but we have something like 40m images which wouldn't be practical in Salesforce storage.
    – sfdcfox
    Commented Nov 11, 2017 at 19:30
  • that is a lot of images, are they mostly associated to 1 object?
    – glls
    Commented Nov 11, 2017 at 19:40
  • We sell RVs, so we take pictures of every single one we have on our lots, to show their condition and features, so like 20-40 per RV. Close to 99.99% of our image storage is asset-related.
    – sfdcfox
    Commented Nov 11, 2017 at 19:50
  • Thanks for the great references. The blog and the Force Labs app both store the product image in documents and reference it with a custom field in Product2 that contains the image file Id. Unfortunately, the blog uses Image_ID__c for the field api name while Force Labs uses Image_Document_ID__c. I think I will assume that more organizations will use the Force Labs field api name and go with that. Commented Nov 12, 2017 at 1:52
  • since we don't have specifics on your particular use case, it is kind of hard to recommend anything. do take into consideration sfdcfox's comment in regards to the quantity of images and scalability.
    – glls
    Commented Nov 12, 2017 at 15:52
1

The most common method if you want to securely store the images is to put them in documents and reference the file id in Product2. I think it is safe to assume that Salesforce's recommended method would be the one that they used in their own app where they reference the file id of the image file in documents through a custom field with api name Image_Document_ID__c.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .