You are here:
Set Up Product Images for Store Check
Product images give field reps a visual reference for identifying items during a store check, especially when they're offline on an iPad. Store Check shows these images from a Base64-encoded custom field on the Product2 object, so the image travels with the record and works without a live connection.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise and Unlimited Editions with Life Sciences Cloud, Life Sciences Cloud for Customer Engagement Add-on license, and the Life Sciences Customer Engagement managed package. |
| User Permissions Needed | |
|---|---|
| To set up product images: | Life Sciences Commercial Admin |
- Create a custom field on the Product2 object to store the Base64-encoded image. See Create a Custom Field on Product2.
-
Fetch a product image URL using one of these methods.
- From a static resource. See Create a Static Resource for a Product Image.
- From an external image URL. See Fetch Image from an External URL.
- Create the integration definition. See Create an Integration Definition for Product Images.
-
Add the product image URL to the Display URL field of
the Product2 object.
- From the App Launcher, find and select Products.
- Open the record where you want to set the URL.
- Paste the copied URL into the Display URL field.
- Save your changes.
-
After you save an image URL to the Display URL field on
the Product2 object, trigger the Convert Product Image to
Base64 flow to convert the image to Base64. See Convert a Product Image to Base64 String.
The Base64 string is then synced to the mobile app to display the product.
Note The Long Text Area field supports a maximum of 131,072 characters. Base64 encoding
increases the size by about 33%, so the original image must be under about 90
KB.
- Create a Custom Field on Product2
To store the Base64-encoded image string on the Product2 object, create a custom field. - Create a Static Resource for a Product Image
Create a static resource in UI Settings, then get its relative path so you can reference the product image in Life Sciences Commercial app configurations. - Fetch Image from an External URL
An external URL can be hosted in Salesforce or outside Salesforce. For images hosted in Salesforce, host the image in the Documents tab. Fetch an image URL irrespective of whether the image is hosted in Salesforce or outside Salesforce. - Create an Integration Definition for Product Images
Before you use the Convert Product Image to Base64 flow, create and compile the Apex provider class, then create the integration definition. The action resolves the named credential by matching its configured URL with Display URL. - Convert a Product Image to Base64 String
The Convert Product Image to Base64 flow fetches an image from a Product2 record's Display URL, converts it to Base64, and stores the result in a custom field on Product2. This flow supports internal org image URLs, such as documents and static resources, and external URLs.
Did this article solve your issue?
Let us know so we can improve!
