Skip to content

Commit 75c76ab

Browse files
Revert "Merge pull request #243 from twilio-labs/feat/pickup-location-welcome"
This reverts commit 08bf6ce, reversing changes made to 6382ab7.
1 parent 461e2d9 commit 75c76ab

5 files changed

Lines changed: 7 additions & 21 deletions

File tree

src/app/(layout-free)/event/[slug]/kiosk/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default async function KioskPage(props: {
3131
return (
3232
<div className="p-4 space-y-8 flex-1">
3333
<p className="text-xl md:text-4xl">
34-
Order your beverage here and pick it up at {(event?.data as any)?.pickupLocation || "the Twilio booth"}.
34+
Order your beverage here and pick it up at the Twilio booth.
3535
</p>
3636
{hasPermissions && (
3737
<OrderForm

src/app/(master-layout)/event/[slug]/page.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -404,15 +404,6 @@ function EventPage({ params }: { params: Promise<{ slug: string }> }) {
404404
{touched.pickupLocation && fieldErrors.pickupLocation && (
405405
<p className="text-xs text-red-500">{fieldErrors.pickupLocation}</p>
406406
)}
407-
<p className="text-xs text-gray-400 italic">
408-
{internalEvent.pickupLocation.length >= 3
409-
? (internalEvent.language ?? "en") === "pt-BR"
410-
? `"Bem-vindo ao ${internalEvent.pickupLocation}!"`
411-
: `"Welcome to ${internalEvent.pickupLocation}!"`
412-
: (internalEvent.language ?? "en") === "pt-BR"
413-
? `"Bem-vindo ao Estande da Twilio!"`
414-
: `"Welcome to the Twilio Booth!"`}
415-
</p>
416407
</div>
417408
<div className="space-y-1.5">
418409
<Label htmlFor="language">Language</Label>

src/app/webhooks/messaging/ai-agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Rules:
269269
* Always reply in ${languageName}, regardless of what language the user writes in.
270270
* When suggesting menu items, ALWAYS format them as a markdown list.
271271
* Never fabricate information on tool execution failures. Acknowledge errors without speculation.
272-
* If the users want to learn more about Twilio, point them to the Twilio employees at ${event.pickupLocation || "the booth"}.
272+
* If the users want to learn more about Twilio, point them to the Twilio employees at the booth.
273273
* If they want to reach out to sales, point them to https://www.twilio.com/en-us/help/sales
274274
* UNDER NO CIRCUMSTANCES TALK ABOUT TWILIO COMPETITORS. If asked, say you can't help with that and suggest they ask a Twilion.
275275
* Use the log_feedback tool if the user asks for something you cannot do. This stores their attempted action so we can improve the system.`;

src/app/webhooks/messaging/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async function selectEventForCustomer(
118118

119119
const welcomeMsg = isReturning
120120
? getWelcomeBackMessage(newEvent.selection.mode, newEvent.name, newEvent.welcomeMessage, eventLang(newEvent))
121-
: getWelcomeMessage(newEvent.selection.mode, newEvent.welcomeMessage, newEvent.leadCollection, eventLang(newEvent), newEvent.pickupLocation);
121+
: getWelcomeMessage(newEvent.selection.mode, newEvent.welcomeMessage, newEvent.leadCollection, eventLang(newEvent));
122122
sendMessage(sender, welcomeMsg, undefined, undefined, from);
123123

124124
const country = getCountryFromPhone(sender);
@@ -157,7 +157,7 @@ async function selectEventForCustomer(
157157
const newEvent = matches[0].data as Event;
158158
const welcomeMsg = isReturning
159159
? getWelcomeBackMessage(newEvent.selection.mode, newEvent.name, newEvent.welcomeMessage, eventLang(newEvent))
160-
: getWelcomeMessage(newEvent.selection.mode, newEvent.welcomeMessage, newEvent.leadCollection, eventLang(newEvent), newEvent.pickupLocation);
160+
: getWelcomeMessage(newEvent.selection.mode, newEvent.welcomeMessage, newEvent.leadCollection, eventLang(newEvent));
161161
sendMessage(sender, welcomeMsg, undefined, undefined, from);
162162

163163
const country = getCountryFromPhone(sender);

src/lib/stringTemplates.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,10 @@ export function getWelcomeMessage(
7373
customWelcomeMessage?: string,
7474
leadCollection: LeadCollection = "NONE",
7575
language: Language = "en",
76-
pickupLocation?: string,
7776
) {
78-
const defaultWelcome = pickupLocation
79-
? language === "pt-BR"
80-
? `Bem-vindo ao ${pickupLocation}! Está pronto para um ${modeToBeverage(mode, language)} por nossa conta? 🎉`
81-
: `Welcome to ${pickupLocation}! Are you ready for a ${modeToBeverage(mode, language)} on us? 🎉`
82-
: language === "pt-BR"
83-
? `Bem-vindo ao Estande da Twilio! Está pronto para um ${modeToBeverage(mode, language)} por nossa conta? 🎉`
84-
: `Welcome to the Twilio Booth! Are you ready for a ${modeToBeverage(mode, language)} on us? 🎉`;
77+
const defaultWelcome = language === "pt-BR"
78+
? `Bem-vindo ao Estande da Twilio! Está pronto para um ${modeToBeverage(mode, language)} por nossa conta? 🎉`
79+
: `Welcome to the Twilio Booth! Are you ready for a ${modeToBeverage(mode, language)} on us? 🎉`;
8580

8681
const welcomeMessage = customWelcomeMessage || defaultWelcome;
8782

0 commit comments

Comments
 (0)