# List Ticket Fields — Zoho Desk

> Lists every field configured on a Zoho Desk module (defaults to Tickets), including each field's apiName, displayLabel, type, and for picklist fields - the allowedValues array. Useful for discovering valid picklist values (e.g. for status…

- Key: `zoho_desk-list-ticket-fields`
- Type: Action (Read-only)
- Version: 0.0.3
- App: Zoho Desk (`zoho_desk`) — https://pipedream.com/apps/zoho-desk.md
- This page (HTML): https://pipedream.com/apps/zoho-desk/actions/list-ticket-fields
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/zoho_desk/actions/list-ticket-fields/list-ticket-fields.mjs

## Description

Lists every field configured on a Zoho Desk module (defaults to Tickets), including each field's `apiName`, `displayLabel`, `type`, and for picklist fields - the `allowedValues` array. Useful for discovering valid picklist values (e.g. for `status`, `priority`, `channel`, `category`, `subCategory`, `classification`) before creating or routing tickets. [See the documentation](https://desk.zoho.com/DeskAPIDocument#OrganizationFields_Getorganizationfieldsinamodule)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `orgId` | `string` | Yes | The ID of the organization Options are loaded from the connected account. |
| `module` | `string` | No | The Zoho Desk module whose fields to list. Defaults to tickets. |
| `apiNames` | `string[]` | No | Select one or more field API names to filter the response (e.g. category, subCategory, classification, priority, status) (max 100 chars). Leave blank to return every field in the selected module. Options are loaded from the connected account. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "zoho_desk",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "zoho_desk-list-ticket-fields",
  arguments: {
    orgId: "Organization ID",
    module: "Module",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "zoho_desk-list-ticket-fields",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    zoho_desk: { authProvisionId: "apn_xxxxxxx" },
    orgId: "Organization ID",
    module: "Module",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "zoho_desk-list-ticket-fields",
    "configured_props": {
      "zoho_desk": { "authProvisionId": "apn_xxxxxxx" },
      "orgId": "Organization ID",
      "module": "Module"
    }
  }'
```

---

- App: https://pipedream.com/apps/zoho-desk.md · All apps: https://pipedream.com/apps
