> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Zoho CRM: README

> Retrieve Appointment Preferences. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Retrieve Appointment Preferences.

<Info>
  Tool ID: `zoho_crm_appointment_preference_get_appointment_preference`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'zoho_crm_appointment_preference_get_appointment_preference',
  {
    "include": "deal_record_configuration"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute zoho_crm_appointment_preference_get_appointment_preference --input '{
  "include": "deal_record_configuration"
}' --json
```

## Example response

The static output schema is not detailed enough to generate a reliable example. Use `deepline tools get zoho_crm_appointment_preference_get_appointment_preference --json` for the complete live contract.

## Input reference

Fetches the existing configuration for appointment preferences, including rules for deal creation, job sheet visibility, and mark as complete configurations.

| Name              | Type                          | Required | Default | Details                                                                                                                                                                        |
| ----------------- | ----------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `payload.include` | `"deal_record_configuration"` | No       | —       | Include additional related data in the response. For example, specify `deal_record_configuration` to include deal configuration details. Allowed: `deal_record_configuration`. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Fetches the existing configuration for appointment preferences, including rules for deal creation, job sheet visibility, and mark as complete configurations.",
    "properties": {
      "include": {
        "type": "string",
        "description": "Include additional related data in the response. For example, specify `deal_record_configuration` to include deal configuration details.",
        "enum": [
          "deal_record_configuration"
        ]
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name                                                                                            | Type                                                           | Required | Default | Details                                                                                                                                          |
| ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `result.data`                                                                                   | `object`                                                       | Yes      | —       | A JSON object containing the appointment preferences configured in the CRM.                                                                      |
| `result.data.appointment_preferences`                                                           | `object`                                                       | Yes      | —       | The complete set of appointment preferences configured in CRM.                                                                                   |
| `result.data.appointment_preferences.show_job_sheet`                                            | `boolean`                                                      | Yes      | —       | Indicates whether job sheets are shown for appointments.                                                                                         |
| `result.data.appointment_preferences.when_duration_exceeds`                                     | `"mark_as_complete" \| "ask_appointment_provider_to_complete"` | No       | —       | Defines how to handle appointments when the scheduled duration is exceeded. Allowed: `mark_as_complete`, `ask_appointment_provider_to_complete`. |
| `result.data.appointment_preferences.when_appointment_completed`                                | `"do_not_create_deal" \| "create_deal"`                        | Yes      | —       | Determines whether a deal is automatically created when an appointment is completed. Allowed: `do_not_create_deal`, `create_deal`.               |
| `result.data.appointment_preferences.allow_booking_outside_service_availability`                | `boolean`                                                      | Yes      | —       | If true, allows booking appointments outside defined service availability.                                                                       |
| `result.data.appointment_preferences.allow_booking_outside_businesshours`                       | `boolean`                                                      | Yes      | —       | If true, allows appointments to be scheduled beyond business hours.                                                                              |
| `result.data.appointment_preferences.deal_record_configuration`                                 | `object`                                                       | Yes      | —       | Configuration for creating deal records after an appointment is completed.                                                                       |
| `result.data.appointment_preferences.deal_record_configuration.layout`                          | `object`                                                       | Yes      | —       | Details of the layout used when creating deal records.                                                                                           |
| `result.data.appointment_preferences.deal_record_configuration.layout.name`                     | `string`                                                       | Yes      | —       | Name of the layout as shown in the CRM UI. Maximum length: 255.                                                                                  |
| `result.data.appointment_preferences.deal_record_configuration.layout.id`                       | `string`                                                       | No       | —       | Unique identifier for the layout (Zoho internal ID). Maximum length: 64.                                                                         |
| `result.data.appointment_preferences.deal_record_configuration.field_mappings`                  | `array`                                                        | Yes      | —       | List of field mappings from appointment data to deal fields. Maximum items: 100.                                                                 |
| `result.data.appointment_preferences.deal_record_configuration.field_mappings[].type`           | `"static" \| "merge_field"`                                    | Yes      | —       | Specifies whether the mapping uses a static value or data from another field. Allowed: `static`, `merge_field`.                                  |
| `result.data.appointment_preferences.deal_record_configuration.field_mappings[].value`          | `record`                                                       | Yes      | —       | Value assigned to the mapped field.                                                                                                              |
| `result.data.appointment_preferences.deal_record_configuration.field_mappings[].field`          | `object`                                                       | Yes      | —       | The target field in the deal module.                                                                                                             |
| `result.data.appointment_preferences.deal_record_configuration.field_mappings[].field.api_name` | `string`                                                       | Yes      | —       | API name of the deal field. Maximum length: 100.                                                                                                 |
| `result.data.appointment_preferences.deal_record_configuration.field_mappings[].field.id`       | `string`                                                       | Yes      | —       | Unique identifier of the deal field (Zoho internal ID). Maximum length: 20.                                                                      |
| `result.data.appointment_preferences.deal_record_configuration.id`                              | `string`                                                       | Yes      | —       | Unique identifier for the deal record configuration. Maximum length: 20.                                                                         |
| `result.meta`                                                                                   | `object`                                                       | No       | —       | Additional response metadata (status, paging).                                                                                                   |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "A JSON object containing the appointment preferences configured in the CRM.",
        "properties": {
          "appointment_preferences": {
            "type": "object",
            "description": "The complete set of appointment preferences configured in CRM.",
            "properties": {
              "show_job_sheet": {
                "type": "boolean",
                "description": "Indicates whether job sheets are shown for appointments."
              },
              "when_duration_exceeds": {
                "type": "string",
                "description": "Defines how to handle appointments when the scheduled duration is exceeded.",
                "enum": [
                  "mark_as_complete",
                  "ask_appointment_provider_to_complete"
                ]
              },
              "when_appointment_completed": {
                "type": "string",
                "description": "Determines whether a deal is automatically created when an appointment is completed.",
                "enum": [
                  "do_not_create_deal",
                  "create_deal"
                ]
              },
              "allow_booking_outside_service_availability": {
                "type": "boolean",
                "description": "If true, allows booking appointments outside defined service availability."
              },
              "allow_booking_outside_businesshours": {
                "type": "boolean",
                "description": "If true, allows appointments to be scheduled beyond business hours."
              },
              "deal_record_configuration": {
                "type": "object",
                "description": "Configuration for creating deal records after an appointment is completed.",
                "properties": {
                  "layout": {
                    "type": "object",
                    "description": "Details of the layout used when creating deal records.",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Name of the layout as shown in the CRM UI.",
                        "maxLength": 255
                      },
                      "id": {
                        "type": "string",
                        "description": "Unique identifier for the layout (Zoho internal ID).",
                        "maxLength": 64
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "field_mappings": {
                    "type": "array",
                    "description": "List of field mappings from appointment data to deal fields.",
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "description": "A single field mapping object containing the target field, mapping type and mapped value.",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Specifies whether the mapping uses a static value or data from another field.",
                          "enum": [
                            "static",
                            "merge_field"
                          ]
                        },
                        "value": {
                          "type": "object",
                          "description": "Value assigned to the mapped field.",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "object",
                          "description": "The target field in the deal module.",
                          "properties": {
                            "api_name": {
                              "type": "string",
                              "description": "API name of the deal field.",
                              "maxLength": 100
                            },
                            "id": {
                              "type": "string",
                              "description": "Unique identifier of the deal field (Zoho internal ID).",
                              "maxLength": 20
                            }
                          },
                          "required": [
                            "api_name",
                            "id"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "type",
                        "value",
                        "field"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "id": {
                    "type": "string",
                    "description": "Unique identifier for the deal record configuration.",
                    "maxLength": 20
                  }
                },
                "required": [
                  "layout",
                  "field_mappings",
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "show_job_sheet",
              "when_appointment_completed",
              "allow_booking_outside_service_availability",
              "allow_booking_outside_businesshours",
              "deal_record_configuration"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "appointment_preferences"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
