Mark an inbound WhatsApp message as read and show a typing indicator while you prepare a response. Improves UX when replies take more than a couple of seconds.
When a customer messages your business and the reply needs a moment to prepare — an LLM agent, a database lookup, an external API call — you can show the same “typing…” dots WhatsApp users see when a friend is replying. The same call also marks the inbound message as read (blue checks).
Show the indicator only when a response really is on the way. The typical pattern is to call it as the first thing your webhook handler does for an inbound message that will trigger slow work:
// In your webhook handler for `message.inbound`await zavu.messages.showTyping(event.data.messageId);const reply = await yourLLM.generate(event.data.text);await zavu.messages.send({ to: event.data.from, channel: "whatsapp", text: reply,});
This is especially valuable for AI Agents — without it, the user sees nothing happen for several seconds after they send their message.