Zoho: Replace Picklist Values
Zoho globalPicklists.replacePicklistValues: arguments, response, policy and SDK examples.
← Global picklists operations · Get started
Operation zoho.replacepicklistvalues
Provider route: POST /crm/v8/settings/global_picklists/{id}/actions/replace_picklist_values. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/zoho with npm, or alter-sdk-zoho with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { ZohoIntegration } from "@alter-ai/zoho";
async function execute(input: Parameters<ZohoIntegration["globalPicklists"]["replacePicklistValues"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new ZohoIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.globalPicklists.replacePicklistValues(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_zoho import ZohoIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = ZohoIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.global_picklists.replace_picklist_values(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.id | string | Required within parent | Format: int64 |
body | object | Required within parent | Request body for replacing picklist values in a global picklist. Additional keys: not allowed |
body.replace_picklist_values | array | Required within parent | Array of picklist value replacement pairs. Maximum items: 1 |
body.replace_picklist_values[] | object | Each item | Represents a single picklist value replacement pair. Additional keys: not allowed |
body.replace_picklist_values[].new_value | object | Required within parent | The new picklist value that will replace the old one. Additional keys: not allowed |
body.replace_picklist_values[].new_value.display_value | string | Optional | The picklist display value(translated value if translation enabled). Maximum length: 120 |
body.replace_picklist_values[].new_value.id | string | Optional | Id of the resource. Format: int64 |
body.replace_picklist_values[].old_value | object | Required within parent | The existing picklist value to be replaced. Additional keys: not allowed |
body.replace_picklist_values[].old_value.display_value | string | Optional | The picklist display value(translated value if translation enabled). Maximum length: 120 |
body.replace_picklist_values[].old_value.id | string | Optional | Id of the resource. Format: int64 |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | object | Alternative | Response object for immediate replacement completion. Additional keys: not allowed |
$ (anyOf 1).replace_picklist_values | array | Required within parent | Array of replacement operation results. Maximum items: 1 |
$ (anyOf 1).replace_picklist_values[] | object | Each item | Replacement operation result object. Additional keys: not allowed |
$ (anyOf 1).replace_picklist_values[].code | string | Required within parent | Indicates that the replacement operation completed successfully. Maximum length: 50 |
$ (anyOf 1).replace_picklist_values[].details | object | Required within parent | Additional details about the replacement operation. Additional keys: not allowed |
$ (anyOf 1).replace_picklist_values[].message | string | Required within parent | Human-readable message about the replacement operation. Maximum length: 255 |
$ (anyOf 1).replace_picklist_values[].status | string | Required within parent | Status of the replacement operation. Maximum length: 50 |
$ (anyOf 2) | object | Alternative | response object for scheduled replacement of picklist values. Additional keys: not allowed |
$ (anyOf 2).replace_picklist_values | array | Required within parent | Array of replacement operation results. Maximum items: 1 |
$ (anyOf 2).replace_picklist_values[] | object | Each item | Replacement operation result object. Additional keys: not allowed |
$ (anyOf 2).replace_picklist_values[].code | string | Required within parent | Indicates that the replacement operation has been scheduled. Maximum length: 50 |
$ (anyOf 2).replace_picklist_values[].details | object | Required within parent | Additional details about the replacement operation. Additional keys: not allowed |
$ (anyOf 2).replace_picklist_values[].details.job_id | string | Required within parent | The ID of the scheduled replacement job. Maximum length: 100 |
$ (anyOf 2).replace_picklist_values[].message | string | Required within parent | Human-readable message about the replacement operation. Maximum length: 255 |
$ (anyOf 2).replace_picklist_values[].status | string | Required within parent | Status of the replacement operation. Maximum length: 50 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.replacepicklistvalues. Catalog operation: replacePicklistValues. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.