Zoho: Update Appointment Preferences
Zoho appointmentPreference.updateAppointmentPreference: arguments, response, policy and SDK examples.
← Appointment preference operations · Get started
Operation zoho.updateappointmentpreference
Provider route: PUT /crm/v8/settings/appointment_preferences. 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["appointmentPreference"]["updateAppointmentPreference"]>[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.appointmentPreference.updateAppointmentPreference(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.appointment_preference.update_appointment_preference(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | object | Required within parent | Contains the appointment preference settings to update in the Zoho CRM organization. Additional keys: not allowed |
body.appointment_preferences | object | Optional | Specify the appointment preferences to configure for the Zoho CRM organization. Additional keys: not allowed |
body.appointment_preferences.allow_booking_outside_businesshours | boolean | Required within parent | Denotes if you can create appointments outside business hours. You can configure this preference only when allow_booking_outside_service_availability:true. Possible values: true - You can create appointments outside business hours. false - You cannot create appointments outside business hours. |
body.appointment_preferences.allow_booking_outside_service_availability | boolean | Required within parent | Denotes if you can create appointments outside service availability. Possible values: true - You can create appointments outside service availability. false - You cannot create appointments outside service availability. |
body.appointment_preferences.deal_record_configuration | object | Required within parent | Specify the configuration for creating Deal records when an appointment is completed, including the layout and field mappings. Additional keys: not allowed |
body.appointment_preferences.deal_record_configuration.field_mappings | array | Required within parent | Specify the field mappings that define how appointment and service data populates the Deals module fields when a deal is created. Maximum items: 100 |
body.appointment_preferences.deal_record_configuration.field_mappings[] | object | Each item | Each object specifies the details for each field mapping, including the target Deals module field, the mapping type, and the corresponding value. Additional keys: not allowed |
body.appointment_preferences.deal_record_configuration.field_mappings[].field | object | Required within parent | Specify the Deals module field to which the appointment data is mapped. Use the [Get Fields API](fields.yaml#$.paths./settings/fields.get) call to fetch the API name and ID of the field. Additional keys: not allowed |
body.appointment_preferences.deal_record_configuration.field_mappings[].field.api_name | string | Required within parent | Provide the API name of the Deals module field. Maximum length: 50 Pattern: ^[A-Za-z][A-Za-z0-9_]*$ |
body.appointment_preferences.deal_record_configuration.field_mappings[].field.id | string | Required within parent | Provide the Unique ID of the Deals module field. Use the [Get Fields API](fields.yaml$#.paths./settings/fields.get) to get the valid API name and ID of the field. Format: int64 |
body.appointment_preferences.deal_record_configuration.field_mappings[].type | string | Required within parent | Specify the type of field mapping to use. Possible values: static - Set a fixed value for the deal field regardless of appointment data. merge_field - Map the deal field value from appointment or service module data. One of: static, merge_field |
body.appointment_preferences.deal_record_configuration.field_mappings[].value | JSON | Required within parent | Denotes the value of the Deals fields. The format of this key’s value depends on the mapping type. Value for merge_field: The datatype of this value is a string. To merge any field from a module, it should be specified like this ${module_api_name.field_api_name}. Example: ${Appointments__s.Appointment_Name} Value for static: The datatype of this value is a JSON object. It contains the name and ID of the entity. When you want to give static values that look up to a different module, make a GET API call of the specific module and provide the relevant ID and name of the record. You can also give standard text values enclosed in a string. |
body.appointment_preferences.deal_record_configuration.field_mappings[].value (anyOf 1) | string | Alternative | Specify a merge-field expression that references appointment or service module data using the format ${!module_api_name.field_api_name}. Maximum length: 1000 |
body.appointment_preferences.deal_record_configuration.field_mappings[].value (anyOf 2) | object | Alternative | Specify a structured static value for lookup and complex deal fields, provided as an object with a name and an ID. Additional keys: allowed |
body.appointment_preferences.deal_record_configuration.layout | object | Required within parent | Specify the Deals module layout to use when creating deal records from completed appointments. Additional keys: not allowed |
body.appointment_preferences.deal_record_configuration.layout.id | string | Required within parent | Specify the unique identifier of the Deals module layout. You can get the ID using the [Get Layouts API](layouts.yaml#$.paths./settings/layouts.get). Format: int64 Maximum length: 19 Minimum length: 1 Pattern: ^[0-9]{1,19}$ |
body.appointment_preferences.deal_record_configuration.layout.name | string | Optional | Specify the name of the Deals module layout. Maximum length: 50 |
body.appointment_preferences.sharing_details | object | Optional | Sharing configuration for appointment-associated records. Defines the permission level granted to the appointment owner for the associated record. Required when sharing_enabled is set to true. Additional keys: not allowed |
body.appointment_preferences.sharing_details.permission | string | Required within parent | The permission level granted to the appointment owner for the associated record. One of: read_only, read_write, full_access |
body.appointment_preferences.sharing_enabled | boolean | Optional | Set to true to enable sharing of the associated record in appointments with the appointment owner. When set to true, sharing_details must also be provided. |
body.appointment_preferences.show_job_sheet | boolean | Optional | Represents whether filling out the job sheet is mandatory for marking an appointment as ‘completed’. You can mandate job sheets only when when_duration_exceeds: ask_appointment_provider_to_complete. Possible values: true - Job sheet is mandatory for appointment completion. false - Job sheet is not mandatory for appointment completion. |
body.appointment_preferences.when_appointment_completed | string | Optional | Represents whether a deal has to be created, when an appointment is completed. Possible values: create_deal - Deal is created when any appointment is marked ‘Completed’. do_not_create_deal - Deal is not created when any appointment is marked ‘Completed’. One of: do_not_create_deal, create_deal |
body.appointment_preferences.when_duration_exceeds | string | Optional | Represents who has to mark the appointment as ‘Completed’ when the service duration gets over. Possible values: mark_as_complete - The appointment is automatically marked as ‘completed’. ask_appointment_provider_to_complete - User have to manually mark the appointment as ‘completed’. One of: mark_as_complete, ask_appointment_provider_to_complete |
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 | Returns the status information confirming the outcome of the appointment preferences update. Additional keys: not allowed |
appointment_preferences | object | Required within parent | Represents the response details confirming the outcome of the update operation. Additional keys: not allowed |
appointment_preferences.code | string | Required within parent | Represents the response code for the update operation. Possible values: SUCCESS - The appointment preferences were updated successfully. Known values: SUCCESS |
appointment_preferences.details | object | Required within parent | Represents additional metadata about the update operation. Additional keys: allowed |
appointment_preferences.message | string | Required within parent | Represents the success message for the update operation. Possible values: Appointments preferences updated successfully Known values: Appointments preferences updated successfully |
appointment_preferences.status | string | Required within parent | Indicates whether the appointment preferences update was successful. Possible values: success - The appointment preferences were updated successfully. Known values: success |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.updateappointmentpreference. Catalog operation: updateAppointmentPreference. 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.