Skip to main content

Working with WhatsApp conversations

Once a WhatsApp channel is connected, every message your customers send to that number arrives in AnyDB as a record. This page explains how those records are organized, how to reply, and how to automate the work around them.

How incoming messages are organized​

  • One conversation per customer per number. The first message from a customer creates a Conversation in the channel's database. Every later message from that customer to the same business number is added to the same conversation, however much time has passed.
  • One message record per message. Each WhatsApp message becomes a Message attached to its conversation, with Direction Inbound and Delivery Status Received.
  • The conversation's Subject starts as the customer's WhatsApp profile name, or their number if they have no name. You can edit it.
  • New conversations start with Status Open.
A closed conversation stays closed

When a customer writes again to a conversation you've set to Closed, the message is added to it but the Status doesn't change. To find conversations with new activity, sort or filter on Last Message At.

Because conversations and messages are ordinary records, you can build views on them. For example, a list of Open conversations sorted by Last Message At, or a board grouped by Assigned To.

What each kind of WhatsApp message looks like​

Customer sendsIn AnyDB
TextThe text, in Body.
Image, video, document, audio or stickerAny caption in Body, and the file in Attachments. See Attachments.
LocationThe place name, address and coordinates, in Body.
A reply to buttons or a listThe title of the option they chose, in Body.
A reactionThe emoji, in Body.

Contacts​

When a customer messages a number for the first time, AnyDB tries to link the new conversation to their Contact record, through Related Record:

  1. AnyDB looks for a Contact in the database whose Mobile or Phone Number field holds the customer's number. The match is exact, so store numbers in the international format WhatsApp uses: digits only, with or without a leading +, for example +15551234567. A number saved as (555) 123-4567 won't match.
  2. If exactly one contact matches, it's linked. If more than one matches, AnyDB doesn't guess and links none.
  3. If none matches and Auto-create contacts is on, AnyDB creates a Contact and links it. It splits the customer's WhatsApp profile name into First Name and Last Name, and saves their number in Mobile.

Contacts are only created if the database has the Contact type, or if Auto-import Contact type is on in the channel's Advanced settings.

Linking happens once, when the conversation is created. You can change Related Record by hand at any time.

Replying​

Open a Conversation record to see its messages as a chat thread, newest at the bottom. Type in the box at the bottom and press Enter to send. Use Shift+Enter for a new line.

Your reply is added straight away as a Message with Direction Outbound and Delivery Status Queued, and AnyDB sends it to WhatsApp in the background.

To reply, you need permission to create records in the conversation's database.

The 24-hour window​

WhatsApp only lets a business send free-form messages to a customer within 24 hours of that customer's last message. This is WhatsApp's rule, not AnyDB's.

  • The conversation's Window Expires At field shows when the current window closes. Each new message from the customer moves it forward.
  • While the window is open, you can reply freely.
  • Once it closes, the reply box is disabled, with the note WhatsApp only allows template messages more than 24 hours after the last customer message.

To contact a customer after the window closes, send a template message: a message you've had approved in Meta's WhatsApp Manager. Templates are sent from a workflow; see Automating WhatsApp. When the customer replies, the window opens again.

Delivery status​

An outbound message's Delivery Status moves forward as WhatsApp reports on it:

StatusMeaning
QueuedSaved in AnyDB and waiting to be sent.
SentAccepted by WhatsApp.
DeliveredReached the customer's phone.
ReadThe customer opened it. They will only send read receipts if they have them turned on.
FailedNot delivered. Delivery Detail holds WhatsApp's reason, word for word. In the chat thread, hover over the failed message to see it.

Common reasons for Failed:

  • The 24-hour window was closed and no template was given.
  • The template name or language doesn't match an approved template.
  • The number isn't on WhatsApp.
  • The recipient number isn't in international format with a leading +.

Attachments​

Images, videos, documents, audio and stickers that customers send are saved as files in the message's Attachments. You can open, download and preview them like any other AnyDB file.

  • Files are downloaded in the background, so a message can appear a moment before its attachment.
  • Each file is limited to 25 MB. WhatsApp's own limits are usually lower.
  • If a file can't be downloaded, the message is still saved, and Delivery Detail notes which attachment is missing.
  • Attachments count toward your team's file storage.

Sending files to customers isn't supported yet; see Current limitations.

Automating WhatsApp​

Workflows can react to WhatsApp traffic and send messages. Sending from a workflow needs a Business or Enterprise plan.

React to new messages​

Use the When a record is created trigger on the Message type to run a workflow for every message, or on Conversation to run once per new customer conversation. For example:

  • Assign every new conversation to a support group.
  • Create a support ticket or lead linked to the conversation.
  • Notify a teammate when a message's Body contains certain words.

To act only on customer messages, add a condition that Direction is Inbound.

Send a message from a workflow​

The Send a message action sends a WhatsApp message within an existing conversation, using the conversation's channel. Its inputs:

InputWhat to enter
conversationadoidThe Conversation to send in. Required.
toThe customer's number in international format with a leading +. Use a number from the conversation's Participants. Required.
bodyThe message text. Used while the 24-hour window is open.
templatenameThe name of an approved template. Required once the window has closed.
templatelanguageThe template's language code, such as en_US. Defaults to en_US.

The message is added to the conversation as an outbound Message, and its delivery status updates like any other reply. AnyDB doesn't check template names. If Meta rejects one, the message is Failed and Delivery Detail holds Meta's reason.

Costs and the daily send cap​

Meta charges your Meta business account for some WhatsApp messages, mainly template messages sent outside the 24-hour window. AnyDB doesn't add a charge. See Meta's pricing page for current rates.

To limit how much a channel can send, set Daily send cap in the channel's Advanced settings. It counts the messages queued from that channel per day (UTC), whether they're replies or workflow sends. Once the cap is reached, AnyDB refuses new sends until the next day. Incoming messages are not affected.

Current limitations​

  • No outgoing files. Replies and workflow messages can be text or templates only.
  • Templates are workflow-only, without variables. The reply box can't send templates. The Send a message action takes a template name and language, but not values for a template's placeholders, so only templates without variables can be sent.
  • No template management in AnyDB. Create and get templates approved in Meta's WhatsApp Manager.
  • Closed conversations don't reopen automatically when the customer writes again.
  • Contacts are matched on exact number formatting. See Contacts.