Integrate Freshservice with Freshchat


By integrating your Freshservice account with Freshchat, your end users can message you using the Freshchat messenger. You can convert chat conversations in Freshchat into tickets on Freshservice. 


How to setup Freshservice integration in Freshchat


Login to your Freshchat account as Account Owner/Admin


Go to Settings > Integrations > Freshservice



Add your Freshservice portal URL and your Freshservice Admin User Token to authorize the integration. 



Your Admin User Token is your Freshservice API key. You can find in your Freshservice account under Profile Settings.




Define rules for chat to ticket conversion


Next, you have to define the rules for converting chats into tickets on Freshservice. You can make it mandatory for team members to convert every conversation into a ticket upon resolving it (closing it). If you want to enable this, just move the toggle to the right. If you don’t, it will be an optional step for your team members.



Choose the ticket fields for chat to ticket conversion


Now, choose the Freshservice ticket fields and the corresponding Freshchat attributes. These fields will be pre-populated when a team member converts a chat into a ticket. Don’t forget to save your selection.



Note

Your Freshservice field types should be compatible with Freshchat custom properties for converting a chat into a ticket.


Convert Freshchat conversations into Freshservice tickets


Once you have answered a customer’s questions, you can close a conversation by resolving it. Resolved conversations move to the Resolved view from where you can access it anytime. 


Alternatively, if you have Freshservice integration, you can resolve a conversation and convert it into a Freshdesk ticket. This will be useful if you are not able to address all the concerns of your customer immediately. Instead of leaving these conversations stay open in your queue, you can convert it into a ticket and then follow up and respond to customers. This will also declutter your chat queue and shorten your response time in Freshchat.



The ticket fields are auto-populated based on your configuration. But you can always edit the values if needed. You can create a new ticket or append to an existing ticket.



Code to fetch logged in user details from Freshservice for identification in Freshchat

 

Login Freshservice and go to Admin > Helpdesk Rebranding > Customise portal > Layout & Pages

 

Add the following code snipped under HEAD.

<script src="https://wchat.freshchat.com/js/widget.js"></script>

 

Add the following code snippet under FOOTER.

<script> window.fcWidget.init({ token: "WEB_CHAT_TOKEN", host: "https://wchat.freshchat.com" }); </script> <script> window.fcWidget.setExternalId("{{portal.user.email}}"); window.fcWidget.user.setFirstName("{{portal.user.firstname}}"); window.fcWidget.user.setEmail("{{portal.user.email}}"); window.fcWidget.user.setProperties({ location: window.location.href }); </script>