Setting up the Image Viewer
Summarize
Summary of Setting up the Image Viewer
The Image Viewer enables CPQ Administrators to add and display images in supported fields through a media carousel on layouts. This feature enhances visual presentation by allowing users to view multiple images with labels and alt text, improving user interaction and product visualization within ServiceNow CPQ.
Show less
Supported Field Types
- Static Image
- MultiSelectProductPickerGrid
- MultiSelectVisualProductPicker
- ProductPickerGrid
- VisualProductPicker
- MultiSelect picklistGrid
- SingleSelect picklistGrid
- Multiselect Visual Picker
- Visual Picker
Configuration Steps
Static Image Fields
- Open the desired layout and locate the field.
- Click the gear icon and edit the raw value to include image data using a JSON structure with
featureImageSettingsspecifying an array of images and carousel enablement. - Deploy the updated blueprint.
Product Picker Fields
- Create Text fields for each image URL (and optional alt text and labels) within the Option Fields tab.
- Use Bulk Actions to populate image URLs and optional text fields.
- Enable the Image Viewer in the layout by toggling it on and mapping the created fields for Image URL, Alt Text, and Label.
- Add each image through the settings and deploy the blueprint.
Picklist Fields
- Import image data via CSV including columns for value, imageUrl, and optionally imageLabel and imageAltText.
- Map CSV columns in the Picklist Extension tab.
- Enable the Image Viewer on the layout and map the extension fields for the carousel images.
- Add each image accordingly and deploy the blueprint.
General Guidelines
- Maintain consistent image sizes to ensure proper alignment of thumbnails and featured images.
- Order images as desired since display follows the order in the Image Viewer settings.
- Use sufficiently high-resolution images to avoid pixelation but avoid excessively large files to maintain performance.
Image Viewer Display Behavior
Users can hover over images to reveal an expand icon, which opens a dialog box with a carousel view. Navigation is possible via arrows or thumbnails, and any provided labels and alt text appear. The dialog can be closed by clicking outside or using the close (X) button.
You can use the Image Viewer to add images to fields for viewing in a media carousel.
The image viewer allows a CPQ Admin to add featured images to supported fields that can be viewed in a media carousel. This article covers how to set up the Image Viewer in the CPQ Admin and how it displays on your layout.
Supported field display types
- Static Image
- MultiSelectProductPickerGrid
- MultiSelectVisualProductPicker
- ProductPickerGrid
- VisualProductPicker
- MultiSelect picklistGrid
- SingleSelect picklistGrid
- Multiselect Visual Picker
- Visual Picker
Static images
To display the Image Viewer for a Static Image field, follow these steps:
- Open the layout where you want to add the Image Viewer.
- Hover over the field and click the gear icon.
- Open the raw value menu and add the following while including the required inputs in place of the placeholder text below.
- Click Save, and deploy the blueprint.
Raw value details for Image Viewer
Add the following to the “Raw Value” section of an image display component through the Admin UI, where Array<FeatureImage> is an array of your additional feature images in the Feature Image type format and
carouselEnabled is set to true or false.
"featureImageSettings": {
"additionalImages": Array<FeatureImage>,
"carouselEnabled": boolean
}
By default, carouselEnabled is false.
Defining a feature image
FeatureImage = {
“src”: string,
“alt”?: string,
"label"?: string,
}
Product Pickers
To display the Image Viewer for a product picker field, follow these steps:
- Select your product picker field.
- Select the Option Fields tab.
- Click + Add.
- Set the Field Type to Text.
- Set the Product List Property to Product Extended.
- Create one Text field for each image to include in the Image Viewer.Note:To display alt text or a label, additional fields for each type must be created. These fields are not required.
- Select the Bulk Actions tab.
- Click Add New Action.
- Select type Determined Action.
- Enter a Bulk Action Name.
- Select all of the fields added for your Image Viewer.
- Click Save.
- On the Bulk Actions tab, provide the URL for each image as well as text for labels and alt text if desired.
- Click Save
- Open a layout that includes the product picker field.
- Hover over the field and click the gear icon.
- Toggle Enable Image Viewer to On.
- Expand the Image Viewer Settings section.
- Select the fields created from steps 3-4 that correspond to Image URL, Alt Text, and Label.
Alt Text and Label are optional.
- Click + Add and repeat step 17 for each image that you want to include.
- Click Save, and deploy the blueprint.
Picklists
- Open the picklist field.
- Click the Picklist Extension tab.
- Click Import Data.
- Create a CSV that includes the following columns:
- value
- imageUrl
- Ensure this is a valid URL for the image to display.
- Create an imageUrl column for each image to include in the Image Viewer.
- imageLabel (optional)
- imageAltText (optional)
- Import the created CSV.
- Click Column Mapping.
- For each field added, select the mapping menu and select the column name under the Extension mapping section.
- Click Save Mapping.
- Open a layout that includes the product picker field.
- Hover over the field and click the gear icon.
- Toggle Enable Image Viewer to On.
- Expand the Image Viewer Settings section.
- Select the fields created from the picklist extension data that correspond to Image URL, Alt Text, and Label.
Alt Text and Label are optional.
- Click + Add and repeat step 13 for each image that you want to include.
- Click Save, and deploy the blueprint.
General guidelines
Ensure that the image sizes are the same for all images in a viewer. If they do not match, the thumbnails and featured image will not align properly.
Add images in the order you want them to display. Images will display from the Image Viewer settings from top to bottom. The name of the field does not affect the display order.
Use images with a high enough resolution to properly fill the window. Low resolution images will be expanded in size to fit the window and will not look good when select as the featured image.
For optimal performance, avoid large or high resolution images since that will impact the render time for the image viewer.
Image Viewer display
On a layout with a field that includes an image view, a user can hover over an image to see the expand icon.
Once clicked, the image view will open in a dialog box.
A user can move between images with the arrow buttons or by clicking the thumbnails below the feature image. This carousel displays any label and alt text if provided. A user can close the dialog box by clicking outside it or by clicking X in the top right.