create_whats_app_flow
async
¶
create_whats_app_flow(
id: LinkedWhatsAppBusinessAccountId,
flow_name: MetaFlowName,
categories: MetaFlowCategoryList,
*,
config_overrides: Optional[AsyncSocialMessagingClientConfig] = None,
flow_json: Optional[MetaFlowJsonBlob] = None,
publish: Optional[bool] = None,
clone_flow_id: Optional[MetaFlowId] = None,
endpoint_uri: Optional[MetaFlowEndpointUri] = None,
) -> CreateWhatsAppFlowOutput
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.
Parameters:
-
id(LinkedWhatsAppBusinessAccountId) –The ID of the WhatsApp Business Account to associate with this Flow.
-
flow_name(MetaFlowName) –The name of the Flow. Must be unique within the WhatsApp Business Account.
-
categories(MetaFlowCategoryList) –The categories that classify the business purpose of the Flow. At least one category is required.
-
flow_json(Optional[MetaFlowJsonBlob], default:None) –The Flow JSON definition that describes the screens, components, and logic of the Flow. Maximum size is 10 MB.
-
publish(Optional[bool], default:None) –Set to
trueto publish the Flow immediately after creation. Requires a validflowJsonthat passes Meta's validation. -
clone_flow_id(Optional[MetaFlowId], default:None) –The ID of an existing Flow within the same WhatsApp Business Account to clone.
-
endpoint_uri(Optional[MetaFlowEndpointUri], default:None) –The HTTPS endpoint that Meta calls for a data exchange Flow.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ValidationException–The request contains an invalid parameter value.
-
AccessDeniedByMetaException–You do not have sufficient access to perform this action.
-
DependencyException–Thrown when performing an action because a dependency would be broken.
-
InternalServiceException–The request processing has failed because of an unknown error, exception, or failure.
-
InvalidParametersException–One or more parameters provided to the action are not valid.
-
ResourceNotFoundException–The resource was not found.
-
ThrottledRequestException–The request was denied due to request throttling.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_socialmessaging/_services/async_social_messaging.py
723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 | |