https://discord.gg/botpress logo
Change the "choose..." text in the WhatsApp menu
# 🤝help
f
Hi everyone, I'm developing a WhatsApp bot and noticed that when I send interactive message buttons, WhatsApp automatically displays "Choose..." as a prompt below my message. I'm looking for a way to customize this text to something more specific like "Menu" or "Select an option". https://cdn.discordapp.com/attachments/1426792580561109073/1426792580984864880/choose.png?ex=68ec83a3&is=68eb3223&hm=7d252758a1049611874ad6e3858a2b7628c5db4715a931ce546c0f41e5657b57&
l
This is default whatsapp menu You can change it, but then you need to send a WhatsApp interactive message, this will need you to know the API token of your WhatsApp integration
f
i have the whatsapp api token , but idk how send whatsapp interactive message
l
Copy code
const data = {
    messaging_product: 'whatsapp',
    recipient_type: 'individual',
    to: user.phoneNumber,
    type: 'interactive',
    interactive: {
      type: 'list',
      header: {
        type: 'text',
        text: 'The K Story'
      },
      body: {
        text: 'Select an option to begin'
      },
      action: {
        button: 'The K Story Menu',
        sections: [
          {
            title: 'Restaurant Options',
            rows: [
              {
                id: 'the_k_tiffin',
                title: 'The K Tiffin',
                description: 'Subscription based home-style meals delivered to you'
              },
              {
                id: 'the_k_curry',
                title: 'The K Restaurant',
                description: 'Awesome food, great taste'
              },
              {
                id: 'the_k_catering',
                title: 'The K Catering',
                description: 'Home catering service for birthdays kitty party'
              },
              {
                id: 'the_k_bulk_order',
                title: 'The K Bulk Orders',
                description: 'For birthdays kitty party etc.,'
              }
            ]
          },
          {
            title: 'Other Actions',
            rows: [
              {
                id: 'profile',
                title: 'My Profile',
                description: 'View & Update Profile'
              },
              {
                id: 'faq',
                title: 'Customer Support',
                description: 'Chat with K Tiffin'
              },
              {
                id: 'exit',
                title: 'Exit',
                description: 'Exit the Menu'
              }
            ]
          }
        ]
      }
    }
}

console.log(data)

// This sends to META via api.dashboard. Skip can send directly to META via Graph
await axios
  .post(bot.apiurl, data, {
    headers: {
      Authorization: `Bearer ${bot.apiurl_token}`,
      'Content-Type': 'application/json'
    }
  })
  .then((response) => {
    console.log('Success:', response.data)
  })
  .catch((error) => {
    console.error('Error:', error.response ? error.response.data : error.message)
  })
sample
f
ty its me again but now i know how send it and works cool, but now, how can i take the answer and continue to the workflow
nmv i found this
Copy code
if (event.payload && event.payload.value) {
    const respuestaUsuario = event.payload.value; 
    console.log('✅ Respuesta interactiva capturada:', respuestaUsuario);
    
    // Guardar en workflow.RespuestaUsuario
    workflow.RespuestaUsuario = respuestaUsuario;
    
    console.log('💾 Respuesta guardada en workflow.RespuestaUsuario:', workflow.RespuestaUsuario);
    
    // Redirigir según la opción
    switch(respuestaUsuario) {
        case 'cotizacion':
            return 'ir_cotizacion';
        case 'detalles':
            return 'ir_detalles';
        case 'comparar':
            return 'ir_comparar';
        case 'buscar':
            return 'ir_buscar';
        case 'menu':
            return 'ir_menu';
        default:
            console.log('❌ ID no reconocido:', respuestaUsuario);
            workflow.RespuestaUsuario = 'no_valida';
            return 'opcion_invalida';
    }
    
} else {
    console.log('❌ No se recibió una respuesta de lista interactiva válida');
    workflow.RespuestaUsuario = 'no_valida';
    return 'respuesta_invalida';
}