ChemPal Documentation - v1.7.0
    Preparing search index...

    Interface Variant

    Represents a specific variation of a product with its unique characteristics and pricing. Used to model different versions or package sizes of the same product.

    const variant: Variant = {
    title: "Sodium Chloride 500g",
    uom: "g",
    price: 19.99,
    quantity: 500,
    grade: "ACS",
    sku: "NaCl-500"
    };
    interface Variant {
        title?: string;
        description?: string;
        shortDescription?: string;
        rating?: number;
        reviewCount?: number;
        uom?: string;
        price?: number;
        currencyCode?: any;
        currencySymbol?: any;
        quantity?: number;
        baseQuantity?: number;
        baseUom?: Uom;
        usdPrice?: number;
        localPrice?: number;
        sku?: string | number;
        url?: string;
        permalink?: string;
        id?: string | number;
        uuid?: string | number;
        cacheKey?: string;
        grade?: string;
        concentration?: string;
        moleweight?: number;
        formula?: string;
        purity?: string;
        status?: string;
        statusTxt?: string;
        shippingInformation?: string;
        purchaseRestriction?: PurchaseRestriction;
        availability?: Availability;
        attributes?: { name: string; value: string }[];
        moles?: number;
        images?: ProductImage[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    title?: string

    Display name of the variant

    "Sodium Chloride 500g"
    
    description?: string

    Description of the variant

    "Sodium Chloride 500g"
    
    shortDescription?: string

    Short description of the variant

    "Sodium Chloride 500g"
    
    rating?: number

    Rating of the variant

    4.5
    
    reviewCount?: number

    Number of reviews for the variant

    100
    
    uom?: string

    Unit of measurement for the variant quantity

    "g"
    
    price?: number

    Numeric price value of the variant

    19.99
    
    currencyCode?: any

    ISO currency code for the price

    "USD"
    
    currencySymbol?: any

    Display symbol for the currency

    "$"
    
    quantity?: number

    Available quantity in stock

    100
    
    baseQuantity?: number

    Reference quantity for unit conversion calculations

    500
    
    baseUom?: Uom

    Reference unit of measurement for conversions

    "g"
    
    usdPrice?: number

    Price converted to USD for comparison

    19.99
    
    localPrice?: number

    The price convert to the users local currency

    sku?: string | number

    Stock keeping unit identifier for inventory tracking

    "NaCl-500"
    
    url?: string

    URL ChemPal queries/processes for this variant — may be an API endpoint rather than a human-facing page.

    "/products/sodium-chloride-500g"
    
    permalink?: string

    Human-facing page for this variant, i.e. what the user opens in the browser. Defaults to url when not separately provided.

    "https://supplier.com/products/sodium-chloride-500g"
    
    id?: string | number

    Unique identifier within the system

    12345
    
    uuid?: string | number

    Globally unique identifier

    "550e8400-e29b-41d4-a716-446655440000"
    
    cacheKey?: string

    Stable per-product cache/exclusion identity, as derived by SupplierBase.getUniqueProductKey and frozen on the builder at parse time. Combined with the supplier name (via getProductIdentityKey) to key the product-detail cache and the "Ignore Product" exclusion store.

    "FAM_889460"
    
    grade?: string

    Chemical grade specification (e.g., 'ACS', 'Technical')

    "ACS"
    
    concentration?: string

    Chemical concentration specification

    "98%"
    
    moleweight?: number

    Molecular weight of the variant

    100.00
    
    formula?: string

    Molecular formula

    `C<sub>18</sub>H<sub>33</sub>NaO<sub>3</sub>`
    
    purity?: string

    Purity of the variant, as a percentage string. Keeps any qualifier the supplier reports, e.g. comparators (<, >, , ) and the % sign.

    "98%"
    
    "≥99%"
    
    status?: string

    Current status code of the variant

    "IN_STOCK"
    
    statusTxt?: string

    Human-readable status description

    "In Stock"
    
    shippingInformation?: string

    Special shipping requirements or information

    "Hazardous material - special shipping required"
    
    purchaseRestriction?: PurchaseRestriction

    Parsed purchase restrictions (region/buyer/etc.) used to hide options a given user cannot buy. See PurchaseRestriction.

    availability?: Availability

    Availability of the variant

    "IN_STOCK"
    
    attributes?: { name: string; value: string }[]

    Attributes of the variant

    `[{ name: "Size", value: "500g" }]`
    
    moles?: number

    Number of moles of the variant

    23.5
    
    images?: ProductImage[]

    Flat list of the product's images. Full-size images and thumbnails are kept as separate, independent entries distinguished by their type field (see ProductImage; a supplier's main image/thumbnail is often not part of its gallery). The first entry of each type is treated as that type's default.

    `[{ href: "https://example.com/image.jpg", type: "image" }, { href: "https://example.com/thumb.jpg", type: "thumbnail" }]`