> ## 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

> Update Appointment Preferences. Includes SDK V2 and CLI requests, input constraints, response fields, and Deepline credit cost.

Update Appointment Preferences.

<Info>
  Tool ID: `zoho_crm_appointment_preference_update_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_update_appointment_preference',
  {},
);

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

### CLI

```bash theme={null}
deepline tools execute zoho_crm_appointment_preference_update_appointment_preference --input '{}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "appointment_preferences": {
      "status": "success",
      "code": "SUCCESS",
      "message": "Appointments preferences updated successfully",
      "details": {}
    }
  }
}
```

Use `deepline tools get zoho_crm_appointment_preference_update_appointment_preference --json` for the latest machine-readable contract.

## Input reference

Request body containing appointment preference fields to update.

| Name                              | Type     | Required | Default | Details                                        |
| --------------------------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `payload.appointment_preferences` | `object` | No       | —       | The appointment preference data to be updated. |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Request body containing appointment preference fields to update.",
    "properties": {
      "appointment_preferences": {
        "type": "object",
        "description": "The appointment preference data to be updated.",
        "properties": {
          "show_job_sheet": {
            "type": "boolean",
            "description": "Set to true to display job sheets for appointments."
          },
          "when_duration_exceeds": {
            "type": "string",
            "description": "Specifies how to handle appointments exceeding their duration.",
            "enum": [
              "mark_as_complete",
              "ask_appointment_provider_to_complete"
            ]
          },
          "when_appointment_completed": {
            "type": "string",
            "description": "Specifies whether to create a deal automatically when an appointment is completed.",
            "enum": [
              "do_not_create_deal",
              "create_deal"
            ]
          },
          "allow_booking_outside_service_availability": {
            "type": "boolean",
            "description": "If true, allows appointments to be booked outside service availability."
          },
          "allow_booking_outside_businesshours": {
            "type": "boolean",
            "description": "If true, allows appointments to be booked outside business hours."
          },
          "deal_record_configuration": {
            "type": "object",
            "description": "Defines how deal records should be created after an appointment.",
            "properties": {
              "layout": {
                "type": "object",
                "description": "Defines which layout to use for the deal record.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the layout (Zoho internal ID).",
                    "maxLength": 20
                  },
                  "name": {
                    "type": "string",
                    "description": "Layout name of deals module",
                    "maxLength": 50
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              },
              "field_mappings": {
                "type": "array",
                "description": "List of field mappings for deal creation.",
                "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": "Type of field mapping - static or merge field.",
                      "enum": [
                        "static",
                        "merge_field"
                      ]
                    },
                    "value": {
                      "type": "object",
                      "description": "The value to map to the target field.",
                      "additionalProperties": true
                    },
                    "field": {
                      "type": "object",
                      "description": "The target deal field details.",
                      "properties": {
                        "api_name": {
                          "type": "string",
                          "description": "API name of the target field.",
                          "maxLength": 100
                        },
                        "id": {
                          "type": "string",
                          "description": "Unique identifier of the target field (Zoho internal ID).",
                          "maxLength": 20
                        }
                      },
                      "required": [
                        "api_name",
                        "id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "value",
                    "field",
                    "type"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "layout",
              "field_mappings"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "allow_booking_outside_service_availability",
          "allow_booking_outside_businesshours",
          "deal_record_configuration"
        ],
        "additionalProperties": false
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name                                          | Type                                              | Required | Default | Details                                                                                   |
| --------------------------------------------- | ------------------------------------------------- | -------- | ------- | ----------------------------------------------------------------------------------------- |
| `result.data`                                 | `object`                                          | Yes      | —       | Response object returned after successful update, containing status metadata and details. |
| `result.data.appointment_preferences`         | `object`                                          | Yes      | —       | Response details confirming the update status.                                            |
| `result.data.appointment_preferences.status`  | `"success"`                                       | Yes      | —       | Indicates if the request was successful. Allowed: `success`.                              |
| `result.data.appointment_preferences.code`    | `"SUCCESS"`                                       | Yes      | —       | Response code for a successful update. Allowed: `SUCCESS`.                                |
| `result.data.appointment_preferences.message` | `"Appointments preferences updated successfully"` | Yes      | —       | Human-readable success message. Allowed: `Appointments preferences updated successfully`. |
| `result.data.appointment_preferences.details` | `record`                                          | Yes      | —       | Additional details regarding the updated preferences. May contain operation metadata.     |
| `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": "Response object returned after successful update, containing status metadata and details.",
        "properties": {
          "appointment_preferences": {
            "type": "object",
            "description": "Response details confirming the update status.",
            "properties": {
              "status": {
                "type": "string",
                "description": "Indicates if the request was successful.",
                "enum": [
                  "success"
                ]
              },
              "code": {
                "type": "string",
                "description": "Response code for a successful update.",
                "enum": [
                  "SUCCESS"
                ]
              },
              "message": {
                "type": "string",
                "description": "Human-readable success message.",
                "enum": [
                  "Appointments preferences updated successfully"
                ]
              },
              "details": {
                "type": "object",
                "description": "Additional details regarding the updated preferences. May contain operation metadata.",
                "additionalProperties": true
              }
            },
            "required": [
              "status",
              "code",
              "message",
              "details"
            ],
            "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)
