Class ActionFlowAbstract

Action API object

Hierarchy

Implements

Constructors

Properties

Constructors

  • Builds a flow component for an Interactive message

    Parameters

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

      The Flow parameters

      • flow_action: "navigate" | "data_exchange"

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

      • Optional flow_action_payload?: {
            data?: unknown;
            screen: string;
        } & {
            data?: unknown;
            screen: string;
        }

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

      • flow_cta: string

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

      • flow_id: string

        Unique ID of the Flow provided by WhatsApp

      • flow_message_version: "3"

        The Flow version, must be 3

      • flow_token: string

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

      • mode: "published" | "draft"

        The Flow can be in either draft or published mode

    Returns ActionFlow

    Throws

    If parameters.flow_cta is empty or over 20 characters

    Throws

    If parameters.flow_cta contains emojis

Properties

name: "flow" = "flow"

The name of the component

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

The Flow parameters

Type declaration

  • flow_action: "navigate" | "data_exchange"

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

  • Optional flow_action_payload?: {
        data?: unknown;
        screen: string;
    } & {
        data?: unknown;
        screen: string;
    }

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

  • flow_cta: string

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

  • flow_id: string

    Unique ID of the Flow provided by WhatsApp

  • flow_message_version: "3"

    The Flow version, must be 3

  • flow_token: string

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

  • mode: "published" | "draft"

    The Flow can be in either draft or published mode

Remarks

TSDoc is unable to document this type properly, so most of the documentation is in the subclasses constructors instead.

Generated using TypeDoc