Components
Components are like building blocks. They allow you to build complex UIs and display business data using attribute models. The maximum number of components per screen is 50. Please refer to best practices for components. The following components are supported:- Basic Text (Heading, Subheading, Caption, Body)
- RichText
- TextEntry
- CheckboxGroup
- RadioButtonsGroup
- Footer
- OptIn
- Dropdown
- EmbeddedLink
- DatePicker
- CalendarPicker
- Image
- If
- Switch
- Media upload
- NavigationList
- Chips Selector
- Image Carousel
Text Components
Heading
This is the top level title of a page.Subheading
Body
Caption
Limits and Restrictions
Additional capabilities for Text components
Supported starting with Flow JSON version 5.1 In Flow JSON V5.1TextBody and TextCaption also supports a limited markdown syntax. In order to enable this capability, set the property markdown=true; this will instruct Whatsapp Flows to enable markdown syntax within these components.
Preview Flow
This is a heading
This is a subheading
This is body text This is a text caption Continue Managed by the business. Learn more Learn moreRich Text
Supported starting with Flow JSON version 5.1 Flow JSON 5.1 introduces a new component -RichText. The goal of the component is to provide a rich formatting capabilities and introduce the way to render large texts ( Terms of Condition, Policy Documents, User Agreement and etc) without facing limitations of basic text components ( TextHeading, TextSubheading, TextBody and etc)
RichText component utilizes a select subset of the Markdown specification. It adheres strictly to standard Markdown syntax without introducing any custom modifications. Content created for the RichText component is fully compatible with standard Markdown documents.
Note:
Until V6.2, the RichText component can only be used as a standalone component on the screen and cannot be combined with other components on the same screen.
Starting with V6.3, the RichText component can be used in conjunction with the Footer component on same screen, allowing the Flow to navigate from or end at the screen with RichText.
If your use case requires to incorporate text with other components, consider using the basic Text component, which supports markdown features such as bold, italic, strikethrough, links and lists.
Supported Syntax
Headings
The current syntax supports onlyHeading (h1) and Subheading (h2). Other heading levels will be parsed but rendered as normal text - TextBody.
Paragraphs
To create paragraphs, split your text into different array items:${data.your_dynamic_field}
Text Formatting
Lists
You can organize items into ordered and unordered lists. At the moment, only single level lists are supported.Images
You can also include images in the content. Please note, external URIs are not supported and you can only include base64 inline images- png
- jpg / jpeg
- webp (please note, webp is only supported starting from IOS 14.6+, that corresponds to ~98% of IOS devices)
Links
To create a link, enclose the link text in brackets and then follow it immediately with the URL in parenthesesTables
To add a table, use three or more hyphens (---) to create each column’s header, and use pipes (|) to separate each column. For compatibility, you should also add a pipe on either end of the row. Cell content can be combined with the following syntax:- Italic, bold, strikethrough
- Images
- Links
Working with large texts
If your text content for markdown has a limited size, you can incorporate it as a static text as shown in all examples above, however if your text is large and you expect to update it often on your server, we recommend sending it as a part of dynamic data, this will improve overall readability of the JSON and allow to load always up to date text from your server. Please note: We use array text property for static cases since it’s easier to read. However the components support both types:Array of strings and string. Your markdown can be sent as a normal string, you don’t need to convert it to an array of strings.
Flow JSON
{
Enter to Rename, Shift+Enter to Preview
Preview
Run
Settings
Select screen
TOC
Preview Flow Your content Managed by the business. Learn more Learn more
Syntax cheatsheet
Supported starting with Flow JSON version 5.1 Here is the quick overview of the syntax that’s supported by RichText, TextBody and TextCaption componentsUsage example
Flow JSON { Enter to Rename, Shift+Enter to Preview Preview Run Settings Select screen FIRST_SCREEN Preview Flow This is a markdown example inside TextCaption. You can combine different_formatting_
Text Entry Components
TextInput
TextArea
Limits and Restrictions
Together, the text entry components look like as shown:
Flow JSON
{
Enter to Rename, Shift+Enter to Preview
Preview
Run
Settings
Preview Flow
Text Input
Text InputNumber Input
Number InputEmail Input
Email InputPassword Input
Password InputPasscode Input
Passcode InputPhone Input
Phone InputRegex Input
Regex InputE.g. 1993-08-04
E.g. 1993-08-04Regex Passcode
Regex PasscodeContains: 007
Contains: 007 This is text areaText Area
Text Area 17 / 600 Continue Managed by the business. Learn more Learn moreCheckboxGroup
CheckboxGroup component allows users to pick multiple selections from a list of options.
Images in WEBP format are not supported on iOS versions prior to iOS 14.
Example
Flow JSON { Enter to Rename, Shift+Enter to Preview Preview Run Settings Preview Flow Extras: Pick something to go with your meal
- Fries
- Coleslaw
Preview Flow Explore our exciting packages
data-source field, you can declare it dynamically or statically.
Static Example
This static example hardcodes the respectiveid’s and title’s for the data-source field.
Flow JSON
{
Enter to Rename, Shift+Enter to Preview
Preview
Run
Settings
Preview Flow Checkbox group example(optional)
- Checkbox 1
- Checkbox 2
- Checkbox 3
Dynamic Example
In this dynamic example, you can see thatdata-source references the days_per_week_options of type array defined before it using days_per_week_options. When defining such a structure, you need to specify items in the array, which will be of type object. Then inside the items object, you have a properties dictionary with id and title just like in the static declaration. Both id and title will always be of type String. Within the days_per_week_options array, you must define concrete examples in the __example__ field.
Flow JSON
{
Enter to Rename, Shift+Enter to Preview
Preview
Run
Settings
Preview Flow How often would you like to workout?
- 2 days a week
- 3 days a week
- 4 days a week
- 5 days a week
- 6 days a week
Limits and Restrictions
RadioButtonsGroup
Images in WEBP format are not supported on iOS versions prior to iOS 14.
Example
Flow JSON { Enter to Rename, Shift+Enter to Preview Preview Run Settings Preview Flow Appointment type Choose your preferred appointment type
- Online
- In Person
Preview Flow Explore our exciting packages
data-source field, you can declare it dynamically or statically.
Static Example
This static example hardcodes the respectiveid’s and title’s for the data-source field.
Flow JSON
{
Enter to Rename, Shift+Enter to Preview
Preview
Run
Settings
Preview Flow Radio Buttons Group example
- RadioButton 1
- RadioButton 2
- RadioButton 3
Dynamic Example
In this dynamic example, you can see thatdata-source references the experience_level_options of type array defined before it using data.experience_level_options. When defining such a structure, you need to specify items in the array, which will be of type object. Then inside the items object, you have a properties dictionary with id and title just like in the static declaration. Both id and title will always be of type String. Within in the experience_level_options array you must define concrete examples in the __example__ field.
Flow JSON
{
Enter to Rename, Shift+Enter to Preview
Preview
Run
Settings
Preview Flow How experienced are you with weight training?
- Beginner
- Intermediate
- Expert
Limits and Restrictions
Footer
Flow JSON
{
Enter to Rename, Shift+Enter to Preview
Preview
Run
Settings
Select screen
DEMO_SCREEN
Preview Flow This is a left caption This is a right caption This is a footer Managed by the business. Learn more Learn more
Limits and Restrictions
OptIn
Example
Flow JSON { Enter to Rename, Shift+Enter to Preview Preview Run Settings Select screen DEMO_SCREEN Preview Flow This is an OptIn Read more Read more Managed by the business. Learn more Learn more
Limits and Restrictions
Dropdown
Images in WEBP format are not supported on iOS versions prior to iOS 14.
Example
Flow JSON { Enter to Rename, Shift+Enter to Preview Preview Run Settings Preview Flow
Burgers
Burgers Continue Managed by the business. Learn more Learn more Flow JSON { Enter to Rename, Shift+Enter to Preview Preview Run Settings Preview Flow
Insurance options
Insurance options Continue Managed by the business. Learn more Learn moreLimits and Restrictions
For the
data-source field, you can declare it dynamically or statically.
Static Example
This static example hardcodes the respectiveid’s and title’s for the data-source field.
Flow JSON
{
Enter to Rename, Shift+Enter to Preview
Preview
Run
Settings
Preview Flow
Dropdown
DropdownDropdown
(optional) Continue Managed by the business. Learn more Learn moreDynamic Example
In this dynamic example, you can see thatdata-source references the experience_level_options of type array defined before it using experience_level_options. When defining such a structure, you need to specify items in the array, which will be of type object. Then inside the items object, you have a properties dictionary with id and title just like in the static declaration. Both id and title will always be of type String. Within the experience_level_options array you must define concrete examples in the __example__ field.
Flow JSON
{
Enter to Rename, Shift+Enter to Preview
Preview
Run
Settings
Preview Flow
How experienced are you with weight training?
Dropdown label
Dropdown labelDropdown label
(optional) Continue Managed by the business. Learn more Learn moreEmbedded Link
Flow JSON
{
Enter to Rename, Shift+Enter to Preview
Preview
Run
Settings
Select screen
DEMO_SCREEN
Preview Flow This is an embedded link Managed by the business. Learn more Learn more
Limits and Restrictions
DatePicker
The DatePicker component allows users to input dates through an intuitive date selection interface. Before Flow JSON version 5.0, the DatePicker doesn’t support scenarios where the business and the end user are in different time zones. We recommend only using the component if you plan to send your Flows to users in a specific timezone. For details, please refer to section Guidelines for Usage Starting from Flow JSON version 5.0, the DatePicker has been updated to use a formatted date string in the format “YYYY-MM-DD”, such as “2024-10-21”, for setting and retrieving date values. This update makes the date values of the date picker unrelated to time zones, allowing businesses to send messages and collect dates from users in any time zone.
Payload that is sent to a data channel business endpoint is a string which shows the timestamp in milliseconds.
Flow JSON
{
Enter to Rename, Shift+Enter to Preview
Preview
Run
Settings
Preview Flow
Date
Date(optional)
(optional) Continue Managed by the business. Learn more Learn moreGuidelines for Usage
Before flow JSON version 5.0
Due to current system limitations, the DatePicker functions correctly and as intended(that is, correct selection range is shown to the User, and accurate user-selection value is returned to the Business) as long as- The guidelines in this section are followed
- Both the business sending the Flow and its end-users are in the same time zone.
Handling of Dates for Businesses and Users in the Same Time Zone
DatePicker allows setting of date range for user selection throughmin-dates and max-dates fields, and also prevents selection of specific dates using the unavailable-dates field. If you have not supplied the date range , then by default, the component allows the user to select dates from 1 January 1900 to 31 December 2100.
Setting Date Parameters in the Component
When you specify the date range or set unavailable dates, you should convert your local dates with midnight (00:00:00) as a base time to UTC timestamps.
For example, if you are a business based in India who wants to collect a date in the range 21 March 2024 to 25 March 2024, then you should set min-dates and max-dates as 1710958020000 and 1711303620000, respectively.
21 March 2024, 00:00:00.000 IST converts to 20 March 2024, 18:30:00.000 UTC which is represented by timestamp 1710958020000.
25 March 2024, 00:00:00.000 IST converts to 24 March 2024, 18:30:00.000 UTC which is represented by timestamp 1711303620000.
Component Integration
DatePicker will read the timestamps in min-dates, max-dates and unavailable-dates fields and convert it to the end user’s local date for displaying on the UI. In the example we discussed above, a user in India will see dates from 21 March 2024 to 25 March 2024 in the DatePicker component.
Processing User Selection
Businesses will receive a UTC timestamp, which should be converted back to the business’s local time zone. Importantly, businesses should focus solely on the date portion of the resulting timestamp , disregarding the time portion. This ensures that the date remains consistent with the user’s selection. Unfortunately, this conversion will only work correctly when the business and user are in the same time zone.
For example, if you receive a timestamp 1711013400000 then convert it to your local timezone and extract the date. If you are in IST, the timestamp will convert to 21 March 2024 15:00 IST, and you should treat 21st March 2024 as the user selected date.
Recommendation for navigating Time Zone differences
If you need to send flow messages to users in time zones different from yours despite reviewing the above guidelines, follow these steps to overcome the limitation:- If you are a business based in Brazil and want to serve flows to your users across the country, then your time zone range will be
UTC-2 (Fernando de Noronha)toUTC-5 (Rio Branco). - Add a
Dropdowncomponent within your Flow that allows users to select their current time zone. - Identify the westernmost time zone from your time zone range. In our example, it is
UTC-5. - Provide the dates you want to collect in the westernmost time zone, using midnight as the reference time. For example, if you want to collect dates from
March 20th, 2024toMarch 25th, 2024, then provide the timestamp in milliseconds forMarch 20th, 2024 at 5 AM UTCandMarch 25th, 2024 at 5 AM UTC. - Convert the timestamps received from the user to their respective time zone and use the corresponding date. For example, if a user is in Sao Paulo(UTC-3) and you receive a timestamp of
1710910800000, then convert it toUTC-3to getMarch 20th, 2024.
Start from flow JSON version 5.0
DatePicker component has been updated to use a formatted date string in the format “YYYY-MM-DD”, such as “2024-10-21”, for setting and retrieving date values. This update makes the date values of the date picker unrelated to time zones, allowing businesses to send messages and collect dates from users in any time zone in a consistent manner.Limits and Restrictions
CalendarPicker
Supported starting with Flow JSON version 6.1 The CalendarPicker component allows users to select a single date or a range of dates from a full calendar interface.Examples
CalendarPicker single mode example
Flow JSON { Enter to Rename, Shift+Enter to Preview Preview Run Settings Preview Flow
Single date
Single dateSelect a date
Select a date Continue Managed by the business. Learn more Learn moreCalendarPicker range mode example
Flow JSON { Enter to Rename, Shift+Enter to Preview Preview Run Settings Preview Flow Range calendar Use this to select a date range
Start date
Start dateSelect from date
Select from dateEnd date
End date(optional)
(optional)Select to date
Select to date Continue Managed by the business. Learn more Learn moreLimits and Restrictions
Image
Image Scale Types
Example
Flow JSON { Enter to Rename, Shift+Enter to Preview Preview Run Settings Preview Flow
Limits and Restrictions
If
Supported starting with Flow JSON version 4.0Supported Operators
Example
Flow JSON { Enter to Rename, Shift+Enter to Preview Preview Run Settings Preview Flow
Animal
Animal(optional)
(optional)Type: cat
Type: catIt is not a cat
Complete Managed by the business. Learn more Learn moreRules
Condition
- Should have at least one dynamic value (e.g.
${data...}or${form...}). - Should always be resolved into a boolean (i.e. no strings or number values).
- Can be used with literals but should not only contain literals.
Footer
Footercan be added withinIfonly in the first level, not inside a nestedIf.- If there is a
FooterwithinIf, it should exist in both branches (i.e.thenandelse). This means thatelsebecomes mandatory. - If there is a
FooterwithinIfit cannot exist a footer outside, because the max count ofFooteris 1 per screen.
Limitations and restrictions
The table below show examples of limitations and validation errors that will be shown for certain cases.Switch
Supported starting with Flow JSON version 4.0Example
Flow JSON { Enter to Rename, Shift+Enter to Preview Preview Run Settings Preview Flow
Animal
Animal(optional)
(optional)Type: cat, dog or anything else
Type: cat, dog or anything elseIt is neither a cat nor a dog
Switch is missing required property “value”. Complete Managed by the business. Learn more Learn moreRules
Cases
- Should have at least one value. It cannot be empty (e.g.
"cases": {})
Limitations and restrictions
The table below show examples of limitations and validation errors that will be shown for certain cases.Media upload
Please refer to the specific page for media upload components.Navigation List
Supported from Flows v6.2+. The NavigationList component allows users to navigate effectively between different screens in a Flow, by exploring and interacting with a list of options. Each list item can display rich content such as text, images and tags.
Each item in the list of items supports the following properties:
Images in WEBP format are not supported on iOS versions prior to iOS 14.
The
on-click-action is required for the component, and it can be defined either:
- Once at component-level and it will apply the same action for all items in the list.
- Individually, on each item in the list to allow for different actions to be triggered.
Example
Flow JSON { Enter to Rename, Shift+Enter to Preview Preview Run Settings Select screen FIRST_SCREEN Preview Flow
- Home InsuranceSafeguard your home against natural disasters, theft, and accidents
- Health InsuranceGet essential coverage for doctor visits, prescriptions, and hospital stays
- Intergalactic InsuranceEnjoy coverage for asteroid collisions, alien encounters, and other risks
- Time Travel InsuranceReady for paradox-related damages or unforeseen consequences of altering history
- Dream Loss InsuranceProtection from recurring nightmares or lost opportunities due to poor sleep
Dynamic Example
In this dynamic example, you can see thatlist-items references the insurances of type array defined before it using insurances. When defining such a structure, you need to specify items in the array, which will be of type object. Then inside the items object, you have a properties dictionary with id and main-content just like in the static declaration. Both id will always be of type string and main-content will always be of type object, and accompanied by a definition of its structure. Within the insurances array, you must define concrete examples in the __example__ field.
Flow JSON
{
Enter to Rename, Shift+Enter to Preview
Preview
Run
Settings
Select screen
FIRST_SCREEN
Preview Flow
- Home InsuranceSafeguard your home against natural disasters, theft, and accidents.
- Health InsuranceGet essential coverage for doctor visits, prescriptions, and hospital stays.
Limits and Restrictions
- The `Navigation List` component cannot be used on a terminal screen.
- There can be at most 2 `Navigation List` components per screen.
- The `Navigation List` components cannot be used in combination with any other components in the same screen.
- There can be only one item with a `badge` per list.
- The `end` add-on cannot be used in combination with `media-size` set to `large`.
- The `on-click-action` cannot be defined simultaneously on component-level and on item-level.
Component restrictions
List items restrictions
Content over the limit specified will not be rendered.Chips Selector
Chips Selector component allows users to pick multiple selections from a list of options. Supported starting with Flow JSON version 6.3
If
on-unselect-action is not added, on-select-action will continue to handle both selection and unselection events. However, if on-unselect-action is defined, it will exclusively handle unselection, while on-select-action will be used solely for selection.
Limits and Restrictions
Example
Flow JSON { Enter to Rename, Shift+Enter to Preview Preview Run Settings Preview Flow Personalize your experience(optional) Choose your interests to get personalized design ideas and solutionChoose up to 2 options. 🏡 Room layouts 💡 Lighting 🛠️ Renovation 📐 Room layouts Continue Managed by the business. Learn more Learn more
Image Carousel
The Image Carousel component allows users to slide through multiple images. Supported from Flows v7.1+.
Each item in the list of images supports the following properties:
Limits and Restrictions
Example
Flow JSON { Enter to Rename, Shift+Enter to Preview Preview Run Settings Preview Flow
Dynamic components
Here’s a corrected version: If you check the attribute model of certain components (Dropdown, DatePicker, RadioGroup and CheckboxGroup), you will find that some of them accept the on-xxxx-action attribute. This attribute allows the component to trigger a data-exchange action. It can be used in the following scenarios:
- When a user selects a date in the DatePicker component.
- When the business needs to fetch available data (such as table slots, tickets, etc.) for this selected date by calling a data_exchange action.
- Once the data is received, the user will see an updated screen with new data.
Prerequisites
The following steps require communication between the client and the business server. Please ensure that you have configured the data channel before attempting to use this feature.Step 1 - Defining the layout
Let’s begin with a minimal example, consisting of an empty form and a CTA button, and gradually add more components. Flow JSON { Enter to Rename, Shift+Enter to Preview Preview Run Settings Preview Flow Book Managed by the business. Learn more Learn more So, we want to build a simple form that takes a date and displays the list of available time slots. First, we’ll add a
DatePicker component:
Flow JSON
{
Enter to Rename, Shift+Enter to Preview
Preview
Run
Settings
Preview Flow
Select a date
Select a date(optional)
(optional) Book Managed by the business. Learn more Learn more Next step is to add aDropdown where we will display all available timeslots:
Flow JSON
{
Enter to Rename, Shift+Enter to Preview
Preview
Run
Settings
Preview Flow
Select a date
Select a date(optional)
(optional)Pick a slot
Pick a slotPick a slot
(optional) Book Managed by the business. Learn more Learn moreStep 2 - Defining 3P Data
Until now, we’ve been incorporating static mock data, but now we aim to connect a screen with dynamic data. Dynamic data can originate from various sources:- Initial message payload
navigate- transitioning from the previous screen using anavigateactiondata_exchange- a request to the business server
data_exchange request. So, let’s instruct Flow JSON to use the data channel request by providing the "data_api_version": "3.0" property.
Flow JSON
{
Enter to Rename, Shift+Enter to Preview
Preview
Run
Settings
Preview Flow
Select a date
Select a date(optional)
(optional)Pick a slot
Pick a slotPick a slot
(optional) Book Managed by the business. Learn more Learn moreStep 3 - Allowing DatePicker to Make a Request to the Server
Let’s provide"on-select-action" to the DatePicker component so we can execute the call to the business server. In the payload, we can pass any data we want to the business server to understand the type of request.
Preview Flow
Select a date
Select a date(optional)
(optional)Pick a slot
Pick a slotPick a slot
(optional) Book Managed by the business. Learn more Learn more In this example, we’ll send the value of the fielddate to the action payload, and we’ll also add some static data "component_action": "update_date" to help the server recognize the type of request. There is no strict format here; you can choose whatever works for your case.
Now when you try to select a date, a data_exchange request will be executed. The server may return the data that can change the UI. For now, our Flow doesn’t expect or use any data from the server. Let’s fix it by first defining the data model that we expect for a screen.
Step 4 - Define a Server Data Model
Let’s declare adata property for the screen outlining the data that we expect to receive from the server. So, we want to receive an available_slots array with timeslot options.
It should have the following model. The __example__ field is mock data used to display the data within the web preview.
Preview Flow
Select date
Select dateTime
TimeTime
(optional) Start Managed by the business. Learn more Learn moreStep 5 - Control Visibility of the Component
Now, when we select a date inDatePicker, the application will send a request to the business server to get available timeslots. However, we don’t want a Dropdown to be visible until there is data to display. How can we hide it?
For this purpose, we can use the visible attribute on Dropdown and connect it with server data. The business server can control the visibility of the component based on a set condition.
So, we need to make the following changes:
- Define
is_dropdown_visiblein thedatamodel of the screen. - Connect a property via dynamic binding
"visible": "${data.is_dropdown_visible}". - Ensure that the server returns the correct data.
Preview Flow

