Why does my chatbot keep failing when used on a li...
# 🤝help
s
- I want my chatbot to work on a live website but it keeps going up to a certain stage then says 'Sorry, an error occurred. Please try again later' - I expect that the bot should work on a live website just like it worked on the botpress website - My chatbot stops at a certain question and fails
f
Does it stop at the same question every time?
s
yes
f
Screenshot please and let me know which question it stops on
s
okay

https://cdn.discordapp.com/attachments/1129269756197883914/1129272153154527342/image.png

https://cdn.discordapp.com/attachments/1129269756197883914/1129272221655904287/image.png

@full-helmet-73535
f
Can you send a screenshot of the node with the card that asks if they have a specific service in mind
s
sure

https://cdn.discordapp.com/attachments/1129269756197883914/1129273024818987039/image.png

f
And what’s the next node
s
wait a sec

https://cdn.discordapp.com/attachments/1129269756197883914/1129274414932955146/image.png

f
The problem is probably in your execute code card
Can you send code here
s
sure
const teethwhitening = 'Teeth Whitening'; const checkup = 'Check-Up & Clean'; const invisalign = 'Invisalign'; const consultation = 'Consultation'; switch (workflow.whoFor) { case 'Dentist appointment for myself': if (workflow.whyAppointment === 'I want to learn more about your services') { switch (workflow.typeOfService) { case teethwhitening: workflow.nextMsg = 'Great choice! Teeth whitening enhances your smile by removing stains and discoloration, giving you a brighter appearance.'; break; case invisalign: workflow.nextMsg = 'Fantastic! Invisalign is a discreet way to straighten your teeth using clear aligners.'; break; case checkup: workflow.nextMsg = 'Excellent decision! A check-up and clean is a routine dental procedure to keep your smile healthy.'; break; case consultation: workflow.nextMsg = 'Good choice! A consultation allows you to discuss your dental concerns and get personalized recommendations from a dentist.'; break; } } break; case 'Dentist appointment for child': if (workflow.whyAppointment === 'I want to learn more about your services') { switch (workflow.typeOfService) { case teethwhitening: workflow.nextMsg = 'Great choice! Teeth whitening enhances your smile by removing stains and discoloration, giving you a brighter appearance.'; break; case invisalign: workflow.nextMsg = 'Fantastic! Invisalign is a discreet way to straighten your teeth using clear aligners.'; break; case checkup: workflow.nextMsg = 'Excellent decision! A check-up and clean is a routine dental procedure to keep your smile healthy.'; break; } } break; }
3 Views