Skip to content

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.

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 os
from alter_sdk import App
from 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()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectRequired within parentAdditional keys: not allowed
query.modulestringRequired within parentMaximum length: 25
bodyobjectRequired within parentRepresents the request body for changing the sort order of one or more Custom Views.
Additional keys: not allowed
body.custom_viewsarrayRequired within parentSpecify the list of Custom Views for which to update the sort order.
Maximum items: 200
body.custom_views[]objectEach itemRepresents the sort order update details for a single Custom View.
Additional keys: not allowed
body.custom_views[].idstringRequired within parentSpecify the unique ID of the Custom View for which to update the sort order.
Format: int64
Maximum length: 25
body.custom_views[].sort_byModelRequired within parentExpand Sort Order — request body — body custom views item sort by
body.custom_views[].sort_orderstringRequired within parentSpecify 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 media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Sort Order by ID — response body
$ (anyOf 2)objectAlternativeRepresents the multi-status response for the change sort operation, containing a mix of success and failure items.
Additional keys: not allowed
$ (anyOf 2).custom_viewsarrayRequired within parentRepresents the list of Custom View sort update results, including both successful and failed items.
Maximum items: 200
Minimum items: 2
$ (anyOf 2).custom_views[]JSONEach itemRepresents a sort update result item, which can be either a success or a failure response.
$ (anyOf 2).custom_views[] (anyOf 1)ModelAlternativeExpand Sort Order by ID — response body — custom views item
$ (anyOf 2).custom_views[] (anyOf 2)ModelAlternativeExpand Sort Order — response body — custom views custom views item value
$ (anyOf 2).custom_views (allOf 1)JSONAll variants applyRepresents a successful sort update item for a Custom View.
$ (anyOf 2).custom_views (allOf 2)JSONAll variants applyRepresents 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

Sort Order — request body — body custom views item sort by
FieldTypePresenceDescription and constraints
$objectRootRepresents a reference to a field in the Custom View, identified by its API name and unique ID.
Additional keys: not allowed
api_namestring or nullOptionalRepresents the API name of the field. A null value indicates no field is selected.
Maximum length: 255
idstring or nullOptionalRepresents 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
FieldTypePresenceDescription and constraints
$JSONRootRepresents the sort failure details for a Custom View, containing the error code, status, message, and additional context.
$ (anyOf 1)ModelAlternativeExpand Sort Order — response body — custom_views / custom_views / item / value / code: INVALID DATA, status: error
$ (anyOf 2)ModelAlternativeExpand 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
FieldTypePresenceDescription and constraints
$objectRootRepresents the successful update response for a Custom View operation, including the status, code, message, and updated view ID.
Additional keys: not allowed
codestringRequired within parentRepresents the success code for the update operation.
Possible values:
**SUCCESS** - The Custom View update completed successfully.
Known values: SUCCESS
detailsobjectRequired within parentRepresents the additional details for the successful update operation.
Additional keys: not allowed
details.idstringRequired within parentRepresents the unique ID of the updated Custom View.
Format: int64
Maximum length: 25
messagestringRequired within parentRepresents the success message for the update operation.
Maximum length: 255
statusstringRequired within parentRepresents the status of the update response.
Possible values:
**success** - The operation was successful.
Known values: success
Sort Order by ID — response body
FieldTypePresenceDescription and constraints
$objectRootRepresents the bulk update success response containing a list of updated Custom View items.
Additional keys: not allowed
custom_viewsarrayRequired within parentRepresents the list of Custom View update success items.
Maximum items: 200
custom_views[]ModelEach itemExpand 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
FieldTypePresenceDescription and constraints
$objectRootRepresents the error details returned when the sort field or sort order value in the request is invalid.
Additional keys: not allowed
codestringRequired within parentRepresents 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
detailsModelRequired within parentExpand Sort Order — response body — custom_views / custom_views / item / value / code: INVALID DATA, status: error details
Extra details
messagestringRequired within parentRepresents the error message describing the invalid sort data.
Maximum length: 255
statusstringRequired within parentRepresents 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
FieldTypePresenceDescription and constraints
$objectRootRepresents the error details returned when a required field is missing from a sort request.
Additional keys: not allowed
codestringRequired within parentRepresents 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
detailsJSONRequired within parentRepresents the additional details about the missing required field.
details (allOf 1)ModelAll variants applyExpand Sort Order — response body — custom_views / custom_views / item / value / code: INVALID DATA, status: error details
messagestringRequired within parentRepresents the error message describing the missing required field.
Maximum length: 255
statusstringRequired within parentRepresents 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
FieldTypePresenceDescription and constraints
$objectRootRepresents the error details for an invalid or missing field, including the API name and JSON path.
Additional keys: not allowed
api_namestringRequired within parentRepresents the API name of the field that caused the error.
Maximum length: 255
json_pathstringRequired within parentRepresents the JSON path pointing to the invalid field in the request.
Maximum length: 255

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.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.