Turn Interest into a WhatsApp Trip Request
Compile the traveller's choices into a pre-written WhatsApp message they review and send themselves — no forms database, no lost emails.
Lesson 6 of 10 · Tourism Tech · built from Nora Travels, Nora Labs, Mahesh Travellers and my hospitality sites
In Sri Lanka, email enquiries are where leads go quiet. A guide answers WhatsApp in minutes. So the trip planner's last step doesn't submit a form — it writes the message for you.
Example — building the message
function prepareRequest(event) {
event.preventDefault();
const f = new FormData(event.currentTarget);
const lines = [
c.requestIntro, '',
`${c.requestName}: ${f.get('name').trim()}`,
`${c.requestDate}: ${f.get('date')}`,
`${c.requestTravellers}: ${f.get('travellers')}`,
`${c.requestDuration}: ${c.durationOptions[Number(duration)]}`,
`${c.requestLanguage}: ${languageNames[lang]}`,
];
if (plan) lines.push(`${c.routeRequest}: ${plan.title[lang]}`);
if (interests.length) lines.push(`${c.requestInterests}: ${interests.map((k) => c[k]).join(', ')}`);
lines.push('', c.requestEnd);
const url = `https://wa.me/<WHATSAPP_NUMBER>?text=${encodeURIComponent(lines.join('\n'))}`;
window.open(url, '_blank', 'noopener,noreferrer');
}Why it works
- Every label is translated (
c.requestName,c.requestDate…), so the message arrives in the traveller's language. encodeURIComponentkeeps line breaks, accents and emoji intact in the URL.noopener,noreferrerstops the new tab from reaching back into your page.- Privacy by design: nothing is stored on the website — the traveller sees exactly what they send.
Clean Air uses the same pattern for AC service quotes: service type, unit and location compiled into one message.
Exercise
Add the selected activities and attractions to the message, but only when the traveller picked at least one. Where in the lines array should they go?
Keep going: ← Lesson 5 · Lesson 7 →
ExerciseKnowledge check
Where are the traveller's enquiry details stored by the Mahesh site?
Finished this one?
Progress is saved in this browser.
Projects in this lesson

AI Agents
Nora Labs
Tourthon 2026 AI-driven multi-agent platform for bespoke Sri Lankan travel itineraries, live driver dispatch, and instant dynamic booking.

Client Web
Mahesh Travellers
Next.js dynamic tourism booking portal showcasing bespoke Sri Lankan tour packages, Ella hiking, cultural heritage, and private driver services.


