Skip to content

improvement(zoho-desk): pick the data center from a dropdown and trim service-account help text - #6271

Merged
waleedlatif1 merged 5 commits into
stagingfrom
improvement/zoho-desk-data-center-dropdown
Aug 5, 2026
Merged

improvement(zoho-desk): pick the data center from a dropdown and trim service-account help text#6271
waleedlatif1 merged 5 commits into
stagingfrom
improvement/zoho-desk-data-center-dropdown

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Zoho Desk Self Client modal: Data center is now a dropdown (options derived from ZOHO_DESK_DATA_CENTERS so a new region can't leave the picker behind)
  • Cut the setup-steps paragraph from the Self Client modal — the setup guide covers it, and two of its three sentences duplicated the org-ID and data-center field hints verbatim. Only the trigger caveat survives
  • Moved helpText off the Client secret field for all four client-credential providers. None of the four caveats is about the secret (Box = Admin Console authorization, Zoom = Account ID, Salesforce = Run As user, Zoho = triggers) — it now renders on the org-identifier field
  • Same editorial pass on Zoom, Salesforce, Shopify, Webflow, Trello and Cal.com: setup steps out, caveats in
  • Added the documented Zoho Desk params that were missing: list_tickets assignee/channel/receivedInDays, list_comments and list_threads sortBy, get_contact and get_thread include. Each is gated per operation — a subBlock keeps its value across an operation change, so an ungated spread would send List Tickets' createdTime to List Comments
  • getZohoDeskErrorMessage now appends Zoho's per-field errors[], so INVALID_DATA names the failing field instead of reading "The data does not comply to the validation restrictions defined."
  • Comma-separated filters normalize through one helper (interior spaces survive, so On Hold still matches)

Corrections found while auditing

  • receivedInDays filters on customerResponseTime, not receipt — Zoho: "Time period (in days) for fetching tickets based on customerResponseTime". Labelled "Customer Responded Within"; calling it "received" would silently drop every ticket the customer hadn't replied to
  • Out-of-range receivedInDays was silently dropped. The param is LLM-writable, so an agent asked for "the last week" sends 7 and gets the entire unfiltered queue presented as filtered. Now throws
  • classification was a closed dropdown, but Zoho marks the field x-dynamic-enum and states "Custom values are also supported" — portals can rename or replace the picklist. Now free text
  • The Self Client guide sent every admin to api-console.zoho.com while offering EU/IN/AU. Zoho pins a client to its registration region ("the accounts-server-url is specific to the location (i.e., datacenter) where the client is registered") and excludes Self Clients from multi-DC, so a non-US admin got a dead credential. Each region now routes to its own console
  • Dropped an unverifiable "max 4999" claim on from, and the assertion that Zoho documents "" as the clear-a-field idiom (it appears in a sample payload, not in prose)

Type of Change

  • Bug fix
  • Improvement

Testing

Every factual claim about Zoho traces to a verbatim quote from desk.zoho.com/DeskAPIDocument. Tests added for the receivedInDays throw and coercion, the comma-list normalizer, and the errors[] append — each verified to fail with its fix reverted.

Not covered: no live Zoho org has exercised this. The Self Client flow, the data-center dropdown and the new filters are untested against real credentials, and the soid inference (ZohoDesk.<orgId>) still needs live verification. The block's per-operation gating has no regression test.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

… service-account help text

The Zoho Desk Self Client modal rendered a paragraph of setup steps as the hint
under Client secret, duplicating both the setup guide and two of its own field
hints. Cut it to the one caveat that isn't derivable from the form, and moved it
to the org-identifier field the caveats actually qualify. Data center is now a
dropdown sourced from ZOHO_DESK_DATA_CENTERS.

Same editorial pass across the other service accounts: Zoom, Salesforce,
Shopify, Webflow, Trello and Cal.com dropped setup steps in favor of caveats.

Also adds the documented Zoho Desk params that were missing (list_tickets
assignee/channel/receivedInDays, list_comments and list_threads sortBy,
get_contact and get_thread include), each gated per operation so a stale
subBlock value can't leak into an endpoint that reads the same param name.
@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 5, 2026 1:18am

Request Review

@cursor

cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown

PR Summary

Cursor Bugbot is generating a summary for commit fa86518. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR improves Zoho Desk configuration, documentation, and API parameter handling while refining service-account guidance across several providers.

  • Adds operation-scoped Zoho Desk filters, sorting, includes, normalization, validation, and richer provider errors.
  • Replaces the Zoho Desk data-center input with a descriptor-driven dropdown and updates region-specific setup guidance.
  • Moves provider caveats to the relevant organization/account fields and trims duplicated setup text.
  • Adds block-to-tool regression coverage confirming unsupported receivedInDays values reach tool validation instead of being silently omitted.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported silent-filter omission is fixed because all non-empty values reach the tool’s explicit validation, while only the empty “Any time” value is omitted.

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/zoho-desk.ts Adds operation-scoped parameter mapping and correctly forwards non-empty receivedInDays values to tool validation.
apps/sim/tools/zoho_desk/list_tickets.ts Adds documented ticket filters and rejects unsupported response-window values rather than silently issuing an unfiltered request.
apps/sim/tools/zoho_desk/list_tickets.test.ts Covers the complete block-to-tool merge seam, including malformed, unsupported, supported, and empty receivedInDays inputs.
apps/sim/tools/zoho_desk/utils.ts Centralizes comma-list normalization and enriches Zoho API errors with field-level details.
apps/sim/app/workspace/[workspaceId]/integrations/components/connect-service-account-modal/client-credential-account-modal.tsx Supports descriptor-defined dropdown fields and renders provider help text alongside the relevant identifier field.
apps/sim/lib/credentials/client-credential-accounts/descriptors.ts Defines Zoho Desk data-center options and updates provider-specific field guidance.
apps/docs/content/docs/en/integrations/zoho-desk-service-account.mdx Documents region-specific Self Client registration and the new data-center picker.

Reviews (4): Last reviewed commit: "fix(zoho-desk): keep the legacy include ..." | Re-trigger Greptile

Comment thread apps/sim/blocks/blocks/zoho-desk.ts Outdated
Comment thread apps/sim/blocks/blocks/zoho-desk.ts Outdated
…lidation

The block mapper filtered on shape before forwarding, so a fractional or
non-numeric value was dropped and List Tickets then ran with no window at all —
returning the whole queue as though the requested filter had applied. The tool
owns that validation, so the mapper now passes the value straight through.

Adds a block-to-tool seam test: neither side's own tests could catch a value
lost between them.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 11c5bd6. Configure here.

… them

The block mapper scoped params by destructuring them out of the spread, on the
assumption that a key left out of the return value never reaches the tool. It
does: both call sites merge the mapper's output on top of the original inputs
(`{ ...inputs, ...transformedParams }`), so an omitted key is restored.

The serializer is what actually held this together, and it has a gap — an
advanced subBlock with a retained value is emitted for every operation while the
block's advanced toggle is off, because that branch returns on isNonEmptyValue
without evaluating the subBlock's condition. So a Sort By set on List Tickets
reached List Comments, and a ticket Include reached Get Contact, each rejected
by Zoho. Out-of-range from/limit reached the wire for the same reason.

Every scoped param is now assigned unconditionally, undefined included, so the
merge cannot resurrect a stale value.

Also fixes a crash this branch introduced: clearing the Departments multi-select
stores [], which reached the comma-list normalizer and threw on .split. The
helper now takes arrays, which is what that subBlock actually stores.

The block-to-tool tests now model the real merge rather than the mapper's return
value alone — the previous version passed while production threw on the same
input. Corrects two comments that misstated where Zoho documents customFields
and errorMessage, and splits the shared include subBlock, since Get Ticket
accepts contract and skills and List Tickets does not.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

The previous commit made the mapper assign every operation-scoped param
unconditionally, so the merge could not resurrect a stale value. That is right
on the canvas path and wrong on the agent-tool path, where `operation` is a
sibling of the tool call rather than a member of params: the mapper saw
`operation === undefined`, every gate resolved to undefined, and the merge then
overwrote the model's own arguments with it. A Zoho Desk tool called by an agent
lost every parameter the model supplied.

That path needs no scoping — the tool is already chosen, and the model addresses
tool params by their real names — so it now returns early. Custom fields are
still coerced there, since parsing JSON is a type fix rather than an operation
gate, and that parsing is now shared by both paths.
Comment thread apps/sim/blocks/blocks/zoho-desk.ts
Splitting the shared `include` subBlock into `include` and `ticketInclude` left
workflows saved before the split reading an empty field, so their Get Ticket
calls silently stopped embedding what they asked for.

Get Ticket now reads `ticketInclude ?? include`. The fallback only goes that
direction: Get Ticket accepts every value List Tickets does plus `contract` and
`skills`, so a legacy value is always valid there, while List Tickets still
reads only `include` and can never receive the two extra tokens it does not
document.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 98a37b5. Configure here.

@waleedlatif1
waleedlatif1 merged commit 0ab44c5 into staging Aug 5, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/zoho-desk-data-center-dropdown branch August 5, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant