Browse Source

fix VAPI assistant name lenght limit

Fszontagh 4 months ago
parent
commit
a98111830f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      supabase/functions/_shared/vapi-client.ts

+ 2 - 2
supabase/functions/_shared/vapi-client.ts

@@ -113,7 +113,7 @@ export async function registerPhoneNumber(
 
   const result = await vapiRequest('POST', '/phone-number', {
     provider: 'byo-phone-number',
-    name: storeName,
+    name: `shopcall.ai - ${storeName}`,
     number: phoneNumber,
     numberE164CheckEnabled: false,
     credentialId: KOMPAAS_CREDENTIAL_ID
@@ -305,7 +305,7 @@ function buildAssistantConfig(config: VapiAssistantConfig): Record<string, unkno
   const webhookAuthToken = getVapiWebhookAuthToken()
 
   return {
-    name: `${config.storeName} - SHOPCALL - HU (Protokollal)`,
+    name: `SC_${config.storeId}`, // max 40 chars -> stores.id = 37char (UUID)
     voice: {
       provider: '11labs',
       model: 'eleven_turbo_v2_5',