Custom Code for Chat Widget

Anyone with coding skills willing to look this over and see if it will work with Noloco? Using chat via a company called salesmate.io not intercom - (although it may be intercom just white-labeled)

Steps to setup identity verification

1

To set up identity verification, you’ll need to generate an HMAC on your server for each logged-in user and send it to Salesmate.

Next, choose the server-side language or framework you are using:

Basic JavaScript

Your code to generate an HMAC for your app is:

1

const crypto = require(‘crypto’);

2

const secretKey = “(SECRET_KEY_HERE)”; // IMPORTANT: your web Identity Verification secret key - keep it safe!

3

const userIdentifier = current_user.id.toString(); // IMPORTANT: a UUID to identify your user

4

const hash = crypto.createHmac(‘sha256’, secretKey).update(userIdentifier).digest(‘hex’);

Copy code

2

Everywhere you load contact data and have a window.salesmateSettings code snippet, add a new attribute called user_hash and assign the HMAC code for the logged-in contact to it. View our documentation.

3

Turn on identity verification for all contacts on web. This means Salesmate on web won’t accept any contact’s data that hasn’t been verified.

Enforce identity verification on web

Once enforced, the Salesmate Messenger will not load for unverified logged-in contacts.