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

    Class ActionDataExchangeFlow

    Action API object

    Use ActionFlow instead

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    • Builds a data exchange flow component for an Interactive message

      Parameters

      • flow_token: string

        Flow token that is generated by the business to serve as an identifier

      • flow_id: string

        ID of the Flow provided by WhatsApp

      • flow_cta: string

        Text on the CTA button, character limit - 20 characters (no emoji)

      • mode: "published" | "draft" = "published"

        Must be "published" or "draft"

      • flow_message_version: "3" = "3"

        Must be "3"

      Returns ActionDataExchangeFlow

    Properties

    name: "flow"

    The name of the component

    parameters: {
        flow_action?: "navigate" | "data_exchange";
        flow_action_payload?: { data?: unknown; screen: string };
        flow_cta: string;
        flow_id?: string;
        flow_message_version?: "3";
        flow_name?: string;
        flow_token?: string;
        mode?: "published" | "draft";
    } & (
        ({ flow_action?: "navigate" | undefined; flow_action_payload: { screen: string; data?: unknown; }; } | { flow_action: "data_exchange"; flow_action_payload?: undefined; }) & ({ flow_id: string; flow_name?: undefined; } | { ...; })
    )

    The Flow parameters

    Type declaration

    • Optionalflow_action?: "navigate" | "data_exchange"

      The Flow type. If set to "navigate", flow_action_payload must be provided.

      Defaults to API decision if not provided ("navigate")

    • Optionalflow_action_payload?: { data?: unknown; screen: string }

      Required if flow_action is "navigate", must be omitted otherwise

      • Optionaldata?: unknown

        Optional input data for the first Screen of the Flow. If provided, this must be a non-empty object.

      • screen: string

        The ID of the first Screen

    • flow_cta: string

      Text on the CTA button, character limit - 20 characters (no emoji)

    • Optionalflow_id?: string

      Unique ID of the Flow provided by WhatsApp

    • Optionalflow_message_version?: "3"

      The Flow version, must be 3

    • Optionalflow_name?: string

      Flow name provided by the business as an alternative to flow_id

    • Optionalflow_token?: string

      Flow token that is generated by the business to serve as an identifier

      Defaults to API decision if not provided

    • Optionalmode?: "published" | "draft"

      The Flow can be in either draft or published mode

      Defaults to API decision if not provided ("published")