Add WhatsApp Form Step

WhatsApp Form card: build and connect a form

What the card does

The WhatsApp Form card sends the customer one message with a button. Tapping it opens a form inside WhatsApp, the customer fills in every question at once, and the answers are saved to the fields you choose.

Use it instead of a row of Data entry cards when you ask several questions in a row. WhatsApp charges for each message the bot sends, so five questions cost five messages, while one form costs one.

The form itself is built in Meta's WhatsApp Manager, where Meta calls it a Flow. In Glassix it is a WhatsApp Form: same thing, different name.

Before you start

The card sends a form only when all of these hold. Otherwise the bot takes the card's Not submitted exit straight away and goes on with whatever you connected there.

  • The conversation is on WhatsApp, through a number connected to Glassix by Vonage. On the web chat, SMS or any other channel, the card sends nothing and the bot goes straight to the Not submitted exit.
  • The customer wrote in the last 24 hours. WhatsApp only lets a business send a form inside that window. A form is not sent at the start of a conversation you opened with a template.
  • You have access to WhatsApp Manager for the same WhatsApp account as the number the bot runs on. A form built in another account cannot be sent from this number.

The customer needs the WhatsApp phone app. WhatsApp Web, the desktop app and very old app versions cannot open a form; those customers usually reply with text, which takes Not submitted.

Step 1: build the form in WhatsApp Manager

  1. Open WhatsApp Manager and pick the WhatsApp account of the number your bot runs on.
  2. Go to Account tools > Flows and click Create flow.
  3. Give it a name, pick a category, and choose a template without endpoint. Forms that call your own server are not supported.
  4. Add the questions. Text, email, phone, number, date, dropdown, single choice, multiple choice and opt-in all work.
  5. Give every question a clear name (for example city or email). You will type these names into Glassix, so do not rename them after you connect the form.
  6. For choice questions, set each option's ID to the text you want the agent to see, for example Tel Aviv rather than 0_Tel_Aviv. Glassix saves and shows the option ID, not its label.
  7. Make sure the last screen's Complete action sends every field. A field it leaves out never reaches Glassix.
  8. Click Publish. A draft form cannot be sent to customers.

Step 2: find the form ID

The form ID is a long number, for example 1234567890123456. In WhatsApp Manager open Account tools > Flows; the ID is in the Flow ID column next to the form's name, and in the form's page address. Copy it as is: digits only, no spaces.

Step 3: find the field names

Each row in the card needs the name of a form field. Open the form in WhatsApp Manager and switch the editor to JSON. On the last screen, look for the complete action's payload: its keys are the names Glassix receives.

The names look different depending on how the form was built:

Built withExample key in the payloadWhat to type in Glassix
The visual editorscreen_1_city_0city, or the whole key
A Meta template or JSONcitycity

Glassix ignores upper and lower case, and accepts the name with spaces instead of underscores (Purchase experience matches screen_1_Purchase_experience_0).

Step 4: add the card to your bot

  1. In the bot editor, open the add-card menu and pick WhatsApp Form under Data Collection.
  2. Paste the Form ID from step 2.
  3. Edit the text if you like. It is the chat message above the button and comes pre-filled.
  4. Edit the button text if you like: up to 20 characters, no emoji. It comes pre-filled.
  5. Under Field mappings, click Add field once per answer you want to keep. Type the form field name from step 3 on the left, and pick where to save it on the right: a ticket field, the customer's name, phone or email, or one of the flow's bot variables.
  6. Connect the two exits, Submitted and Not submitted, then save.

A field you do not list is still shown to the agent, but it is not saved anywhere. To keep it in a bot variable, create the variable in the flow first, then map the field to it.

The card cannot be saved without a numeric form ID, a valid button text, and a name and a target on every row. A form field can appear in only one row.

What happens in the conversation

The customer gets your text with the button, taps it, fills in the form and taps Send. The bot then saves the mapped answers and continues.

What happensExit the bot takes
The customer sends the formSubmitted
The customer writes a message insteadNot submitted. The message stays in the conversation.
WhatsApp rejects the form (wrong ID, not published, another account)Not submitted, a few seconds after sending
The form cannot be sent (not WhatsApp, more than 24 hours)Not submitted, at once
The customer does nothingNeither. The flow's idle close ends the conversation, as for any question.

Connect Not submitted to your regular questions, so customers who cannot open the form still get through.

The agent sees the answers as a short list in the conversation, one line per field, for example city: Tel Aviv. Each answer that was saved replaces the old value of that field, the same way Data entry does.

A form sent after the bot moved on, or after an agent took over, is shown to the agent but not saved to any field, and the bot does not go back.

Test before you go live

The editor's preview chat runs as a web chat, so it cannot show a form: there the card always takes Not submitted. Test on a real WhatsApp number instead.

  1. Map the bot to a WhatsApp number you can write to from your phone.
  2. Write to it from the WhatsApp phone app, reach the card, open the form and send it.
  3. Check that the bot continued on Submitted and that each mapped field holds the right value.
  4. Write a text instead of opening the form once, and check that the bot continued on Not submitted.

If the bot took Not submitted without you doing anything, open Chatbot logs. The entry says the form was rejected or not sent, with WhatsApp's reason.

Changing a form later

Editing a published form in WhatsApp Manager keeps its ID but turns it back into a draft. Publish it again, or the card stops working. The card in Glassix needs no change unless you renamed or added fields.

Copying (cloning) a form creates a new form with a new ID. Paste the new ID into the card.

Customers who already got the old message keep seeing the old version of the form until the bot sends it again.

Troubleshooting

What you seeLikely causeWhat to do
The message is marked as failed and the bot takes Not submittedWrong form ID, the form is a draft, or it belongs to another WhatsApp accountCheck the ID in Account tools > Flows, publish the form, and make sure it is in the account of the bot's number
The customer sees the text but no buttonThe conversation is not on WhatsApp, or the number is not connected through VonageUse the card only in flows that run on WhatsApp
Not submitted right after the card, with no message sentMore than 24 hours since the customer last wrotePut the card after a question the customer answers
The bot continued, but a field is emptyThe name in the row does not match the form's field name, or the form's last screen does not send that fieldCompare the row with the complete payload in the form's JSON
A choice answer shows as 0_Tel_Aviv style textThe option ID in the form is not the readable labelSet each option's ID to its label in WhatsApp Manager and publish again
An email or phone answer was not savedGlassix checks it the same way Data entry does and refused the valueThe agent still sees it in the answers list
Some sends fail after working beforeMeta limited the form (10 sends an hour) or blocked itCheck the form's status in WhatsApp Manager

Did this page help you?