Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

houssemamri's avatar

Customer chatbot widget

I'm building a SaaS with Laravel that focuses on A.I. content creation and similar stuff. I want to add a feature that gives the user the capability to have a js chatbot widget that he can insert on his own website and manage the the data training back on my SaaS. I can handle the training part. But I can't figure out how to add this functionality on my SaaS. To be exact i don't know how to make the chatbot widget available to users (separate widget for every user). I don't know where to start and if there is any packages that can help me with that. Thank you for your help

0 likes
7 replies
houssemamri's avatar

@martinbean i tried many times using different well explained prompts but no luck. It just gives me big lines with no details and sometimes it tries to guess the answers even with GPT-4 . And i prefer experienced devs to ChatGPT

martinbean's avatar

@houssemamri No one here is going to give you step-by-step instructions on how to build an entire embeddable chatbot solution.

Try yourself, and then ask a question when you get stuck on something specific.

houssemamri's avatar

@martinbean I'm not asking for step by step. I'm asking for starting points. And any packages that can help

martinbean's avatar

@houssemamri Break the problem down into steps, and make an effort yourself first. We’re not here for you to drop your project brief and then to tell you all of the steps involved to go from start to finish.

Snapey's avatar

look how others create customer embeddable code.

For instance google analytics. They have one component and then customer specific token. The then show a text area where they assemble the required javascript script src and the client token so that the customer can copy this block of code and paste it into their site

Heres an axample from a zoho chat widget

<script type="text/javascript" id="zsiqchat">var $zoho=$zoho || {};$zoho.salesiq = $zoho.salesiq || {widgetcode: "siq560103978cbbe24326........979a6cb8c1f40e489ce8e179b26b53e845a06bf7fbbc8e5c9fcd397deb3c", values:{},ready:function(){}};var d=document;s=d.createElement("script");s.type="text/javascript";s.id="zsiqscript";s.defer=true;s.src="https://salesiq.zohopublic.eu/widget";t=d.getElementsByTagName("script")[0];t.parentNode.insertBefore(s,t);</script>

Please or to participate in this conversation.