Creates an Interactive Reply Buttons object for the API
The action for the interactive message
The body for the interactive message
Optional
header: HeaderThe header for the interactive message, it may be undefined if not needed
Optional
footer: FooterThe footer for the interactive message, it may be undefined if not needed
Creates an Interactive List object for the API
The action for the interactive message
The body for the interactive message
Optional
header: HeaderThe header of type text for the interactive message, it may be undefined if not needed
Optional
footer: FooterThe footer for the interactive message, it may be undefined if not needed
import { Interactive, ActionList, Row, Body } from "whatsapp-api-js/messages";
const interactive_list_message = new Interactive(
new ActionList(
"Button text",
new ListSection(
"Section title",
new Row("reply_1", "Hello", "Hello description"),
new Row("reply_2", "World", "World description")
)
),
new Body("Hello World")
);
Creates an Interactive Catalog object for the API
The action for the interactive message
The body for the interactive message
Optional
header: undefinedUndefined
Optional
footer: FooterThe footer for the interactive message, it may be undefined if not needed
Creates an Interactive Single Product object for the API
The action for the interactive message
Optional
body: BodyThe body for the interactive message
Optional
header: undefinedUndefined
Optional
footer: FooterThe footer for the interactive message, it may be undefined if not needed
Creates an Interactive Multi Product object for the API
The action for the interactive message
The body for the interactive message
The header of type text for the interactive message
Optional
footer: FooterThe footer for the interactive message, it may be undefined if not needed
import {
Interactive,
ActionProductList,
ProductSection,
Product
} from "whatsapp-api-js/messages";
const interactive_multi_product_message = new Interactive(
new ActionProductList(
"catalog_id",
new ProductSection(
"Product section title",
new Product("product_id"),
new Product("product_id")
)
),
new Body("Hello World"),
new Header("Hello World Header")
);
Creates an Interactive CTA object for the API
The action for the interactive message
The body for the interactive message
Optional
header: HeaderThe header of type text for the interactive message, it may be undefined if not needed
Optional
footer: FooterThe footer for the interactive message, it may be undefined if not needed
Creates an Interactive Flow object for the API
The action for the interactive message
The body for the interactive message
Optional
header: HeaderThe header of type text for the interactive message, it may be undefined if not needed
Optional
footer: FooterThe footer for the interactive message, it may be undefined if not needed
import {
Interactive,
ActionNavigateFlow,
Body
} from "whatsapp-api-js/messages";
const interactive_navigate_flow_message = new Interactive(
new ActionNavigateFlow(
"5f9b3b4f-2b7a-4f4f-8f4f-4f4f4f4f4f4f",
"5f9b3b4f-2b7a-4f4f-8f4f-4f4f4f4f4f4f",
"Hello World",
"form_screen",
{
name: "John Doe",
age: 42
}
),
new Body("How was your experience today?")
);
import {
Interactive,
ActionDataExchangeFlow,
Body
} from "whatsapp-api-js/messages";
const interactive_data_exchange_flow_message = new Interactive(
new ActionDataExchangeFlow(
"5f9b3b4f-2b7a-4f4f-8f4f-4f4f4f4f4f4f",
"5f9b3b4f-2b7a-4f4f-8f4f-4f4f4f4f4f4f",
"Hello World"
),
new Body("Hello World")
);
Creates an Interactive Location request object for the API
The action for the interactive message
The body of the interactive message
Readonly
actionThe action for the interactive message
Optional
Readonly
bodyThe body for the interactive message
Optional
Readonly
footerThe footer for the interactive message
Optional
Readonly
headerThe header for the interactive message
Readonly
typeThe type of the interactive message
Interactive API object