Skip to content

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.

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 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.appointment_preference.update_appointment_preference(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyobjectRequired within parentContains the appointment preference settings to update in the Zoho CRM organization.
Additional keys: not allowed
body.appointment_preferencesobjectOptionalSpecify the appointment preferences to configure for the Zoho CRM organization.
Additional keys: not allowed
body.appointment_preferences.allow_booking_outside_businesshoursbooleanRequired within parentDenotes 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_availabilitybooleanRequired within parentDenotes 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_configurationobjectRequired within parentSpecify 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_mappingsarrayRequired within parentSpecify 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[]objectEach itemEach 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[].fieldobjectRequired within parentSpecify 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_namestringRequired within parentProvide 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.idstringRequired within parentProvide 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[].typestringRequired within parentSpecify 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[].valueJSONRequired within parentDenotes 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)stringAlternativeSpecify 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)objectAlternativeSpecify 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.layoutobjectRequired within parentSpecify the Deals module layout to use when creating deal records from completed appointments.
Additional keys: not allowed
body.appointment_preferences.deal_record_configuration.layout.idstringRequired within parentSpecify 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.namestringOptionalSpecify the name of the Deals module layout.
Maximum length: 50
body.appointment_preferences.sharing_detailsobjectOptionalSharing 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.permissionstringRequired within parentThe permission level granted to the appointment owner for the associated record.
One of: read_only, read_write, full_access
body.appointment_preferences.sharing_enabledbooleanOptionalSet 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_sheetbooleanOptionalRepresents 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_completedstringOptionalRepresents 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_exceedsstringOptionalRepresents 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 media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$objectRootReturns the status information confirming the outcome of the appointment preferences update.
Additional keys: not allowed
appointment_preferencesobjectRequired within parentRepresents the response details confirming the outcome of the update operation.
Additional keys: not allowed
appointment_preferences.codestringRequired within parentRepresents the response code for the update operation.
Possible values:
SUCCESS - The appointment preferences were updated successfully.

Known values: SUCCESS
appointment_preferences.detailsobjectRequired within parentRepresents additional metadata about the update operation.
Additional keys: allowed
appointment_preferences.messagestringRequired within parentRepresents the success message for the update operation.
Possible values:
Appointments preferences updated successfully

Known values: Appointments preferences updated successfully
appointment_preferences.statusstringRequired within parentIndicates whether the appointment preferences update was successful.
Possible values:
success - The appointment preferences were updated successfully.

Known values: success

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.

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.