Stino12547
Stino1254715mo ago

Chatbot does not work on site

Hey, I'm testing my chatbot on a demo site, but the push buttons that lead to a link from a site don't work on the demo site. They do work in vioceflow. How is this possible?
14 Replies
Tico | Voiceflow Assistant
It sounds like you're experiencing an issue where the push buttons in your chatbot work in Voiceflow but not on your demo site. Here are a few steps to troubleshoot and potentially resolve this issue: 1. Proactive Message Bubble: If you are using proactive message bubbles, make sure the script is correctly set up. For example:
window.voiceflow.chat.load().then(() => {
if (window.location.href.includes('https://store.com/products/firesneakers')) {
window.voiceflow.chat.proactive.clear(); // clear all previous messages
window.voiceflow.chat.proactive.push({ type: 'text', payload: { message: 'Are you interested in some sneakers?' } });
window.voiceflow.chat.proactive.push({ type: 'text', payload: { message: 'Click on the chat to learn more' } });
}
});

window.voiceflow.chat.load().then(() => {
if (window.location.href.includes('https://store.com/products/firesneakers')) {
window.voiceflow.chat.proactive.clear(); // clear all previous messages
window.voiceflow.chat.proactive.push({ type: 'text', payload: { message: 'Are you interested in some sneakers?' } });
window.voiceflow.chat.proactive.push({ type: 'text', payload: { message: 'Click on the chat to learn more' } });
}
});

2. Live Agent Integration: If you are using live agent integration, make sure that the integration is correctly configured. Follow the setup steps provided in the Voiceflow live chat handoff documentation. 3. Custom Actions: If you have custom actions, ensure that they are correctly implemented and that the necessary permissions and tokens are in place. If these steps do not resolve the issue, it might be helpful to review the specific implementation details or share more information about the setup. For more detailed guidance, you can refer to the following resources: - Embed & Customize Styling - Live Chat Handoff
Stino12547
Stino12547OP15mo ago
this is the code I use for the button that points to a site. and again this works in vioceflow but not on the site.
No description
Stino12547
Stino12547OP15mo ago
Can anyone help me with this because I really don't know what this is? @Daniel Could you please help me because I am unable to solve it myself
deep-jade
deep-jade15mo ago
@Stino12547 are you using the out of the box chatbot? Or the react chat? And are you using a function to create or render buttons? Or the button step Also when you say dont work, is it that the buttons appear but dont open a URL when clicked?
Stino12547
Stino12547OP15mo ago
A function They appear but if i click on them noting happend
Stino12547
Stino12547OP15mo ago
No description
Stino12547
Stino12547OP15mo ago
This is the code that i use I don't know what you mean with this. I just made a "normal" chatbot It's already solved, thanks anyway
ambitious-aqua
ambitious-aqua15mo ago
How did you solved it? What was the resolution steps?
quickest-silver
quickest-silver15mo ago
🤔
Stino12547
Stino12547OP15mo ago
My chat ended. So I created a loop so my chatbot doesn't end and then the buttons worked
Stino12547
Stino12547OP15mo ago
@Daniel But now I have an other problem: I created a loop so the chat doesn't end. But as soon as I click the button with the link, the loop disappears If I don't press the button I do see the loop, but as soon as I press a button and it redirects me to the page of the URL the loop disappears. I only have this problem on the test site. It works normally on vioceflow itself
No description
No description
W. Williams (SFT)
Can you show your flow now?
Stino12547
Stino12547OP15mo ago
No description
deep-jade
deep-jade15mo ago
Ohh I know whats up - there a weird behaviour with the listen functionality in functions (getting fixed in a bit). Once you click on an item in a carousel then try to go back to it, the buttons no longer work. Thats the issue you're facing right? If you're creating a dynamic carousel I would recommend using a function to create the trace then using a custom action to render the carousel. That prevents any weird behaviour until we fix it. Here is an example. The function gets chunks (attached) from the KB and creates the payload for a dynamic carousel. Then I just include the payload in the custom action (like shown above). Here's the project I'm referencing - its in the 'product recommendation' flowhttps://creator.voiceflow.com/dashboard?import=666c6375e11779e343602e7c
Voiceflow Creator
Voiceflow is the creative suite for designing, prototyping, and building voice apps on Alexa and Google.

Did you find this page helpful?