Awesome
Ballerina Zendesk connector
Overview
Zendesk is a customer service software company that provides a cloud-based customer support platform. It is designed to offer a seamless and efficient customer service experience, enabling businesses to manage customer interactions across multiple channels, including email, chat, phone, and social media.
The Ballerina Zendesk Connector allows developers to interact with the Zendesk REST API V2, making it easier to integrate customer support features into Ballerina applications. This connector enables the automation of Zendesk Support operations such as ticket management, user and organization management, and more.
Setup guide
To use the Zendesk Connector in Ballerina, you must have a Zendesk account and an API token for authentication. Follow the steps below to set up the connector with your Zendesk account. If you don't have an account, you can create one by visiting Zendesk Sign Up page and completing the registration process.
Step 1: Log in to Zendesk
- Sign in to your Zendesk account.
- Navigate to the dashboard.
Step 2: Access admin center
-
Click on the Settings icon in the sidebar.
-
Click on Go to Admin Center.
<img src=https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zendesk/main/docs/setup/resources/1-admin-center.png alt="Zendesk Admin Center" style="width: 70%;">
Step 3: Create a new connection
-
In the Admin Center, click on Apps and integrations.
-
Click on Connections under the Connections section.
-
Click on Create connection to create a new connection.
<img src=https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zendesk/main/docs/setup/resources/2-create-connection.png alt="Zendesk Connection Settings" style="width: 70%;">
Step 4: Configure connection settings
When creating a new connection, you will be prompted to provide the following details:
-
Connection name: A descriptive name for the connection.
-
Authentication type: Possible options are
API key
,Basic Auth
,Bearer Token
, andOAuth 2.0
. -
Allowed domain: The domain that the connection is allowed to access. You can use a wildcard to allow requests made to any subdomain by adding an asterisk (*) at the start.
<img src=https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zendesk/main/docs/setup/resources/3-connection-configuration.png alt="Zendesk Connection Configuration" style="width: 70%;">
Note: The rest of the fields (e.g.
username
,password
,token
) will appear based on the selected authentication type.
Quickstart
To begin using the Zendesk
connector in your Ballerina application, you'll need to follow these steps:
Step 1: Import the connector
First, import the ballerinax/zendesk
package into your Ballerina project.
import ballerinax/zendesk;
Step 2: Instantiate a new connector
Create a zendesk:ConnectionConfig
object with your domain and API token, and initialize the connector.
zendesk:ConnectionConfig zendeskConfig = {
auth: {
username: "<username>",
password: "<password>"
}
};
zendesk:Client zendesk = check new (zendeskConfig, "https://<your-domain>.zendesk.com");
Step 3: Invoke the connector operation
Utilize the connector's operations to manage tickets, users, organizations, etc.
Create a ticket
zendesk:TicketCreateRequest ticket = {
ticket: {
subject: "Subject of the ticket",
comment: {
body: "Body of the ticket comment"
}
}
};
zendesk:TicketResponse createResponse = check zendesk->/api/v2/tickets.post(ticket);
List tickets
zendesk:TicketsResponse tickets = check zendesk->/api/v2/tickets;
Examples
The Zendesk
connector provides practical examples illustrating usage in various scenarios. Explore these examples, covering the following use cases:
- Multi channel support integration - Integrate Zendesk with multiple customer support channels to streamline ticket management.
- Customer satisfaction survey analysis - Analyze customer satisfaction survey responses to improve support services.
Issues and projects
The Issues and Projects tabs are disabled for this repository as this is part of the Ballerina library. To report bugs, request new features, start new discussions, view project boards, etc., visit the Ballerina library parent repository.
This repository only contains the source code for the package.
Build from the source
Prerequisites
-
Download and install Java SE Development Kit (JDK) version 17. You can download it from either of the following sources:
Note: After installation, remember to set the
JAVA_HOME
environment variable to the directory where JDK was installed. -
Download and install Ballerina Swan Lake.
-
Download and install Docker.
Note: Ensure that the Docker daemon is running before executing any tests.
Build options
Execute the commands below to build from the source.
-
To build the package:
./gradlew clean build
-
To run the tests:
./gradlew clean test
-
To build the without the tests:
./gradlew clean build -x test
-
To run tests against different environment:
./gradlew clean test -Pgroups=<Comma separated groups/test cases>
-
To debug package with a remote debugger:
./gradlew clean build -Pdebug=<port>
-
To debug with the Ballerina language:
./gradlew clean build -PbalJavaDebug=<port>
-
Publish the generated artifacts to the local Ballerina Central repository:
./gradlew clean build -PpublishToLocalCentral=true
-
Publish the generated artifacts to the Ballerina Central repository:
./gradlew clean build -PpublishToCentral=true
Contribute to Ballerina
As an open-source project, Ballerina welcomes contributions from the community.
For more information, go to the contribution guidelines.
Code of conduct
All the contributors are encouraged to read the Ballerina Code of Conduct.
Useful links
- For more information go to the
zendesk
package. - For example demonstrations of the usage, go to Ballerina By Examples.
- Chat live with us via our Discord server.
- Post all technical questions on Stack Overflow with the #ballerina tag.