Using a Simple JavaScript Call to Drive Conversations in Live Chat
Yang Lu
Published:
03/28/25 2:29 PM
13 views
1
13
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
6 days
Comments
Related Conversations
Jaimie Selwa
1 year
441 views
Cristopher Cravioto Garcia responded
1 month
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
441
0
Karla Prado
2 years
265 views
Prabhakar Kumar responded
1 year
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
8
265
0
Hernan Rodriguez
1 year
239 views
Fernando Perez Lago responded
1 year
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!
6
239
0
paulo.henrique
2 years
113 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
113
0
samantha_nardi
2 years
124 views
Jay Elango responded
2 years
ago
How can I adjust the widget dimensions in order to have a single one in one ppt slide? If I download my report dashboard as it is today, it looks weird. Collapsed columns, overlapping rows and I see only 5 lines out of 14 in total. Suggestions?
6
124
0
Yang Lu
1 month
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