ballerinax/zendesk.support Ballerina library

1.6.0

Overview

This is a generated connector for Zendesk Support API v2 OpenAPI specification. Zendesk Support is a simple system for tracking, prioritizing and solving customer support tickets.

Prerequisites

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

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

Quickstart

To use the Zendesk Support connector in your Ballerina application, update the .bal file as follows:

Step 1: Import connector

First, import the ballerinax/zendesk.support module into the Ballerina project.

Copy
import ballerinax/zendesk.support as zensupport;

Step 2: Create a new connector instance

Create a zensupport:ClientConfig with the username and password obtained, then initialize the connector with it and the service URL (Zendesk Support URL) according to the Zendesk Support documentation.

Copy
zensupport:ClientConfig clientConfig = {
    auth: {
        username: <ZENDESK_EMAIL>,
        password: <ZENDESK_PASSWORD>
    }
};
zensupport:Client baseClient = check new Client(clientConfig, serviceUrl = "<https://{YOUR_SUBDOMAIN}.zendesk.comL>");

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 create a user using the connector.

    Copy
    public function main() returns error? {
        zensupport:CreateUserInfo user = { 
                                user:{
                                    name: "Roger Wilco",
                                    email: "roger@gmail.com",
                                    organization: { name: "Rogers Organization" },
                                    role: "agent"
                                } 
                            };
        zensupport:UserResponse userResult = check baseClient->createUser(user);
        log:printInfo(userResult.toString());
    }
  2. Use bal run command to compile and run the Ballerina program.

Import

import ballerinax/zendesk.support;Copy

Metadata

Released date: 9 months ago

Version: 1.6.0

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1


Pull count

Total: 15

Current verison: 0


Weekly downloads


Source repository


Keywords

Support/Customer Support

Cost/Freemium


Contributors

Other versions

See more...