Team Chat App

Is anyone using a third-party app to team chat inside knack private app? Or does anyone created a live chat apo?

Hopefully someone can help...

I have implemented the tawk.to code with a minor mod to only run if a user is logged in:

//code for initialising tawk.to...
$(document).on('knack-scene-render.any', function(event, scene) {
if (Knack.getUserAttributes().name != null) {
var originalName = Knack.getUserAttributes().name;
var cleanName = originalName.replace("'", " ");
TawkData = "var Tawk_API=Tawk_API||{}; Tawk_API.visitor = { name : '" + cleanName + "', email : '" + Knack.getUserAttributes().email + "'};";
console.log(TawkData);
var tawk=document.createElement("script");
tawk.type="text/javascript";
tawk.innerHTML = TawkData;
$("head").append(tawk);
var s=document.createElement("script");
s.type="text/javascript";
s.src='https://embed.tawk.to/xxxxxxxxxxxxxxxxxx/yyyyyyyyyyy';
s.charset='UTF-8';
s.setAttribute('crossorigin','*');
$("head").append(s);
};
});

In a sense this work as expected - except that it doesn't pass the user's name and email to tawk - does anyone have any ideas?

I have one small thing to add to this...

I have a client in Ireland who have a lot of users with a ' in their names and this causes this tawk.to code to fail - to get round this I have added:

var originalName = Knack.getUserAttributes().name;
var cleanName = originalName.replace("'", " ");
TawkData = "var Tawk_API=Tawk_API||{}; Tawk_API.visitor = { name : '" + cleanName + "', email : '" + Knack.getUserAttributes().email + "'};";

Figured out how to turn off the Tawk widget when printing web pages:

window.onbeforeprint = function () {
if (Tawk_API) {
Tawk_API.hideWidget();
}
};

Tony thanks so much for the work on Tawk. How do keep the chatbot from showing when I print a report in Knack?

Thank you!!!!!!

What better way to help your customer than through a quick chat on your website?

Add Free Live Chat Support Software for Website to Increase Your Sale, Customer Support, to Boost Your Online Business with <a href="https://www.chatdove.com/">Free Live Chat Support Software</a>.

hi guys, 

Thanks for sharing. By any chance, anyone knows how to integrate either FB live chat or Freshchat into Knack?

I have these 2 codes which I guess needs to be adjusted to work on knack. Hope someone is able to help me.

1) Freshchat

<script src="https://wchat.freshchat.com/js/widget.js"></script>
<script>
window.fcWidget.init({
token: "XXXXXXXXXXXXXXXXXXXX",
host: "https://wchat.freshchat.com"
});
</script>

OR

2) FB Live Chat

<!-- Load Facebook SDK for JavaScript -->
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
xfbml : true,
version : 'v6.0'
});
};

(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<!-- Your customer chat code -->
<div class="fb-customerchat"
attribution=setup_tool
page_id="XXXXXXXXXXXXXXXX">
</div>

Thanks in advance!

Appreciate that Tony!

and a final note i removed a line break I added for ease of use reading which caused some error so if you cut and paste the code it will work now without issue

Fixed the code the last two lines needed deleted the brackets needed to be gone

Welcome, have any questions you can talk to me live through tawk to here: http://chat.graciebarra.com 

Tony - you're a champ!  Thanks

Brad yes I did here is the javascript.

// TALK.TO LOAD
// TALK.TO LOAD
TawkData = "var Tawk_API=Tawk_API||{}; Tawk_API.visitor = { name : '" + Knack.getUserAttributes().name + "', email : '" + Knack.getUserAttributes().email + "'};";

console.log('Loading Tawk.to Via Knack');

var tawk=document.createElement("script");
tawk.type="text/javascript";
tawk.innerHTML = TawkData;
$("head").append(tawk);

var s=document.createElement("script");
s.type="text/javascript";
s.src='https://embed.tawk.to/5c1cee3882491xxxxx9f1424/default';
s.charset='UTF-8';
s.setAttribute('crossorigin','*');
$("head").append(s);


Tony Lewis - did you ever find out how to integrate the Knack user credentials into the Tawk.to app?

I'm wondering too. Customers are requesting I add a chat feature to their database. They need the chat history to be recorded so they can go back and see what was requested or added to the chat. Anyone figure this out? 

 

Thanks. 

Hi Tony,

How does Tawk integrate with Knack?

Do you embed a JS snippet?

Thanks much!

 

Bob

 

We use http://tawk.to inside our private app for our school instructors and it works great 

Yes, i used few team chat app for past 5 to 6 years, but in recent times our team more conscious in security protection,
So with the help the development team, we came through Mirrorfly Chat API , the best 3rd party team chat API, the developers are integrated the chat API with minutes