Sana Assistant (online)
Table of Contents

ProductSearchVisualComponent reference

This article provides reference material about ProductSearchVisualComponent record.

ProductSearchVisualComponent

Properties

Id

The visual component identifier.

Name

The visual component name.

Position

The zero-based index of the visual component within the combined list of products and visual components.

Products fill the remaining slots in order. A visual component with position 2 is rendered as the 3rd tile, pushing the products after it down by one slot.

Positions are expected to be unique and within the combined result range.

Images

The images of the visual component.

AltText

The alt text attribute of the visual component.

Can be left empty.

Url

The link URL of the visual component.

Can be left empty.

Example:

var banner = new ProductSearchVisualComponent(
    Id: "banner-1",
    Name: "Seasonal banner",
    Position: 2,
    Images: new ProductSearchVisualComponentImages(
        Primary: "https://example.com/banner-primary.jpg",
        Horizontal: "https://example.com/banner-horizontal.jpg"),
    AltText: "Seasonal promotion",
    Url: "https://example.com/promotion");

See also