Zoho: Create record locking configuration
Zoho recordLockingConfigurations.createRecordLockingConfiguration: arguments, response, policy and SDK examples.
← Record locking configurations operations · Get started
Operation zoho.createrecordlockingconfiguration
Provider route: POST /crm/v8/settings/record_locking_configurations. 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["recordLockingConfigurations"]["createRecordLockingConfiguration"]>[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.recordLockingConfigurations.createRecordLockingConfiguration(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.record_locking_configurations.create_record_locking_configuration(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 | Module API name Maximum length: 256 |
body | object | Required within parent | Request body for creating a record locking configuration. Additional keys: not allowed |
body.record_locking_configurations | array | Required within parent | Array containing the record locking configuration details to be created. Maximum items: 1 |
body.record_locking_configurations[] | object | Each item | Object representing the record locking configuration to create. Additional keys: allowed |
body.record_locking_configurations[].excluded_fields | array | Optional | Fields that are exempt from locking. Even if a record is locked, these fields can still be modified. Maximum items: 15 |
body.record_locking_configurations[].excluded_fields[] | object | Each item | Field descriptor for a field to be excluded from locking. Additional keys: not allowed |
body.record_locking_configurations[].excluded_fields[].id | string | Required within parent | The unique identifier of the field. Use the [Get Fields Metadata API](fields.yaml#$.paths./settings/fields.get) to retrieve field IDs. Format: int64 |
body.record_locking_configurations[].feature_type | string | Optional | Feature type identifier. Must be `record_locking` for this configuration. Default: record_locking One of: record_locking |
body.record_locking_configurations[].lock_excluded_profiles | array | Optional | Profiles that are excluded from locking. These profiles can still edit locked records. This property is required when `locked_for` is `all_profiles_except_excluded_profiles`. Maximum items: 15 |
body.record_locking_configurations[].lock_excluded_profiles[] | object | Each item | Profile descriptor for a profile to be excluded from locking. Additional keys: not allowed |
body.record_locking_configurations[].lock_excluded_profiles[].id | string | Required within parent | Profile ID. Use the [Get Profiles API](profiles.yaml#$.paths./settings/profiles.get) to retrieve profile IDs. Format: int64 Maximum length: 19 Minimum length: 1 Pattern: ^[0-9]{1,19}$ |
body.record_locking_configurations[].lock_for_portal_users | boolean | Optional | If `true`, portal users are also subject to the locking restrictions. Default: true |
body.record_locking_configurations[].lock_type | string | Required within parent | Defines the locking mode. `automatic` locks records based on rules, `manual` requires explicit action, `both` supports both. One of: automatic, manual, both |
body.record_locking_configurations[].locked_for | string | Optional | Indicates which profiles the lock applies to. Use `all_profiles` for everyone, or `all_profiles_except_excluded_profiles` to exclude specific profiles. One of: all_profiles, all_profiles_except_excluded_profiles |
body.record_locking_configurations[].locking_rules | array | Optional | A set of rules that define when records should be automatically locked. Each rule contains criteria that records must match to be locked. Maximum items: 5 |
body.record_locking_configurations[].locking_rules[] | object | Each item | A locking rule object. Additional keys: not allowed |
body.record_locking_configurations[].locking_rules[].criteria | object | Required within parent | Criteria that records must satisfy for the rule to apply. The structure depends on the field type and operator. Additional keys: allowed |
body.record_locking_configurations[].locking_rules[].lock_existing_records | boolean | Optional | If `true`, existing records that match the criteria will also be locked when the rule is saved. Default: false |
body.record_locking_configurations[].locking_rules[].name | string | Required within parent | Unique name for the locking rule. Maximum length: 256 |
body.record_locking_configurations[].restricted_actions | array | Optional | List of actions that are restricted on locked records. These actions cannot be performed on locked records. Maximum items: 10 |
body.record_locking_configurations[].restricted_actions[] | string | Each item | A restricted action that is prohibited on locked records. Default: update One of: change_owner, update, delete, tags |
body.record_locking_configurations[].restricted_communications | array | Optional | List of communication actions that are restricted for locked records. Maximum items: 10 |
body.record_locking_configurations[].restricted_communications[] | string | Each item | A restricted communication action that is prohibited on locked records. One of: send_mail |
body.record_locking_configurations[].restricted_custom_buttons | array | Optional | List of custom buttons that are restricted on locked records. These buttons cannot be used on locked records. Maximum items: 30 |
body.record_locking_configurations[].restricted_custom_buttons[] | object | Each item | Descriptor of a restricted custom button. Additional keys: not allowed |
body.record_locking_configurations[].restricted_custom_buttons[].id | string | Required within parent | Unique identifier of the custom button. Format: int64 Maximum length: 19 |
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 |
|---|---|---|---|
$ | object | Root | Response object for a successful configuration creation. Additional keys: not allowed |
record_locking_configurations | array | Required within parent | Array containing details of the created record locking configuration. Maximum items: 1 |
record_locking_configurations[] | object | Each item | Details of the created record locking configuration. Additional keys: not allowed |
record_locking_configurations[].code | string | Required within parent | Success code for the operation. Known values: SUCCESS |
record_locking_configurations[].details | object | Required within parent | Additional details about the created configuration. Additional keys: not allowed |
record_locking_configurations[].details.id | string | Required within parent | Unique identifier of the newly created record locking configuration. Maximum length: 255 |
record_locking_configurations[].message | string | Required within parent | Informational message about the creation. Maximum length: 255 |
record_locking_configurations[].status | string | Required within parent | Indicates that the creation operation was successful. Known values: success |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.createrecordlockingconfiguration. Catalog operation: createRecordLockingConfiguration. 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.