CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-zohocrm--nodejs-sdk-2-0

Node.js SDK for Zoho CRM API v2.0 providing OAuth authentication, multi-user support, and complete CRUD operations for CRM data

Overview
Eval results
Files

organization-settings.mddocs/

Organization Settings

The Organization Settings module provides access to global CRM configuration including currency management, organization details, and system variables for templates and workflows.

Capabilities

Currencies Operations

Multi-currency configuration and management for global business operations.

/**
 * Operations for managing currency settings and multi-currency support
 */
class CurrenciesOperations {
    /**
     * Get all available currencies in the organization
     * @returns Promise with APIResponse containing currency data
     */
    getCurrencies(): Promise<APIResponse>;

    /**
     * Add new currencies to the organization
     * @param request - Body wrapper containing currency data to add
     * @returns Promise with APIResponse containing addition results
     */
    addCurrencies(request: BodyWrapper): Promise<APIResponse>;

    /**
     * Update existing currencies in the organization
     * @param request - Body wrapper containing updated currency data
     * @returns Promise with APIResponse containing update results
     */
    updateCurrencies(request: BodyWrapper): Promise<APIResponse>;

    /**
     * Enable multi-currency support for the organization
     * @param request - Body wrapper containing multi-currency configuration
     * @returns Promise with APIResponse containing configuration results
     */
    enableMultipleCurrencies(request: BodyWrapper): Promise<APIResponse>;

    /**
     * Update the base currency for the organization
     * @param request - Body wrapper containing base currency details
     * @returns Promise with APIResponse containing update results
     */
    updateBaseCurrency(request: BodyWrapper): Promise<APIResponse>;

    /**
     * Get a specific currency by ID
     * @param currencyId - Unique identifier of the currency
     * @returns Promise with APIResponse containing currency data
     */
    getCurrency(currencyId: BigInt): Promise<APIResponse>;

    /**
     * Update a specific currency by ID
     * @param currencyId - Unique identifier of the currency
     * @param request - Body wrapper containing updated currency data
     * @returns Promise with APIResponse containing update results
     */
    updateCurrency(currencyId: BigInt, request: BodyWrapper): Promise<APIResponse>;
}

Currencies Operations Example:

const { CurrenciesOperations } = require("@zohocrm/nodejs-sdk-2.0/core/com/zoho/crm/api/currencies/currencies_operations");
const { BodyWrapper } = require("@zohocrm/nodejs-sdk-2.0/core/com/zoho/crm/api/currencies/body_wrapper");
const { Currency } = require("@zohocrm/nodejs-sdk-2.0/core/com/zoho/crm/api/currencies/currency");

const currenciesOp = new CurrenciesOperations();

// Get all currencies
const currenciesResponse = await currenciesOp.getCurrencies();

// Add new currency
const currency = new Currency();
currency.setCurrencyName("Euro");
currency.setCurrencyCode("EUR");
currency.setCurrencySymbol("€");
currency.setExchangeRate("0.85");

const bodyWrapper = new BodyWrapper();
bodyWrapper.setCurrencies([currency]);

const addResponse = await currenciesOp.addCurrencies(bodyWrapper);

Organization Operations

Organization profile management including basic details and photo upload.

/**
 * Operations for managing organization profile and settings
 */
class OrgOperations {
    /**
     * Get organization profile details
     * @returns Promise with APIResponse containing organization data
     */
    getOrganization(): Promise<APIResponse>;

    /**
     * Upload organization logo/photo
     * @param request - File body wrapper containing photo data
     * @returns Promise with APIResponse containing upload results
     */
    uploadOrganizationPhoto(request: FileBodyWrapper): Promise<APIResponse>;
}

Organization Operations Example:

const { OrgOperations } = require("@zohocrm/nodejs-sdk-2.0/core/com/zoho/crm/api/org/org_operations");
const { FileBodyWrapper } = require("@zohocrm/nodejs-sdk-2.0/core/com/zoho/crm/api/org/file_body_wrapper");
const fs = require("fs");

const orgOp = new OrgOperations();

// Get organization details
const orgResponse = await orgOp.getOrganization();

// Upload organization photo
const fileStream = fs.createReadStream("path/to/logo.png");
const fileWrapper = new FileBodyWrapper();
fileWrapper.setFile(fileStream);

const uploadResponse = await orgOp.uploadOrganizationPhoto(fileWrapper);

Variables Operations

Custom variable management for templates, workflows, and system automation.

/**
 * Operations for managing custom variables used in templates and workflows
 */
class VariablesOperations {
    /**
     * Get all variables in the organization
     * @returns Promise with APIResponse containing variables data
     */
    getVariables(): Promise<APIResponse>;

    /**
     * Create new variables
     * @param request - Body wrapper containing variable data to create
     * @returns Promise with APIResponse containing creation results
     */
    createVariables(request: BodyWrapper): Promise<APIResponse>;

    /**
     * Update multiple variables
     * @param request - Body wrapper containing updated variable data
     * @returns Promise with APIResponse containing update results
     */
    updateVariables(request: BodyWrapper): Promise<APIResponse>;

    /**
     * Delete multiple variables
     * @param request - Body wrapper containing variables to delete
     * @returns Promise with APIResponse containing deletion results
     */
    deleteVariables(request: BodyWrapper): Promise<APIResponse>;

    /**
     * Get a specific variable by ID
     * @param variableId - Unique identifier of the variable
     * @returns Promise with APIResponse containing variable data
     */
    getVariableById(variableId: BigInt): Promise<APIResponse>;

    /**
     * Update a specific variable by ID
     * @param variableId - Unique identifier of the variable
     * @param request - Body wrapper containing updated variable data
     * @returns Promise with APIResponse containing update results
     */
    updateVariableById(variableId: BigInt, request: BodyWrapper): Promise<APIResponse>;

    /**
     * Delete a specific variable by ID
     * @param variableId - Unique identifier of the variable
     * @returns Promise with APIResponse containing deletion results
     */
    deleteVariable(variableId: BigInt): Promise<APIResponse>;

    /**
     * Get a variable by API name
     * @param apiName - API name of the variable
     * @returns Promise with APIResponse containing variable data
     */
    getVariableForAPIName(apiName: string): Promise<APIResponse>;

    /**
     * Update a variable by API name
     * @param apiName - API name of the variable
     * @param request - Body wrapper containing updated variable data
     * @returns Promise with APIResponse containing update results
     */
    updateVariableByAPIName(apiName: string, request: BodyWrapper): Promise<APIResponse>;
}

Variables Operations Example:

const { VariablesOperations } = require("@zohocrm/nodejs-sdk-2.0/core/com/zoho/crm/api/variables/variables_operations");
const { BodyWrapper } = require("@zohocrm/nodejs-sdk-2.0/core/com/zoho/crm/api/variables/body_wrapper");
const { Variable } = require("@zohocrm/nodejs-sdk-2.0/core/com/zoho/crm/api/variables/variable");

const variablesOp = new VariablesOperations();

// Get all variables
const variablesResponse = await variablesOp.getVariables();

// Create a new variable
const variable = new Variable();
variable.setName("Company_Slogan");
variable.setAPIName("Company_Slogan");
variable.setValue("Innovation at its Best");
variable.setType("text");

const bodyWrapper = new BodyWrapper();
bodyWrapper.setVariables([variable]);

const createResponse = await variablesOp.createVariables(bodyWrapper);

// Get variable by API name
const variableResponse = await variablesOp.getVariableForAPIName("Company_Slogan");

Variable Groups Operations

Organize and manage variable groups for better organization of custom variables.

/**
 * Operations for managing variable groups and organization
 */
class VariableGroupsOperations {
    /**
     * Get all variable groups in the organization
     * @returns Promise with APIResponse containing variable groups data
     */
    getVariableGroups(): Promise<APIResponse>;

    /**
     * Get a specific variable group by ID
     * @param groupId - Unique identifier of the variable group
     * @returns Promise with APIResponse containing variable group data
     */
    getVariableGroupById(groupId: BigInt): Promise<APIResponse>;

    /**
     * Get a variable group by API name
     * @param apiName - API name of the variable group
     * @returns Promise with APIResponse containing variable group data
     */
    getVariableGroupByAPIName(apiName: string): Promise<APIResponse>;
}

Core Types

interface Currency {
    id?: BigInt;
    currencyName: string;
    currencyCode: string;
    currencySymbol: string;
    exchangeRate: string;
    isActive?: boolean;
    isBase?: boolean;
    format?: CurrencyFormat;
}

interface CurrencyFormat {
    decimalSeparator: string;
    thousandSeparator: string;
    decimalPlaces: number;
}

interface Organization {
    id?: BigInt;
    companyName?: string;
    alias?: string;
    primaryEmail?: string;
    website?: string;
    mobile?: string;
    phone?: string;
    employeeCount?: string;
    description?: string;
    timeZone?: string;
    locale?: string;
    currency?: string;
    currencySymbol?: string;
}

interface Variable {
    id?: BigInt;
    name: string;
    apiName: string;
    value: string;
    type: "text" | "integer" | "double" | "boolean" | "date" | "datetime";
    variableGroup?: VariableGroup;
}

interface VariableGroup {
    id?: BigInt;
    name?: string;
    apiName?: string;
}

Install with Tessl CLI

npx tessl i tessl/npm-zohocrm--nodejs-sdk-2-0

docs

attachments-files.md

authentication.md

bulk-operations.md

fields-metadata.md

index.md

initialization.md

organization-settings.md

records.md

related-records.md

tags-organization.md

users.md

tile.json