If you’d like to keep an additional archive of your chats, you can get complete chat transcripts from LiveChat. This can come in handy if you need to keep past chats on file for all of your agents.
There are a couple ways to go about getting the transcripts.
Getting a transcript from Archives
This is the most basic method that allows you to grab individual chat transcripts. Useful when you don’t need to archive all of your chats but only some cases.
To get a chat transcript from Archives, follow these steps:
- Go to Archives and choose the chat you want to get transcript from.
- Click on the three dots in the top right to open the action menu.
- Select Send transcript from the menu.
- Enter your e-mail.
- Click on Send copy to finalize.
Forwarding chat transcripts to email
You can forward your chat transcripts to a list of emails. To do that, follow these steps:
- Go to Settings > Chat settings > Transcript forwarding.
- Enter an email address (you can enter more than one, by separating them with a comma).
- Click on Save changes to finalize.
Extracting transcripts using the API
An advanced way of getting your past chats. Using the API allows you to get the transcripts in bulk as well as just the specific conversations.
See our Platform Docs for instructions on how to get a single transcript and how to get transcripts in bulk.
Sending transcripts automatically after chats
The final and most complex method of getting the chat transcripts involves using a LiveChat webhook. Using this method, you can receive a chat transcript after each of your chats.
Start by creating webhook. Go to the Webhooks section and click on the Add a webhook link.
Next, choose the chat ends option in the Event part of the setup. Leave all Data type options ticked.
You will need to provide the Target URL of the webhook. This should be a file on your server. Create a blank file named “transcript-webhook” (for example in PHP), place it on your server and type in the address in the webhook setup.
Click on Add a webhook to finalize the webhook creation.
Finally, you need to create the aforementioned .php file. The file should include a script that will automatically send a transcript when a chat is finished.
Here’s an example of such file:
<?php
$data = file_get_contents('php://input');
$data = json_decode($data);
if ($data->event_type === 'chat_ended') {
// code to send email
mail('myemail@company.com', 'Chat transcript', print_r($data, true));
}
?>
Once the file is on your server, the script will automatically send the transcript to the specified email or emails.