Embedding Your Customer Portal

Embedding Your Customer Portal

With the Embed option for the Customer Portal, you can quickly and securely embed the script and URL to display the portal on your website using the iframe model. 

It’s better to embed the portal exactly where your customers frequent it. This way, all your support and sales teams can access the feedback and ideas. 

How to Embed the Portal in Your Application?

Embedding the portal happens via the iframes, therefore generating an URL that links to your portal is necessary. 

  1. Open your Feedback portal
  2. Go to Configure

(Ensure you’ve selected the right portal)

  1. Check the Portal Privacy, and it is set to only Public.
  2. Copy the HTML code snippet(iframes) and add it to your pages/application.

Set Up the User Identity Verification With Single Sign-On(SSO)

Since Chisel needs you to verify your users’ identities via email when they submit feedback or ideas, you can bypass this step when you embed the portal by enabling the single sign-on. This way, your customers won’t have to sign in twice. 

It’s better to embed the portal somewhere on your website where your users’ sign-in authorization is already done. Only then will the single sign-on option work. 

The Steps for Your Developer to Enable SSO

  1. To grab your private key go to the Configure tab
  2. Here, copy ‘Your Private Key for Embedded Portal’

3. Follow the below steps to generate an SSO token

  • Install the JWT library or any other library that best suits your needs.
  • Use the below code or a similar one, to generate tokens on your server:

var jwt = require(‘jsonwebtoken’);
var PrivateKey = ‘YOUR_PRIVATE_KEY’;
function createChiselLabsPortalToken(user) {
var userData = {
email: user.email,
id: user.id,
name: user.name,
company_name: user.company_name,
company_domain: user.company_domain,
};
return jwt.sign(userData, PrivateKey, {algorithm: ‘HS256’});
}

    4. Pass the token back to your app and into our iframe, where Chisel will use the token to authenticate your user:

    <iframe src={`https://app.chisellabs.com/customer/portal/orgname/1164928836633913?PM=1103294177134273&TOKEN=TOKEN_YOU_GENERATED&hide_header=1`} frameborder="0" height='100%' width='100%' />

    FAQ

    1. Which Data Does Chisel Extract from the Token?
      • Chisel only extracts name, email, company_name and company_domain
    2. Will Chisel create a Company when the idea and feedback are submitted?
      • If a company is unavailable in your workspace, Chisel will create one only if you include company_domain in your token.