diff --git a/src/app/components/whatsapp-chatbot/WhatsAppReceptionTab.tsx b/src/app/components/whatsapp-chatbot/WhatsAppReceptionTab.tsx index ffd1fa74..45398dcc 100644 --- a/src/app/components/whatsapp-chatbot/WhatsAppReceptionTab.tsx +++ b/src/app/components/whatsapp-chatbot/WhatsAppReceptionTab.tsx @@ -74,6 +74,7 @@ function receptionFromBot(bot: ConciergeBotRecord): ConciergeBotReception { allowNonRegistered: Boolean(r.allowNonRegistered), prefillText: r.prefillText || "Hi", welcomeMessage: r.welcomeMessage || DEFAULT_WELCOME, + welcomeCtas: Array.isArray(r.welcomeCtas) ? r.welcomeCtas : [], unmatchedBadgePrompt: r.unmatchedBadgePrompt || DEFAULT_BADGE, staffHandoffMessage: r.staffHandoffMessage || DEFAULT_STAFF, dripAudience: r.dripAudience === "all_inbound" ? "all_inbound" : "matched", @@ -180,7 +181,9 @@ export function WhatsAppReceptionTab({ setSaving(true); setMsg(null); let dripsPayload: ConciergeReceptionDrip[]; + let welcomeCtas: WhatsAppCtaItem[]; try { + welcomeCtas = normalizeCtasForSave((reception.welcomeCtas || []) as WhatsAppCtaItem[]); dripsPayload = (reception.drips || []).map((d) => { const ctas = d.contentKind === "upcoming_agenda" ? [] : normalizeCtasForSave((d.ctas || []) as WhatsAppCtaItem[]); @@ -209,6 +212,7 @@ export function WhatsAppReceptionTab({ const res = await conciergeBotsApi.update(bot._id, { reception: { ...reception, + welcomeCtas, drips: dripsPayload, }, }); @@ -400,6 +404,12 @@ export function WhatsAppReceptionTab({
Placeholders: {"{firstName}"}, {"{profileName}"}, {"{eventName}"}, {"{engagementUrl}"}
+