ballerinax/freshdesk Ballerina library

1.3.1

Overview

This is a generated connector for Freshdesk API v2.0 OpenAPI specification. Freshdesk is a cloud-based customer service software that enables businesses of all sizes to deliver stellar customer support for requests coming in via email, web, phone, chat, and social into tickets, and unifies ticket resolution across channels.

Prerequisites

Before using this connector in your Ballerina application, complete the following:

  1. Create an Freshdesk account.
  2. Obtain tokens - Follow this guide.

Quickstart

To use the Freshdesk connector in your Ballerina application, update the .bal file as follows

Step 1: Import connector

First, import the ballerinax/freshdesk module into the Ballerina project.

Copy
import ballerinax/freshdesk;

Step 2: Create a new connector instance

Create a freshdesk:ClientConfig with the api key as username in basic authentication password you can provide any, and initialize the connector with it.

Copy
configurable http:CredentialsConfig & readonly authConfig = ?;
freshdesk:ClientConfig clientConfig = {auth : authConfig};
freshdesk:Client baseClient = check new (clientConfig, 
                                serviceUrl = "https://<account_identifier>.freshdesk.com");

Step 3: Invoke connector operation

  1. Now you can use the operations available within the connector. Note that they are in the form of remote operations.

    Following is an example on how to get the create a ticket.

    Copy
    public function main() returns error? {
        freshdesk:TicketPayload payload = {
                     description: "Details about",
                     subject: "Support Needed...",
                     email: "tom@outerspace.com",
                     priority: 1,
                     status: 2,
                     cc_emails: ["ram@freshdesk.com"]
                 };
        freshdesk:Ticket creationResult = check baseClient->addTicket(payload);
        log:printInfo(creationResult.toString());
    }
  2. Use bal run command to compile and run the Ballerina program.

Import

import ballerinax/freshdesk;Copy

Metadata

Released date: over 1 year ago

Version: 1.3.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1

GraalVM compatible: Yes


Pull count

Total: 1

Current verison: 1


Weekly downloads


Source repository


Keywords

Sales & CRM/Customer Relationship Management

Cost/Freemium


Contributors

Other versions