Interface TemplateParameter

interface TemplateParameter {
    action?: {
        flow_action_data?: Record<string, unknown>;
        flow_token?: string;
        thumbnail_product_retailer_id?: string;
    };
    coupon_code?: string;
    currency?: { amount_1000: number; code: string; fallback_value: string };
    date_time?: {
        calendar?: "GREGORIAN";
        day_of_month?: number;
        day_of_week?: number;
        fallback_value?: string;
        hour?: number;
        minute?: number;
        month?: number;
        year?: number;
    };
    document?: { filename?: string; link: string };
    group_id?: string;
    image?: { link: string };
    payload?: string;
    text?: string;
    type:
        | "payload"
        | "text"
        | "document"
        | "image"
        | "video"
        | "group_id"
        | "action"
        | "currency"
        | "date_time"
        | "coupon_code";
    video?: { link: string };
}

Properties

action?: {
    flow_action_data?: Record<string, unknown>;
    flow_token?: string;
    thumbnail_product_retailer_id?: string;
}

Flow button action — opens a flow from a flow-type template. Use with a button component whose sub_type is "flow" for proactive (outside-24h) flow sends, where an interactive flow message is not allowed.

Type declaration

  • Optionalflow_action_data?: Record<string, unknown>
  • Optionalflow_token?: string
  • Optionalthumbnail_product_retailer_id?: string

    Catalog/MPM button thumbnail SKU.

coupon_code?: string

Coupon code for a copy-code button. Meta allows up to 20 characters.

currency?: { amount_1000: number; code: string; fallback_value: string }
date_time?: {
    calendar?: "GREGORIAN";
    day_of_month?: number;
    day_of_week?: number;
    fallback_value?: string;
    hour?: number;
    minute?: number;
    month?: number;
    year?: number;
}
document?: { filename?: string; link: string }
group_id?: string

Group ID for a group invite-link template button.

image?: { link: string }
payload?: string

Quick-reply payload returned by the button webhook.

text?: string
type:
    | "payload"
    | "text"
    | "document"
    | "image"
    | "video"
    | "group_id"
    | "action"
    | "currency"
    | "date_time"
    | "coupon_code"
video?: { link: string }