WhatsApp Flows through Meta's Graph API shapes (proxied by Kapso).
KapsoEx.Platform.Flows offers a higher level API on top of this: flow
versions, data endpoints and encryption setup.
Flow-ID endpoints need a context so Kapso can pick the connection: pass
phone_number_id: or business_account_id: in params.
Summary
Functions
Creates a flow in a WhatsApp Business Account.
Creates a flow for a phone number. Attributes as in create/3.
Deletes a draft flow. This cannot be undone.
Deprecates a published flow.
Gets a flow. fields defaults to
"id,name,status,categories,validation_errors,json_version,data_api_version,endpoint_uri,preview".
Lists the flow's assets, with download URLs for the flow JSON.
Lists the flows of a WhatsApp Business Account.
Lists the flows available to a phone number.
Publishes a flow. This cannot be undone.
Updates flow metadata: name, categories, endpoint_uri or
application_id.
Uploads the flow JSON (max 10 MB). flow_json is a JSON string or a map,
which is encoded for you.
Types
@type result() :: {:ok, map()} | {:error, KapsoEx.Error.t()}
Functions
@spec create(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Creates a flow in a WhatsApp Business Account.
Attributes: name and categories (required), clone_flow_id,
endpoint_uri, flow_json (a JSON string) and publish.
@spec create_for_phone_number(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Creates a flow for a phone number. Attributes as in create/3.
@spec delete(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Deletes a draft flow. This cannot be undone.
@spec deprecate(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Deprecates a published flow.
@spec get(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Gets a flow. fields defaults to
"id,name,status,categories,validation_errors,json_version,data_api_version,endpoint_uri,preview".
Flows.get(client, flow_id, phone_number_id: "647015955153740")
@spec get_assets(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Lists the flow's assets, with download URLs for the flow JSON.
@spec list(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Lists the flows of a WhatsApp Business Account.
@spec list_for_phone_number(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Lists the flows available to a phone number.
@spec publish(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Publishes a flow. This cannot be undone.
Updates flow metadata: name, categories, endpoint_uri or
application_id.
@spec upload_json( KapsoEx.Client.t(), String.t(), String.t() | map(), map() | keyword() ) :: result()
Uploads the flow JSON (max 10 MB). flow_json is a JSON string or a map,
which is encoded for you.