We have recently refreshed our branding across our offerings and changed the names of our pricing plans. If you have signed up before Aug 9, 2021, please click Previous plans to view your applicable plans.
We assure you that this change will not impact your product experience, and no action is required on your part.


You can connect your bots from Freshchat with your Freshdesk account using APIs. This integration is helpful if you want the bot to hand conversations over to your Freshdesk agents or update existing tickets. This is also useful if you're going to share information from your Support Desk account with Messaging.

 

TABLE OF CONTENTS


Setting up the bot flows

  • When your bot is handing over the customer conversation to your Support Desk agent, it can collect the information needed to create a ticket on your customer's behalf.


Note: Please make sure to collect the mandatory fields that are required to create a ticket on your Freshdesk. For example, contact information (such as their email or phone numbers) is mandatory for ticket creation.




  • In this example, we ask the customer what they need help with, lead them to different flows based on their requirement, collect the necessary details there, and then lead them back to the ticket creation flow. Once this is done, you'll need to set up the API to trigger ticket creation.


Setting up the APIs


  • Go Flows > Configure > API library and click new API



  • Give a (1) Name to the API. This is just for your reference — to refer later in the bot flow.

  • Enter an endpoint in the (2) URL / JS function name field. To find the relevant endpoint for the API, please visit the Freshdesk API documentation. For our example, we will be using the Create Ticket API.

 


  • Once this is done, select the (3) Method. The choice of the Method will depend on the API that you're using. For our example, we'll pick POST as we're using the Create Ticket API.

  • Let the payload type be (4) JSON.

  • Fill in the (5) Payload content based on the sample code in the API documentation. This is an example of payload content. You can also make use of placeholders to use dynamic information in the payload. Click on the + icon and get a list of the placeholders with information that the bot can collect.

{
    "description": "Details about the issue...",
    "subject": "Support Needed...",
    "subject": "Support Needed...",
    "email": "tom@outerspace.com",
    "parent_id": 1,
    priority ": 1, "
    status ": 2, "
    cc_emails ": ["
    ram @freshdesk.com ","
    diana @freshdesk.com "] }


  • You can use an authorization header by checking the (6) add header. To set up the authorization header, you can use an API tool or refer to our Freshdesk API documentation.
  • You can populate the (7) response parameter with a value that can be used in the bot flow. In our example, we are sharing the ticket ID with the customer, and hence, we are using ID as the response parameter.

  • This is how the new API form will look like once you're done.

Finishing up the bot flows

  • So far, we have set up the bot flows to get the customer input, and we have set up an API that will create a ticket using the API and return the ticket ID.

  • Open the dialog where you want to trigger the Freshdesk API > Select Actions > Pick Trigger API from the Action type dropdown > Select the API that you configured earlier.


  • Once the ticket is created, you can show a confirmation message with the ticket number that the customer can use as a reference in the future.