Skip to main content

whats_app_flows

Creates, updates, deletes, gets or lists a whats_app_flows resource.

Overview

Namewhats_app_flows
TypeResource
Idaws.socialmessaging.whats_app_flows

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
applicationobjectThe Meta application information associated with this Flow.
categoriesarrayThe categories that classify the business purpose of the Flow.
data_api_versionstringThe data API version for data exchange endpoint Flows.
endpoint_uristringThe endpoint URI for data exchange Flows, if configured.
flow_idstringThe unique identifier of the Flow. (pattern: <code>[0-9]+</code>)
flow_namestringThe name of the Flow.
flow_statusstringThe lifecycle status of the Flow. Valid values are DRAFT, PUBLISHED, DEPRECATED, BLOCKED, and THROTTLED.
health_statusobjectThe health status information for this Flow from Meta.
json_versionstringThe version of the Flow JSON schema used by this Flow (for example, 7.3).
previewobjectThe preview URL and its expiration timestamp for testing the Flow.
validation_errorsarrayA list of validation errors from Meta, if any.
whats_app_business_accountobjectThe WhatsApp Business Account information from Meta associated with this Flow.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_whats_app_flowselectid, flowId, regionRetrieves the metadata and status of a WhatsApp Flow, including validation errors, preview information, and health status.
list_whats_app_flowsselectid, regionnextToken, maxResultsLists all WhatsApp Flows for a WhatsApp Business Account. Returns summary information including Flow ID, name, status, and categories.
create_whats_app_flowinsertregion, id, flowName, categoriesCreates a new WhatsApp Flow. Flows enable businesses to create rich, interactive forms and experiences that users can complete without leaving WhatsApp. The Flow is created in DRAFT status. If publish is set to true and a valid flowJson is provided, the Flow is published immediately.
update_whats_app_flowupdateregion, id, flowIdUpdates the metadata of a WhatsApp Flow, such as its name or categories. This does not update the Flow JSON definition. Use UpdateWhatsAppFlowAssets to update the Flow JSON.
delete_whats_app_flowdeleteid, flowId, regionDeletes a WhatsApp Flow permanently. Only Flows in DRAFT status can be deleted. Published or deprecated Flows cannot be deleted.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
flowIdstringThe unique identifier of the Flow to delete.
idstringThe ID of the WhatsApp Business Account associated with this Flow.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to return per page.
nextTokenstringThe token for the next page of results.

SELECT examples

Retrieves the metadata and status of a WhatsApp Flow, including validation errors, preview information, and health status.

SELECT
application,
categories,
data_api_version,
endpoint_uri,
flow_id,
flow_name,
flow_status,
health_status,
json_version,
preview,
validation_errors,
whats_app_business_account
FROM aws.socialmessaging.whats_app_flows
WHERE id = '{{ id }}' -- required
AND flowId = '{{ flowId }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new WhatsApp Flow. Flows enable businesses to create rich, interactive forms and experiences that users can complete without leaving WhatsApp. The Flow is created in DRAFT status. If publish is set to true and a valid flowJson is provided, the Flow is published immediately.

INSERT INTO aws.socialmessaging.whats_app_flows (
id,
flowName,
categories,
flowJson,
publish,
cloneFlowId,
region
)
SELECT
'{{ id }}' /* required */,
'{{ flowName }}' /* required */,
'{{ categories }}' /* required */,
'{{ flowJson }}',
{{ publish }},
'{{ cloneFlowId }}',
'{{ region }}'
RETURNING
flow_id,
validation_errors
;

UPDATE examples

Updates the metadata of a WhatsApp Flow, such as its name or categories. This does not update the Flow JSON definition. Use UpdateWhatsAppFlowAssets to update the Flow JSON.

UPDATE aws.socialmessaging.whats_app_flows
SET
id = '{{ id }}',
flowId = '{{ flowId }}',
flowName = '{{ flowName }}',
categories = '{{ categories }}'
WHERE
region = '{{ region }}' --required
AND id = '{{ id }}' --required
AND flowId = '{{ flowId }}' --required;

DELETE examples

Deletes a WhatsApp Flow permanently. Only Flows in DRAFT status can be deleted. Published or deprecated Flows cannot be deleted.

DELETE FROM aws.socialmessaging.whats_app_flows
WHERE id = '{{ id }}' --required
AND flowId = '{{ flowId }}' --required
AND region = '{{ region }}' --required
;