Skip to main content

Freshchat

Yellow.ai’s integration with Freshchat lets you connect with the live chat agents of Freshchat to resolve your queries.

1. Connect Freshchat with Yellow.ai

To connect your yellow.ai account with Freshchat follow these steps.

1.1 Fetch details from your Freshchat portal

To retrieve App ID

  1. Login to your Freshchat portal as an administrator.
  2. Go to Admin Settings > Account Settings > Integration Settings.
  3. Under AGENT MESSENGER click Copy to copy the App ID.

To retrieve the Channel ID

  1. This API needs to be called from Postman, which in turn will fetch the list of channel IDs associated with that Freshchat account and post confirmation from the client. (The right channel ID value needs to be used.)

To retrieve API token

  1. Login to your Freshchat portal as an administrator.
  2. Go to Admin Settings > API Tokens.
  3. Click Generate Token to generate the API token and copy it.

To retrieve API Domain

  1. Login to your Freshchat portal as an administrator.
  2. Go to Admin Settings > Channels > Mobile SDK.
  3. Check the data centre of the domain from the domain name under the APP Keys section. Data centers can belong to four regions , India, USA, Europe and Australia. In this screenshot, .in refers to India.

The following are the domain URLs of data centres on different regions:

  1. .in - https://api.in.freshchat.com/v2
  2. .eu - https://api.eu.freshchat.com/v2
  3. .au - https://api.au.freshchat.com/v2 and if the domain value is just msdk.freshchat.com, then it belongs to USA data center and hence the value that needs to be configured is https://api.freshchat.com/v2

1.2 Enable the integration in Yellow.ai's Integration module

  1. Login to cloud.yellow.ai and click Integrations in the module switcher.

  1. Search for Freshchat or choose the category named Live chat from the left navigation bar and then click Freshchat.
  2. Fill in the fields and click Connect.

1.3 Configure webhook URL in Freshchat dashboard

To receive events, you need to configure the webhook URL in the Freshchat dashboard.

  1. Login to the Freshchat portal as an administrator.
  2. Navigate to Admin Settings > Webhooks for chat and copy the webhook URL mentioned in the Instructions section of the Freshchat Integration Card and paste it here.

2. Use-Case

This integration lets you connect with live agents on the Freshchat platform from your yellow.ai account.

2.1 Chat with Freshchat's Live Agent

  1. In the Studio flow builder, select the Raise Ticket node.

  1. Select Freshchat from the Live chat agent drop-down list.

The following table contains the details of all the fields in the Raise ticket node.

Field nameSample valueData typeDescription
Message after ticket assignmentRequesting live agent connectionStringThe message that will be displayed to the end user after a ticket is assigned to an agent.
NameRajeshStringName of the end user.
Mobile9876543210StringMobile number of the end user.
Email[email protected]StringEmail address of the end user.
QueryI have a concern regarding my flight ticketStringThe subject/topic/reason why the ticket was created.
Group IDtest-salesStringFreshchat groupId to which the ticket needs to be assigned.
User IDefgeye-fefefef-14343StringFreshchat userId of the user. This is passed if the previous ticket needs to be re-opened for the same user.
Unique Identifierggyugu-2343h-34343StringA unique identifier, if passed will reflect as referenceId in the freshchat agent portal.

Sample success response:


{
"assignedTo": true,
"success": true,
"status": "ASSIGNED",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from the Freshchat create ticket API.

Sample failure response

{
"success": false,
"assignedTo": false,
"agentNotAvailable": true,
"message": "TicketId is not created and transferring the control back to the bot",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from the Freshchat create ticket API.