Tiledesk Developer Hub
WebsiteCommunityTutorialsGet started
  • Introduction
  • Community
  • Ask for Support
  • Public Roadmap and Changelog
  • Tutorials
  • Widget
    • Widget SDK
    • Javascript API: Methods
    • Javascript API: Attributes
    • Javascript API: Listeners/Events
    • Widget Authentication
    • Widget Angular integration
    • Widget React integration
    • Widget for Android with WebView
    • Widget for iOS with WKWebView
    • Widget for Flutter with WebView
    • Widget for React with WebView
    • Widget for Wix Website platform
    • Tutorials
      • Hide widget
      • Show/Hide widget programmatically
      • Force widget loading without user interaction
      • Mobile positioning
      • Custom size (width/height)
      • Installing widget on selected pages
    • Conversation Embedded Apps
      • Payment App Tutorial
      • Prechat form App Tutorial
    • Advanced
      • Preset the Widget on a specific Department
      • Authentication Flow
      • Widget protocol specs
      • Prechat Form JSON specs
      • Prevent multiple conversations
      • Old versions
        • Web SDK v4
  • External Chatbot
    • Introduction
    • Hello World tutorial
    • Chatbot to Human handoff
    • Send Text Buttons
    • Advanced Tutorials
      • Introduction
      • Tutorial 1 - Dialogflow as external chatbot
      • Tutorial 2 - Buttons and images
      • Tutorial 3 - Automatic human handoff with fallback intent
      • Tutorial 4 - Explicit Human handoff with user intent
      • Tutorial 5 - Gracefully handling operating hours during handoff
      • Generate Dialogflow Google Credentials file
    • Rasa tutorials
      • Rasa Tutorial 1 - Rasa as external chatbot
  • Resolution bot
    • Introduction
    • Quickstart
    • Webhook service
    • Rich messages
    • Tutorials
      • Chatbot chooser (multilanguage)
      • Department chooser
      • Order info (webhook)
  • APIs
    • REST APIs
      • Introduction
      • Authentication
      • Requests
      • Leads
      • Messages
      • Activities
      • Projects
      • Team
      • User
      • Analytics
      • Canned responses
      • Tags
      • Events
      • Jwt
      • Labels
      • Images
      • Files
      • Segments
      • Chatbots
      • Knowledge Bases
        • Knowledge Base
        • Contents
        • Question & Answer
      • Management Api
        • Departments
        • Groups
    • NodeJS SDK
    • Webhooks
      • Subscriptions
    • Conversation Messages APIs tips
    • Realtime API
    • JWT Authentication
      • JWT Custom authentication Tutorial
    • Tutorials
      • REST API
        • Sending and receiving messages with Tiledesk APIs
        • PHP Tiledesk REST API example
        • Import multiple messages into Tiledesk using REST APIs from third party app
      • Webhooks
        • Custom Request assignment
        • Request transcript on close
  • Apps
    • Build Custom App - Quick start
    • External Channels integration flow diagram
    • Telegram integration tutorial
  • Dashboard & AgentChat SDK
    • Dashboard SDK
    • Agent Chat SDK
  • Architecture
    • Architecture overview
    • Components list
    • Bot Design diagram
    • Multi Channel Message Flow
  • Installation
    • Installation
    • Running Tiledesk using Docker Compose
    • Running Tiledesk with Kubernetes using Helm
    • Choosing Hardware
  • Configuration
    • Chat21 channel configuration
    • Email parameters and templates configuration
    • Configure the logging system
Powered by GitBook
On this page
  • Create a new Project
  • Analyzing the backend on Replit
  • Let's run

Was this helpful?

  1. APIs
  2. Tutorials
  3. Webhooks

Request transcript on close

PreviousCustom Request assignmentNextBuild Custom App - Quick start

Last updated 1 year ago

Was this helpful?

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.

Create a new Project

Step 1 - Fork the backend

To work with webhooks we'll need a web application endpoint where all the chatbot's requests will be forwarded. We'll use the service to fast create our own NodeJS web application endpoint.

Start forking the following app:

Step 2 - Create the Tiledesk project

To use Tiledesk APIs or integrate your own chatbots it is mandatory to signup a new user on . Then go to the console, available on the following link

After signup please follow the proposed wizard to create your first Tiledesk project.

We choosed "Transcript project" as Project name:

image

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.

https://webhook-get-transcript-on-close.tiledesk.repl.co/webhooks

Please use your application endpoint so you can modify the code as needed.

Now the webhook is connected to our backend.

Analyzing the backend on Replit

The endpoint is the app.post('/webhooks'...

The code is explained in the following picture:

Let's run

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!

Do you have suggestions on this article? Please send us your feedback writing an email to info@tiledesk.com

image
image
image
Replit
Webhook example App on Replit
Tiledesk
https://panel.tiledesk.com/v3/dashboard