WhatsApp template buttons - final configuration

This documents the button configuration for every NeetoCal WhatsApp template, so the templates in Meta's WhatsApp Manager and the payload sent by the engine stay in sync. Related work: neeto-whatsapp-nano#261 (engine support), neeto-cal-web#25488 (redirect endpoints), neeto-cal-web#22488 (epic).

booking_reschedule_for_the_client will be added on Aug 11

What engineering sends

The engine passes template_buttons alongside template_params. Button variables are positional, so no name key is sent:

template_buttons: [{ index: 0, sub_type: "url", text: booking.sid }, { index: 1, sub_type: "url", text: booking.sid }]

index is the button's 0-based position in the template, matching the table below. Every button carries the same value - the booking sid - because the action lives in the URL path, not in the value. Sids are alphanumeric, so Meta's percent-encoding requirement does not apply.

Template

Index

Button text

URL

booking_confirmation_for_the_client

0

Reschedule

https://app.neetocal.com/api/v1/whatsapp/reschedule/{{1}}

booking_confirmation_for_the_client

1

Cancel

https://app.neetocal.com/api/v1/whatsapp/cancel/{{1}}

booking_reminder_for_the_client

0

Reschedule

https://app.neetocal.com/api/v1/whatsapp/reschedule/{{1}}

booking_reminder_for_the_client

1

Cancel

https://app.neetocal.com/api/v1/whatsapp/cancel/{{1}}

booking_confirmation_for_the_host

0

View booking

https://app.neetocal.com/api/v1/whatsapp/admin/booking/{{1}}

booking_reminder_for_the_host

0

View booking

https://app.neetocal.com/api/v1/whatsapp/admin/booking/{{1}}

booking_reschedule_for_the_host

0

View booking

https://app.neetocal.com/api/v1/whatsapp/admin/booking/{{1}}

booking_cancellation_for_the_host

0

View booking

https://app.neetocal.com/api/v1/whatsapp/admin/booking/{{1}}

booking_awaiting_approval_for_the_host

0

View booking

https://app.neetocal.com/api/v1/whatsapp/admin/booking/{{1}}

Templates with no buttons

Template

Reason

booking_awaiting_approval_for_the_client

The booking details are already in the message body; a View booking button adds nothing.

booking_cancellation_for_the_client

Nothing actionable remains on a cancelled booking.

booking_rejected_for_the_client

The body already tells the client they can book a new slot.

Redirect endpoints

Because the base URL must be fixed, every button points at app.neetocal.com, which looks the booking up by sid and 302s to the organization's real URL. Three actions are in use:

  • https://app.neetocal.com/api/v1/whatsapp/reschedule/ - client-facing reschedule page

  • https://app.neetocal.com/api/v1/whatsapp/cancel/ - client-facing cancellation page

  • https://app.neetocal.com/api/v1/whatsapp/admin/booking/ - host's admin booking page

Host and client buttons must use different paths. The endpoint only receives a sid, so it cannot tell who tapped - without a separate /admin/ path a host would land on the client-facing view and be unable to act.

How Meta URL buttons work

These constraints drove every decision above.

  • A URL button is a fixed base URL with one variable appended at the very end. Nothing else in the URL can vary, so a per-organization subdomain such as chirag.neetocal.com cannot be used.

  • The variable on a button is positional - {{1}} - even when the template body uses named variables such as {{client_name}}. WhatsApp Manager offers no way to name a button variable.

  • Maximum 2 URL buttons per template.

  • A sample URL is required for review. Meta never calls the URL, so the redirect endpoints do not need to be live before a template is approved.

  • Editing an approved template sends it back for review (roughly 1 edit per day, 10 per month, per template).