Tailor the WhatsApp chat on specific pages with AI
Give each page its own WhatsApp greeting, message or number, or hide the button where it gets in the way.
Prerequisites
A site connected to WPVibe with the free Joinchat plugin (tested on 6.4.1) set up with a WhatsApp number, and an account that can edit the pages you name.
My site uses the free Joinchat plugin for its WhatsApp chat button. Change it on these pages only and leave the site-wide Joinchat settings alone:
- [page or product name]: chat bubble text "[Planning a trip? Ask us about dates]" and pre-filled message "[Hi, I'd like to know more about {TITLE}]"
- [another page]: open a different WhatsApp number, [number with country code, e.g. 15551234567]
- [a page where the button gets in the way]: hide the button
1. Find each page's id with rest_api: GET /wp/v2/pages?search=[name] (use /wp/v2/posts for posts and /wp/v2/product for WooCommerce products). If more than one matches, ask me which.
2. Read each page's current Joinchat settings: GET it with fields id,meta and look at meta._joinchat (empty means it uses the site-wide settings). If meta has no _joinchat key at all, not even an empty one, stop and tell me: this page type doesn't expose Joinchat's page settings, and a write would save nothing. Keep them so you can undo. Show me what each page has now and what you will set, and wait for my yes: these changes go live on those pages at once, there is no draft.
3. Write each page with rest_api_write POST to the same route with {"meta":{"_joinchat":{...}}}. The object you send replaces the page's whole Joinchat setting, so include any existing keys I didn't ask to change. Keys: message_text (the chat bubble text; new lines are fine and *text* is bold), message_send (the pre-filled message; {TITLE} becomes the page title, {URL} its address, {SITE} the site name), telephone (digits with country code), view ("no" hides the button on that page, "yes" shows it even where the site-wide rules hide it). Leave a key out to fall back to the site-wide value. Settings on the WooCommerce Shop page also apply to product category and tag pages; tell me that before changing the Shop page. Don't use run_ability for Joinchat's set-phone, set-cta or set-message: they are not reachable over REST.
4. Load each page with get_page_html and selector .joinchat (if it still shows the old values, clear the page cache and load it again). Where the button should show, confirm its data-settings has the new message_send and telephone and the bubble text is there; where I asked to hide it, nothing should come back. List each page with its link, what it now does and the Joinchat settings it had before (or "none"), so I can undo later: sending the old settings back puts the page as it was, and {"meta":{"_joinchat":{}}} puts it on the site-wide settings.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Tailor the WhatsApp chat on specific pages with AI” recipe from the WPVibe cookbook on my connected site.
One WhatsApp greeting for the whole site means your tour page, your pricing page and your contact page all say the same vague thing, and every chat starts with “which one are you asking about?” Joinchat can give any page its own greeting, pre-filled message, even its own number, and hide the button where it gets in the way. It’s easy to miss, because the setting sits in a panel on each page.
Ask your AI assistant and it finds the pages you name, shows you their current Joinchat settings next to the changes, and waits for your yes. Then it writes each page’s settings through the WordPress REST API, where Joinchat cleans the values with its own code, and loads every page to confirm the button now shows the new greeting, or is gone where you asked to hide it.
List each page with what it should say, which number it should open, or that the button should go. These changes go live on those pages right away, there is no draft step, and your site-wide Joinchat settings stay as they are. The assistant lists what each page had before, so undoing puts a page back as it was, or on the site-wide settings.
Outcome
Each page you named greets visitors with its own text and pre-filled message, opens the number you chose, or shows no button.