Zoho: Get Appointment Preferences
Zoho appointmentPreference.getAppointmentPreference: arguments, response, policy and SDK examples.
← Appointment preference operations · Get started
Operation zoho.getappointmentpreference
Provider route: GET /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"]["getAppointmentPreference"]>[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.getAppointmentPreference(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.get_appointment_preference(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.include | string | Optional | One of: deal_record_configuration |
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 appointment preferences configured for the Zoho CRM organization. Additional keys: not allowed |
appointment_preferences | object | Required within parent | Represents the complete set of appointment preferences configured in the CRM organization. Additional keys: not allowed |
appointment_preferences.allow_booking_outside_businesshours | boolean | Required within parent | Denotes if you can create appointments outside business hours. Possible values: true - You can create appointments outside business hours. false - You can not create appointments outside business hours. |
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 can not create appointments outside service availability. |
appointment_preferences.deal_record_configuration | object | Required within parent | Contains the field mappings and layout details for record configuration in Deals from the Appointments module. Additional keys: not allowed |
appointment_preferences.deal_record_configuration.field_mappings | array | Required within parent | Contains the field mappings that define how appointment and service data populates deal fields when Zoho CRM creates a deal automatically after the appointment completion. Maximum items: 100 |
appointment_preferences.deal_record_configuration.field_mappings[] | object | Each item | Represents a single field mapping entry, containing the target Deals module field, mapping type, and mapped value. Additional keys: not allowed |
appointment_preferences.deal_record_configuration.field_mappings[].field | object | Required within parent | Represents the Deals module field to which the appointment data is mapped. Additional keys: not allowed |
appointment_preferences.deal_record_configuration.field_mappings[].field.api_name | string | Required within parent | Represents the API name of the Deals module field. Maximum length: 100 |
appointment_preferences.deal_record_configuration.field_mappings[].field.id | string | Required within parent | Represents the unique identifier of the Deals module field. Maximum length: 20 |
appointment_preferences.deal_record_configuration.field_mappings[].type | string | Required within parent | Indicates the type of field mapping applied to populate the deal field. Possible values: static - A fixed value applies to the deal field regardless of appointment data. merge_field - The field value maps from the appointment or service module data. Known values: static, merge_field |
appointment_preferences.deal_record_configuration.field_mappings[].value | JSON | Required within parent | Represents the value assigned to the Deals module field during deal creation. |
appointment_preferences.deal_record_configuration.field_mappings[].value (anyOf 1) | string | Alternative | Represents a merge-field expression that maps data from the Appointments or Services module to the deal field. Maximum length: 1000 |
appointment_preferences.deal_record_configuration.field_mappings[].value (anyOf 2) | object | Alternative | Represents a structured static value for lookup or complex deal fields, provided as an object with a name and an identifier. Additional keys: allowed |
appointment_preferences.deal_record_configuration.id | string | Required within parent | Represents the unique identifier of the deal record configuration. Maximum length: 20 |
appointment_preferences.deal_record_configuration.layout | object | Required within parent | Represents the Deals module layout used when creating deal records after an appointment is completed. Additional keys: not allowed |
appointment_preferences.deal_record_configuration.layout.id | string | Optional | Represents the unique identifier of the Deals module layout. Maximum length: 64 |
appointment_preferences.deal_record_configuration.layout.name | string | Required within parent | Represents the display name of the Deals module layout as shown in the Zoho CRM interface. Maximum length: 255 |
appointment_preferences.sharing_details | object | Optional | Details about the sharing configuration for appointment-associated records. When sharing is enabled, the record associated in the appointment field is shared with the appointment owner with the configured permission level. Additional keys: not allowed |
appointment_preferences.sharing_details.permission | string | Optional | The permission level granted to the appointment owner for the associated record. Known values: read_only, read_write, full_access |
appointment_preferences.sharing_details.sharing_computation_status | boolean | Optional | Indicates whether the sharing computation is currently in progress or completed. |
appointment_preferences.sharing_enabled | boolean | Optional | Indicates whether sharing of the associated record in appointments with the appointment owner is enabled. |
appointment_preferences.show_job_sheet | boolean | Required within parent | Represents whether filling out the job sheet is mandatory for marking an appointment as ‘completed’. Possible values: true - Job sheet is mandatory for appointment completion. false - Job sheet is not mandatory for appointment completion. |
appointment_preferences.when_appointment_completed | string | Required within parent | 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’. Known values: do_not_create_deal, create_deal |
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 has to manually mark the appointment as ‘completed’. Known values: mark_as_complete, ask_appointment_provider_to_complete |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.getappointmentpreference. Catalog operation: getAppointmentPreference. 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.