Zoho: Sort Order
Zoho customViews.changeSort: arguments, response, policy and SDK examples.
← Custom views operations · Get started
Operation zoho.changesort
Provider route: PUT /crm/v8/settings/custom_views/actions/change_sort. 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["customViews"]["changeSort"]>[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.customViews.changeSort(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.custom_views.change_sort(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Required within parent | Additional keys: not allowed |
query.module | string | Required within parent | Maximum length: 25 |
body | object | Required within parent | Represents the request body for changing the sort order of one or more Custom Views. Additional keys: not allowed |
body.custom_views | array | Required within parent | Specify the list of Custom Views for which to update the sort order. Maximum items: 200 |
body.custom_views[] | object | Each item | Represents the sort order update details for a single Custom View. Additional keys: not allowed |
body.custom_views[].id | string | Required within parent | Specify the unique ID of the Custom View for which to update the sort order. Format: int64 Maximum length: 25 |
body.custom_views[].sort_by | Model | Required within parent | Expand Sort Order — request body — body custom views item sort by |
body.custom_views[].sort_order | string | Required within parent | Specify the sort order for the Custom View. Possible values: asc - Ascending order. desc - Descending order. One of: asc, desc |
Referenced models: Sort Order — request body — body custom views item sort by
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) | Model | Alternative | Expand Sort Order by ID — response body |
$ (anyOf 2) | object | Alternative | Represents the multi-status response for the change sort operation, containing a mix of success and failure items. Additional keys: not allowed |
$ (anyOf 2).custom_views | array | Required within parent | Represents the list of Custom View sort update results, including both successful and failed items. Maximum items: 200 Minimum items: 2 |
$ (anyOf 2).custom_views[] | JSON | Each item | Represents a sort update result item, which can be either a success or a failure response. |
$ (anyOf 2).custom_views[] (anyOf 1) | Model | Alternative | Expand Sort Order by ID — response body — custom views item |
$ (anyOf 2).custom_views[] (anyOf 2) | Model | Alternative | Expand Sort Order — response body — custom views custom views item value |
$ (anyOf 2).custom_views (allOf 1) | JSON | All variants apply | Represents a successful sort update item for a Custom View. |
$ (anyOf 2).custom_views (allOf 2) | JSON | All variants apply | Represents a sort update failure item for a Custom View. |
Referenced models: Sort Order — response body — custom views custom views item value, Sort Order by ID — response body — custom views item, Sort Order by ID — response body
Schemas
Section titled “Schemas”Sort Order — request body — body custom views item sort by
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a reference to a field in the Custom View, identified by its API name and unique ID. Additional keys: not allowed |
api_name | string or null | Optional | Represents the API name of the field. A null value indicates no field is selected. Maximum length: 255 |
id | string or null | Optional | Represents the unique ID of the field. A null value indicates no field is selected. Format: int64 Maximum length: 25 |
Sort Order — response body — custom views custom views item value
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | Represents the sort failure details for a Custom View, containing the error code, status, message, and additional context. |
$ (anyOf 1) | Model | Alternative | Expand Sort Order — response body — custom_views / custom_views / item / value / code: INVALID DATA, status: error |
$ (anyOf 2) | Model | Alternative | Expand Sort Order — response body — custom_views / custom_views / item / value / code: MANDATORY NOT FOUND, status: error |
Referenced models: Sort Order — response body — custom_views / custom_views / item / value / code: INVALID DATA, status: error, Sort Order — response body — custom_views / custom_views / item / value / code: MANDATORY NOT FOUND, status: error
Sort Order by ID — response body — custom views item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the successful update response for a Custom View operation, including the status, code, message, and updated view ID. Additional keys: not allowed |
code | string | Required within parent | Represents the success code for the update operation. Possible values: **SUCCESS** - The Custom View update completed successfully. Known values: SUCCESS |
details | object | Required within parent | Represents the additional details for the successful update operation. Additional keys: not allowed |
details.id | string | Required within parent | Represents the unique ID of the updated Custom View. Format: int64 Maximum length: 25 |
message | string | Required within parent | Represents the success message for the update operation. Maximum length: 255 |
status | string | Required within parent | Represents the status of the update response. Possible values: **success** - The operation was successful. Known values: success |
Sort Order by ID — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the bulk update success response containing a list of updated Custom View items. Additional keys: not allowed |
custom_views | array | Required within parent | Represents the list of Custom View update success items. Maximum items: 200 |
custom_views[] | Model | Each item | Expand Sort Order by ID — response body — custom views item |
Referenced models: Sort Order by ID — response body — custom views item
Sort Order — response body — custom_views / custom_views / item / value / code: INVALID DATA, status: error
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the error details returned when the sort field or sort order value in the request is invalid. Additional keys: not allowed |
code | string | Required within parent | Represents the error code for the invalid data error. Possible values: **INVALID_DATA** - The sort field or sort order value in the request is invalid. Known values: INVALID_DATA |
details | Model | Required within parent | Expand Sort Order — response body — custom_views / custom_views / item / value / code: INVALID DATA, status: error details Extra details |
message | string | Required within parent | Represents the error message describing the invalid sort data. Maximum length: 255 |
status | string | Required within parent | Represents the status of the response. Possible values: **error** - The request encountered an error. Known values: error |
Referenced models: Sort Order — response body — custom_views / custom_views / item / value / code: INVALID DATA, status: error details
Sort Order — response body — custom_views / custom_views / item / value / code: MANDATORY NOT FOUND, status: error
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the error details returned when a required field is missing from a sort request. Additional keys: not allowed |
code | string | Required within parent | Represents the error code for the missing required field. Possible values: **MANDATORY_NOT_FOUND** - A required field is missing from the sort request. Known values: MANDATORY_NOT_FOUND |
details | JSON | Required within parent | Represents the additional details about the missing required field. |
details (allOf 1) | Model | All variants apply | Expand Sort Order — response body — custom_views / custom_views / item / value / code: INVALID DATA, status: error details |
message | string | Required within parent | Represents the error message describing the missing required field. Maximum length: 255 |
status | string | Required within parent | Represents the status of the response. Possible values: **error** - The request encountered an error. Known values: error |
Referenced models: Sort Order — response body — custom_views / custom_views / item / value / code: INVALID DATA, status: error details
Sort Order — response body — custom_views / custom_views / item / value / code: INVALID DATA, status: error details
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the error details for an invalid or missing field, including the API name and JSON path. Additional keys: not allowed |
api_name | string | Required within parent | Represents the API name of the field that caused the error. Maximum length: 255 |
json_path | string | Required within parent | Represents the JSON path pointing to the invalid field in the request. Maximum length: 255 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.changesort. Catalog operation: changeSort. 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.