Summary
When you publish a WhatsApp Flow in Wati, custom attributes are automatically created to store the data collected from the flow. These attributes contain both the complete flow content and individual field values. This guide explains how these custom attributes are structured and where you can find them within Wati.
Instructions
Custom Attributes Generated After Publishing a WhatsApp Flow
When a WhatsApp Flow is published, Wati automatically generates custom attributes. A primary attribute, prefixed with the flow's name, contains all the flow's field values. Additionally, individual custom attributes are created for each field within the flow.
For example, if you create a flow named "Lead" with three fields, you'll see the following:
A custom attribute -
Lead_content
- contains all field values in JSON format.Individual custom attributes for each field.
Consider a "Lead" flow with fields for name, city, and country as shown below:
The Lead_content
custom attribute will contain the values from all fields, formatted as a JSON object:
json { "lead_screen_0_textinput_0": "Abhijeet", "lead_screen_0_textinput_1": "Delhi", "lead_screen_0_textinput_2": "India" }
In addition to the Lead_content
attribute, individual custom attributes are created for each field:
lead_screen_0_textinput_0
- Abhijeetlead_screen_0_textinput_1
- Delhilead_screen_0_textinput_2
- India
Viewing Custom Attributes
The generated custom attributes for flows can be viewed in two locations:
WhatsApp Flow Node in Chatbot Builder: You can view its custom attributes when the relevant flow is selected in the Chatbot Builder.
Team Inbox: You can also find the custom attributes within the Team Inbox area.
Frequently Asked Questions (FAQs)
General questions
1. What happens when I publish a WhatsApp Flow in Wati?
→ When you publish a WhatsApp Flow in Wati, custom attributes are automatically generated to store the data collected from the flow. These attributes include both the complete flow content and the values of individual fields.
2. What is the purpose of the primary custom attribute?
→ The primary custom attribute stores all the field values from the flow in a JSON format. This attribute is named using the flow's name followed by _content
. For example, a flow named "Lead" will generate Lead_content
.
3. Are individual custom attributes created for each field in the flow?
→ Yes, Wati creates individual custom attributes for each field within the flow. These attributes store the specific value entered in each field.
4. What is the format of the data stored in the primary custom attribute?
→ The data in the primary custom attribute is stored as a JSON object containing key-value pairs. Each key represents a field in the flow, and the corresponding value is the input collected from the user.
Viewing custom attributes
5. Where can I view the custom attributes generated by a WhatsApp Flow?
→ You can view the custom attributes in two places within Wati:
In the WhatsApp Flow node inside the Chatbot Builder when the relevant flow is selected.
In the Team Inbox section, the attributes and user conversation are visible.
6. How are the custom attributes named?
→ The primary custom attribute uses the flow's name followed by _content
. Individual attributes follow a pattern based on the flow structure, such as lead_screen_0_textinput_0
for specific fields.