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:
kappa
2026-02-12 10:02:48 +09:00
parent ae8e72119e
commit 7dc43bd331
3 changed files with 6 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ const en: Record<string, string> = {
error_rate_limit: 'Too many requests. Please try again later.',
error_blocked: 'Your account has been restricted.',
error_ai_unavailable: 'AI service is temporarily unstable. Please try again later.',
error_customer_only: 'This feature is available to active customers only. I can help you with service registration or pricing information.',
feedback_prompt: 'Was this consultation helpful?',
feedback_thanks: 'Thank you for your feedback!',
session_end: 'The consultation has ended. Feel free to reach out anytime for further inquiries.',

View File

@@ -5,6 +5,7 @@ const ko: Record<string, string> = {
error_rate_limit: '요청이 너무 많습니다. 잠시 후 다시 시도해주세요.',
error_blocked: '이용이 제한된 계정입니다.',
error_ai_unavailable: 'AI 서비스가 일시적으로 불안정합니다. 잠시 후 다시 시도해주세요.',
error_customer_only: '해당 기능은 서비스 이용 고객 전용입니다. 서비스 가입이나 요금 안내를 도와드리겠습니다.',
feedback_prompt: '상담이 도움이 되셨나요?',
feedback_thanks: '피드백 감사합니다!',
session_end: '상담이 종료되었습니다. 추가 문의가 있으시면 언제든 말씀해주세요.',

View File

@@ -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);