Skip to main content

Freshchat Destination

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a FlexFlow data flow that sends data to a Freshchat location.
freshchat_api.png

Freshchat

  1. Click the + icon on the Nexset that will be sent to the Freshchat destination, and select the Send to Destination option from the menu.

  2. Select the Freshchat connector from the list of available destination connectors. Then, select the credential that will be used to connect to the Freshchat organization, and click Next; or, create a new Freshchat credential for use in this flow.

  3. In Nexla, Freshchat destinations can be created using pre-built endpoint templates, which expedite destination setup for common Freshchat endpoints. Each template is designed specifically for the corresponding Freshchat endpoint, making destination setup easy and efficient.
    • To configure this destination using a template, follow the instructions in Configure Using a Template.

    Freshchat destinations can also be configured manually, allowing you to send data to Freshchat endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this destination manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Freshchat endpoints. Each template is designed specifically for the corresponding Freshchat endpoint, making destination setup easy and efficient.

Endpoint Settings

  • Select the endpoint to which this destination will send data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below. Click on an endpoint to see more information about it and how to configure your destination for this endpoint.

    Create Conversation

    Creates a new conversation with bulk messages in the Freshchat account. Use this endpoint to programmatically open conversations on behalf of users, such as for outbound messaging campaigns or automated support initiation.

    • Sends a POST request to the Freshchat conversations endpoint; the request body must include the channel ID, user details, and initial message content.
    • Returns the newly created conversation object in the response, including the system-assigned conversation ID. Enable the Response Webhook to capture this ID for downstream flows.

    The user referenced in the request must exist in Freshchat as an end-user. Use the Create a New End-User endpoint to create the user first if needed. The channel ID must correspond to a valid Freshchat channel (inbox).

    Update Conversation

    Updates an existing conversation's status, assigned agent, or assigned group. Use this endpoint to automate conversation routing, resolution, or reassignment based on data from other systems.

    • Sends a PATCH request to the Freshchat conversation endpoint for the specified conversation; only the fields included in the request body are updated.
    • Supported update fields include status (e.g., resolved, assigned), assigned agent ID, and assigned group ID.
    • Configure the following parameter: Conversation ID — the ID of the Freshchat conversation to update.

    Use the List Conversations source endpoint to obtain the conversation IDs needed for updates. Resolving a conversation changes its status to resolved and removes it from the active queue.

    Send Message

    Sends a reply message to an existing Freshchat conversation. Use this endpoint to deliver automated agent replies, notifications, or follow-up messages to ongoing conversations.

    • Sends a POST request to the Freshchat messages endpoint for the specified conversation; the request body must include the actor type (agent or user), actor ID, and message parts (text content).
    • Returns the created message object in the response, including the message ID and timestamp.
    • Configure the following parameter: Conversation ID — the ID of the Freshchat conversation to which the message should be sent.

    Messages sent via this endpoint appear in the Freshchat conversation thread. The actor ID must correspond to a valid agent or user in the Freshchat account. Sending as an agent requires the agent ID; sending as a user requires the user ID.

    Update Agent

    Updates an agent's properties such as availability status and group assignments. Use this endpoint to synchronize agent availability or group membership changes from workforce management systems into Freshchat.

    • Sends a PUT request to the Freshchat agent endpoint for the specified agent; only the fields included in the request body are updated.
    • Supported update fields include availability status and group assignments.
    • Configure the following parameter: Agent ID — the ID of the Freshchat agent to update.

    Use the List Agents source endpoint to obtain valid agent IDs. Availability status changes take effect immediately and affect conversation routing in Freshchat.

    Create a New End-User

    Creates a new end-user (contact) in the Freshchat account. Use this endpoint to synchronize customer records from CRM systems or other contact data sources into Freshchat.

    • Sends a POST request to the Freshchat users endpoint; the request body should include the user's name and at least one contact identifier such as email or phone.
    • Returns the newly created user object in the response, including the system-assigned user ID. Enable the Response Webhook to capture this ID for use when creating conversations for this user.

    Freshchat will return an error if a user with the same email address already exists. Consider using a deduplication step in Nexla before sending records to this endpoint to avoid duplicate user creation.

Endpoint Testing

Once the selected endpoint template has been configured, Nexla can send a test payload to the Freshchat API to verify the destination is configured correctly before activating.

  • To send a test payload, select the Test button at the top of the Sample Payload panel, and click on a listed sample payload to expand it.

  • If any modifications to the sample payload are needed, make the necessary changes directly within the sample window.

  • Click the Send Test Data button at the top of a sample payload to send the test payload to the Freshchat API using the current settings.

Configure Manually

Freshchat destinations can also be configured manually, allowing you to send data to any valid Freshchat API endpoint. You can also configure Nexla to automatically send the response received from the Freshchat API after each call to a new Nexla webhook data source.

First, select the API method that will be used for calls to the Freshchat API from the Method pulldown menu. Common Freshchat API methods for writing data include:

  • POST: For creating new conversations, messages, contacts (users), or other resources
  • PUT: For updating existing resources such as contacts or conversation properties
  • PATCH: For partial updates to existing Freshchat resources

Data Format

  1. Select the format in which the Nexset data will be sent to the Freshchat API from the Content Format pulldown menu. Nexla will automatically convert the data to the selected format for each API call. The Freshchat API accepts and returns data in JSON format, so select JSON as the content format for all Freshchat destinations.

API Endpoint URL

  1. Enter the URL of the Freshchat API endpoint to which you want to send the Nexset data in the URL field. This should be the complete URL including the protocol (https://) and any required path parameters.

    Common Freshchat v2 API endpoint patterns for writing data include:

    • Create a contact (user): https://{subdomain}.freshchat.com/v2/users — creates a new contact in Freshchat
    • Update a contact: https://{subdomain}.freshchat.com/v2/users/{'{user_id}'} — updates an existing contact by user ID
    • Create a conversation: https://{subdomain}.freshchat.com/v2/conversations — creates a new conversation
    • Send a message: https://{subdomain}.freshchat.com/v2/conversations/{'{conversation_id}'}/messages — sends a message to an existing conversation
    • Update a conversation: https://{subdomain}.freshchat.com/v2/conversations/{'{conversation_id}'} — updates conversation properties such as status or assignee

    Replace {subdomain} with your Freshchat account subdomain and replace path parameter placeholders with actual values or use lookup-based macros to reference them dynamically.

For a complete list of Freshchat API endpoints, required request body fields, and supported operations, refer to the Freshchat API documentation.

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this destination, enter the headers & corresponding values as comma-separated pairs in the Request Headers field (e.g., header1:value1,header2:value2).

    You do not need to include the Authorization header here — it is automatically set by Nexla using the API token from your Freshchat credential. The Content-Type: application/json header is also set automatically when JSON is selected as the content format.

Exclude Attributes from the Call

Optional
  • If any record attributes in the Nexset should be omitted when sending data to this Freshchat destination, select the attributes from the Exclude Attributes pulldown menu. This is useful for removing internal Nexla metadata fields or fields not accepted by the Freshchat API.

  • Any number of attributes can be selected for exclusion, and all excluded attributes will be shown in the field. To remove an attribute from the list, click the X icon next to the attribute name.

Record Batching

Optional
  1. If records should be sent to this destination in batched API calls, check the box next to Would you like to batch your records together? to enable record batching.

  2. Enter the maximum number of records that should be batched together in a single API call in the Batch Size field. By default, this value is set to 100.

  3. Select the algorithm that will be used to group records into batches from the Grouping Algorithm pulldown menu. The sample request shown in the panel on the right will be updated to reflect the current batching settings. Some algorithms require additional settings — click on an algorithm listed below to view instructions for configuring these settings.

Response Webhook

Optional

Nexla can automatically send the response received from the Freshchat API after each call to a new Nexla webhook data source. This option allows you to keep track of the status of each API call — for example, capturing the IDs of newly created Freshchat contacts or conversations for use in downstream flows.

  • To enable this option, check the box next to Would you like to process the API response as a Nexla Webhook source?.

Sample Request Payload

Sample request payloads containing a portion of the Nexset data that will be sent to the Freshchat API endpoint based on the current settings are shown in the Sample Payload panel on the right. These samples can be referenced to ensure that the destination and request settings are correctly configured.

  • Click on a sample request payload to expand it and view the complete payload content.
  • Sample payloads are automatically updated with each setting change, making it easy to verify that changes achieve the desired effect.

Endpoint Testing

After all endpoint settings have been configured, Nexla can send a test payload to the Freshchat API to ensure that the destination is configured correctly.

  1. To send a test payload, select the Test button at the top of the Sample Payload panel, and click on a listed sample payload to expand it.

  2. If any modifications to the sample payload are needed, make the necessary changes directly within the sample window.

  3. Click the Send Test Data button at the top of a sample payload to send the test payload to the Freshchat API using the current settings.

Save & Activate the Destination

  • Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To send the data to the configured Freshchat endpoint, open the destination resource menu, and select Activate.

    The Nexset data will not be sent to the Freshchat API until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.