Using a Simple JavaScript Call to Drive Conversations in Live Chat
Yang Lu
Published:
03/28/25 2:29 PM
40 views
1
40
Sprinklr’s Live Chat combines the power of conversational AI with generative AI capabilities, making it a valuable tool for customer service. Many of our customers use Live Chat within their Services organization to deflect calls, reduce volume, and ultimately lower operational costs.
However, Live Chat isn’t just for service—it’s also a powerful tool for sales engagement. Some customers extend their usage by leveraging capabilities like proactive prompting to engage prospects, potentially driving them into meaningful sales conversations.
However, in the e-commerce world, there are numerous external software vendors who will want to funnel sales leads directly into Sprinklr’s Live Chat. While APIs are a common solution, there’s actually a simpler way: you can initiate a sales conversation with a single JavaScript call.
Simply make this JavaScript call after the "external engagement" is complete initiating the hand off to an agent. Here’s how:
<script>(function(){if (window.sprChat) {window.sprChat('openNewConversation', {initialMessages: [// use variables in lieu of the hardcoded strings{ message: 'Summary of Previous Conversation occurring elsewhere' }, // example: Sarah is interested in TV's and specifically this model...{ message: 'What the user says to trigger the right intent and entity', isSentByUser: true } // example: Speak with an agent supporting TVs]});})();</script>
✅ This lightweight solution makes it easy for external vendors or third-party platforms to seamlessly trigger conversations—without the need for API integrations.
By sharing this code, we hope to help our customers unlock more value from their Sprinklr Live Chat investment and drive greater sales opportunities impacting your company's top line growth.
Question
Updated
5 days
Comments
Related Conversations
Jaimie Selwa
2 years
469 views
Cristopher Cravioto Garcia responded
6 months
ago
Hello, 👋 My name is Jaimie and I'm one of the Customer Advocacy Managers. Along with @Rupali Verma, we manage the Sprinklr Champions program. Welcome to the Community and our group! We'll use this space to share updates, executive opportunities, and gather feedback from you, our valued custome
3
469
0
Karla Prado
3 years
325 views
Carlos Lara responded
2 months
ago
Hello everyone,I'm interested in integrating Sprinklr with Power BI to personalize my information. However, I haven't been able to find any documentation on the API itself. The only resources I came across were third-party platforms that require a fee for this integration. Has anyone successfully in
9
325
0
Hernan Rodriguez
2 years
321 views
rodriguez responded
1 month
ago
Good morning, I am wondering if it is possible to add music or audio to an Instagram post. When I upload/schedule, I use the Quick Publish widget and I don't see it there. If it is currently not possible, I think it would be a really neat tool!
8
321
0
Jordana Gustafson Wright
1 year
88 views
marsh responded
1 month
ago
Hi Everyone! I wanted to share a success story we published a few weeks back with Deutsche Telekom. They're rolling out Sprinklr Service in their contact centers across Europe — they have a couple hundred agents already onboarded and expect to have 40k+ once the project is fully implemented. I loved
9
88
0
paulo.henrique
3 years
136 views
Jay Elango responded
2 years
ago
Estou criando uma apresentação e não entendo como ela está classificando por Classificar por. Seria possível ordenar alfabeticamente, ou criar alguma regra para esta ordenação?
8
136
0
Yang Lu
6 months
ago
03/06/2025
For the complete list of code changes you can make on your website to work with our Live Chat, please see: https://dev.sprinklr.com/live-chat-sdks