Comment on page
Request transcript on close
With this tutorial we demonstrate how to easily get the request transcript in JSON format using the request's close event. This event is very useful if you want to send, for example, a personalized email, or if you want to save the conversation messages on an external system or save it on your own CRM.
Step 1 - Fork the backend
Step 2 - Create the Tiledesk project
After signup please follow the proposed wizard to create your first Tiledesk project.
We choosed "Transcript project" as Project name:
As soon as you create the project you will be redirected to the project home (for this tutorial you can ignore the last step, relative to the widget's installation).
Now move in the Settings > Project Settings > Developer section and click on "MANAGE WEBHOOK".
Add this new webhook, taking care that the endpoint corresponds to the endpoint of your forked replit application followed by /webhooks.
In our case this is the endpoint.
Please use your application endpoint so you can modify the code as needed.
Now the webhook is connected to our backend.
The endpoint is the app.post('/webhooks'...
The code is explained in the following picture:
To run simply choose the "Simulate visitor" button on top of the console. As soon as you close a request the webhook is invoked and the transcript downloaded.
See you on our next tutorial!