Add guidance message for non-customers before onboarding redirect
Non-customers attempting to use customer-only features (troubleshoot, billing, asset) now see a friendly explanation before being handed off to the onboarding agent. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -103,6 +103,10 @@ export async function handleMessage(
|
||||
const isCustomer = await checkIsCustomer(env.DB, telegramUserId);
|
||||
if (!isCustomer) {
|
||||
logger.info('비고객 → 온보딩 전환', { intent, telegramUserId });
|
||||
await sendMessage(
|
||||
env.BOT_TOKEN, chatId,
|
||||
getMessage(lang, 'error_customer_only')
|
||||
);
|
||||
const response = await onboardingAgent.processConsultation(env.DB, telegramUserId, text, env, meta);
|
||||
const { cleanText, sessionEnded } = cleanSessionMarkers(response);
|
||||
await storeConversation(env.DB, user.id, text, cleanText, requestId);
|
||||
|
||||
Reference in New Issue
Block a user