Freshchat Workers

Type: Freshchat Worker

A Freshchat worker will route a conversation to a live agent in Freshchat. A Freshchat worker can be created through the CLI.

Note: Freshchat workers cannot be interacted with directly by users, they must be transferred to via another worker first, for example a flow worker using pushBotToStack.

Secrets

A Secret (of type secret) containing a Freshchat API key is required in order to access Freshchat. Please see secrets for more information on creating a secret.

The value of the secret can be found in the admin portal of Freshchat, on the API Key page. You can create one if one does not already exist.

API token

Freshchat Webhook

You must enable and configure Freshchat with a webhook to Hookit2Me prior to being able to use the worker. In the Freshchat admin portal, navigate to webhook settings. Enable the webhook if it is not already, and set it to the public hookit2me url for the region you worker will be in. Note the RSA key down for later use.

Webhook

Worker configuration

Below is an example of a Freshchat worker in json, ready to be created with the CLI.

{
  "Data": {
    "Url": "https://api.eu.freshchat.com",
    "AuthKeySecret": "srn:vault::my-org:secret:freshchatkey",
    "AppId": "12345678-1234-1234-1234-123456789012",
    "ChannelId": "12345678-1234-1234-1234-123456789012",
    "PublicKey": "-----BEGIN RSA PUBLIC KEY-----someRSAkey-----END RSA PUBLIC KEY-----"
  },
  "Organization": "my-org",
  "Config": {},
  "Enabled": true,
  "Description": "My Freshchat worker",
  "Type": "freshchat-worker",
  "Name": "myFreshWorker",
}

Within the Data object, there are several Freshchat-specific fields that need to be filled out.

Ending the chat

To end a conversation with a user from the Freshchat agent side, resolving the conversation will remove the user from it and let them know it was resolved. Users can also end the conversation by typing /leave, which will result in the conversation resolving in the Freshchat interface as well.