> ## 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: Record Upsert Records

> Create Zoho CRM records or update existing ones that match on duplicate check fields, such as email. Includes SDK V2 examples, schemas, and cost.

Create Zoho CRM records or update existing ones that match on duplicate check fields, such as email.

> [!NOTE]
>
> Tool ID: `zoho_crm_record_upsert_records`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'zoho_crm_record_upsert_records',
  {
    "module": "example",
    "data": [
      {
        "id": "id_123"
      }
    ]
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute zoho_crm_record_upsert_records --input '{
  "module": "example",
  "data": [
    {
      "id": "id_123"
    }
  ]
}' --json
```

## Example response

The static output schema lacks the details for a reliable example. Use `deepline describe zoho_crm_record_upsert_records --json` for the complete live contract.

## Input reference

Request body schema for upsert operations, allowing creation or update of records based on duplicate fields.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.module` | `string` | Yes | — | Specifies the module name Maximum length: 100. |
| `payload.data` | `array` | Yes | — | List of records to be created or updated using the upsert operation. Maximum items: 100. |
| `payload.trigger` | `array` | No | — | List of automation triggers to be executed during the upsert operation. Maximum items: 10. |
| `payload.duplicate_check_fields` | `array` | No | — | Defines the ordered list of fields used to detect duplicate records during upsert. Maximum items: 10. |
| `payload.wf_trigger` | `string` | No | — | Workflow trigger identifier to be executed as part of the upsert operation. |
| `payload.lar_id` | `string` | No | — | Layout assignment rule identifier used to determine record layout during upsert. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Request body schema for upsert operations, allowing creation or update of records based on duplicate fields.",
    "properties": {
      "module": {
        "type": "string",
        "description": "Specifies the module name",
        "maxLength": 100
      },
      "data": {
        "type": "array",
        "description": "List of records to be created or updated using the upsert operation.",
        "maxItems": 100,
        "items": {
          "type": "object",
          "description": "Single record payload containing field-value pairs for upsert.",
          "properties": {
            "id": {
              "type": [
                "string",
                "null"
              ],
              "description": "Unique identifier of the record. If null or omitted, a new record may be created."
            }
          },
          "additionalProperties": true
        }
      },
      "trigger": {
        "type": "array",
        "description": "List of automation triggers to be executed during the upsert operation.",
        "maxItems": 10,
        "items": {
          "type": "string",
          "description": "Name of the trigger to be executed.",
          "maxLength": 50
        }
      },
      "duplicate_check_fields": {
        "type": "array",
        "description": "Defines the ordered list of fields used to detect duplicate records during upsert.",
        "maxItems": 10,
        "items": {
          "type": "string",
          "description": "API name of the field used for duplicate record verification.",
          "maxLength": 100
        }
      },
      "wf_trigger": {
        "type": [
          "string",
          "null"
        ],
        "description": "Workflow trigger identifier to be executed as part of the upsert operation."
      },
      "lar_id": {
        "type": [
          "string",
          "null"
        ],
        "description": "Layout assignment rule identifier used to determine record layout during upsert."
      }
    },
    "required": [
      "module",
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Standard success response schema for single or bulk record operations. |
| `result.data.data` | `array` | Yes | — | List of successfully processed records with detailed metadata. Maximum items: 100. |
| `result.data.data[].code` | `"SUCCESS"` | Yes | — | Machine-readable code indicating a successful operation. Allowed: `SUCCESS`. |
| `result.data.data[].message` | `string` | Yes | — | Human-readable success message describing the operation outcome. Maximum length: 1024. |
| `result.data.data[].status` | `"success"` | Yes | — | Overall execution status of the operation. Allowed: `success`. |
| `result.data.data[].details` | `object` | Yes | — | Detailed metadata about the processed record. |
| `result.data.data[].details.id` | `string` | Yes | — | Unique identifier of the record. Format: `int64`. |
| `result.data.data[].details.Modified_Time` | `string` | Yes | — | Timestamp indicating when the record was last modified. Format: `date-time`. |
| `result.data.data[].details.Created_Time` | `string` | Yes | — | Timestamp indicating when the record was created. Format: `date-time`. |
| `result.data.data[].details.Created_By` | `object` | Yes | — | User who originally created the record. |
| `result.data.data[].details.Created_By.name` | `string` | Yes | — | Display name of the creating user. Maximum length: 100. |
| `result.data.data[].details.Created_By.id` | `string` | Yes | — | Unique identifier of the creating user. Format: `int64`. |
| `result.data.data[].details.Modified_By` | `object` | Yes | — | User who last modified the record. |
| `result.data.data[].details.Modified_By.name` | `string` | Yes | — | Display name of the modifying user. Maximum length: 100. |
| `result.data.data[].details.Modified_By.id` | `string` | Yes | — | Unique identifier of the modifying user. Format: `int64`. |
| `result.data.data[].details.$approval_state` | `string` | Yes | — | Approval state of the record in the approval workflow. Maximum length: 1024. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Standard success response schema for single or bulk record operations.",
        "properties": {
          "data": {
            "type": "array",
            "description": "List of successfully processed records with detailed metadata.",
            "maxItems": 100,
            "items": {
              "type": "object",
              "description": "Success object representing a single successfully processed record.",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "Machine-readable code indicating a successful operation.",
                  "enum": [
                    "SUCCESS"
                  ]
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable success message describing the operation outcome.",
                  "maxLength": 1024
                },
                "status": {
                  "type": "string",
                  "description": "Overall execution status of the operation.",
                  "enum": [
                    "success"
                  ]
                },
                "details": {
                  "type": "object",
                  "description": "Detailed metadata about the processed record.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique identifier of the record.",
                      "format": "int64"
                    },
                    "Modified_Time": {
                      "type": "string",
                      "description": "Timestamp indicating when the record was last modified.",
                      "format": "date-time"
                    },
                    "Created_Time": {
                      "type": "string",
                      "description": "Timestamp indicating when the record was created.",
                      "format": "date-time"
                    },
                    "Created_By": {
                      "type": "object",
                      "description": "User who originally created the record.",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Display name of the creating user.",
                          "maxLength": 100
                        },
                        "id": {
                          "type": "string",
                          "description": "Unique identifier of the creating user.",
                          "format": "int64"
                        }
                      },
                      "required": [
                        "name",
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "Modified_By": {
                      "type": "object",
                      "description": "User who last modified the record.",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Display name of the modifying user.",
                          "maxLength": 100
                        },
                        "id": {
                          "type": "string",
                          "description": "Unique identifier of the modifying user.",
                          "format": "int64"
                        }
                      },
                      "required": [
                        "name",
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "$approval_state": {
                      "type": "string",
                      "description": "Approval state of the record in the approval workflow.",
                      "maxLength": 1024
                    }
                  },
                  "required": [
                    "id",
                    "Modified_Time",
                    "Created_Time",
                    "Created_By",
                    "Modified_By",
                    "$approval_state"
                  ],
                  "additionalProperties": true
                }
              },
              "required": [
                "code",
                "message",
                "status",
                "details"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "data"
        ],
        "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](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.