whatsapp-api-js - v5.2.0
    Preparing search index...

    Class MPMComponent

    Button Component API object for Multi-Product Message

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    • Creates a button component for a MPM Template.

      Parameters

      • thumbnail: Product

        The product to use as thumbnail.

      • ...sections: AtLeastOne<ProductSection>

        The sections of the MPM. Must have between 1 and 10 sections. Must have less than 30 products across all sections.

      Returns MPMComponent

      If sections is over 10 elements.

      If sections is over 1 element and one of the sections doesn't have a title.

    Properties

    index: number = NaN

    The index of the component (assigned after calling _build)

    parameters: [ButtonParameter]

    The parameter of the component

    sub_type: "flow" | "url" | "quick_reply" | "catalog" | "mpm" | "copy_code"

    The subtype of the component

    type: "button"

    The type of the component