The Customer Portal is a way to share a live view of a customerโs open tickets. Similar to the Slack-based request tracker, this will allow a user to see the status of all tickets that theyโve created, and this can be embedded onto your dashboard or shared a standalone site.
There are a few steps to setup the customer portal:
โจ Configuration settings can be updated remotely without changing any code on your site!
<head>
tag of your website.https://YOUR_SUBDOMAIN.unthread.io
to
To include the full page customer portal on a page on your site, embed an iFrame with the following code:
In order to determine which tickets belong the current user, you must verify that the email address actually belongs to the user. This will require the identity verification secret that was generated on the customer portal settings page. You will also need to be able to modify the server side code of your website.
Copy the identity verification secret and put it somewhere secure that is accessible by your websiteโs server. This secret should never be exposed on the frontend of your website because it can be used to impersonate other users.
When a user logs into your website, you will use the secret to generate an HMAC of the userโs email address. See below on how to generate the HMAC. The HMAC should be generated on your server and sent to your frontend as part of the login process. The HMAC will be passed as part of the user object passed to the start call.
How you generate the HMAC verification hash depends on what language you use on your server. Here are some examples in different languages: Javascript (Node.js)
PHP
Ruby
Python
When a user logs out, you should call stop
to end the session. This will clear the userโs ticket history and prevent the next user from seeing the previous userโs ticket history.
๐ช Speaking of cookies: the customer portal only uses first-party cookies, meaning they cannot track users across different website and are more privacy-centric.