Update a Field Update Action

Purpose

To update an existing field update action in your Zoho CRM account.

Endpoints

  • PUT /settings/automation/field_updates/{field_update_ID}

Request Details

Request URL

{api-domain}/crm/{version}/settings/automation/field_updates/{field_update_ID}

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Supported modules

Leads, Accounts, Contacts, Deals, Campaigns, Tasks, Cases, Events, Solutions, Products, Vendors, Price Books, Quotes, Sales Orders, Purchase Orders, Invoices, Appointments, and Custom.

Scope

ZohoCRM.settings.fields.UPDATE

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/settings/automation/field_updates/5725767000006953001"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d "@fieldUpdate.json"
-X PUT

Input JSON

  • field_updatesJSON array, mandatory

    Contains the data to update an existing field update action.

    • moduleJSON object, mandatory

      Specify the module where the field update should be applied. Use the Get Modules Metadata API to retrieve module API names and unique fields. 

    • typestring, mandatory

      Specify the type of field update.

      Possible values :

      static : A fixed value is set.

    • feature_typestring, optional

      Specify the automation feature in which you want to use the field update.

      Possible values : workflow

    • fieldJSON object, mandatory

      Specify the API name and the unique ID of the field to be updated. Use the Get Fields Metadata API to get valid field data. Please note that the "id" of the field is mandatory.

    • namestring, mandatory

      Specify the name of the field update action.

    • valuestring, mandatory

      Specify the value to set in the specified field.

      Note

      • For single-value fields, use a string for "value".
      • For multi-select and multi-user fields types, use an array for "value". For example,  (["Call", "Advertisement"]). 
    • update_typestring, mandatory for multi-select and multi-user fields 

      Specify how to update the field. This key is supported only for the multi-select fields. 
      Possible values:

      • overwrite : Replace existing values with the new ones.
      • append : Add new values to the existing ones.
    • dependent_fieldsJSON object

      Specify the dependent fields that are affected when the target field is updated. This is primarily used in picklist dependencies, where the value of one field controls the valid options in another field.
      Example : If you update the Country field to India, the dependent field State will automatically be restricted to Indian states only.

       

Note

A maximum of one field update can be updated per API call.

Sample input

Copied{
    "field_updates": [
        {
            "module": {
                "api_name": "Leads",
                "id": "5725767000000002175"
            },
            "type": "static",
            "feature_type": "workflow",
            "field": {
                "api_name": "Company",
                "id": "5725767000000002591"
            },
            "name": "info tech", // updating the "name" key's value
            "value": "info" // updating the "value" key's value
        }
    ]
}

Sample input to update a field update using a multi-select picklist field

Copied{
    "field_updates": [
        {
            "module": {
                "api_name": "Leads",
                "id": "5725767000000002175"
            },
            "field": {
                "id": "5725767000007121008",
                "api_name": "Languages_Known"
            },
            "type": "static",
            "name": "ZOHOLICS",
            "value": [
                Japanese"
            ],
            "update_type": "overwrite"
        }
    ]
}

Possible Errors

  • INVALID_DATAHTTP 400

    The ID given seems to be invalid
    Resolution: Specify a valid field update ID to do the update action. Use the Get Field Update API to retrieve the correct field update IDs.

  • INVALID_REQUEST_METHODHTTP 400

    The http request method type is not a valid one
    Resolution: You have specified an invalid HTTP method to access the API URL.
    Specify a valid request method. Refer to Endpoints section.

  • AMBIGUITY_DURING_PROCESSINGHTTP 400

    Ambiguity during the field update action
    Resolution: Given API name and unique ID of the field or module seems to be mismatch. Specify valid values. Use the Get Field Update API to get the field update IDs.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    Unauthorized
    Resolution: The client does not have a valid scope to update the field update. Create a new token with valid scope. Refer to Scope section for details.

  • AUTHENTICATION_FAILUREHTTP 401

    Authentication failed
    Resolution: Pass the access token in the request header of the API call.

  • INVALID_URL_PATTERNHTTP 404

    Please check if the URL trying to access is a correct one
    Resolution: The request URL specified is incorrect. Specify a valid request URL. Refer to Request URL section for details.

  • INTERNAL_ERRORHTTP 500

    Internal Server Error
    Resolution: Unexpected and unhandled exception in the server. Contact support team.

Sample Response

Copied{
    "field_updates": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "5725767000006953001"
            },
            "message": "fieldupdate updated successfully",
            "status": "success"
        }
    ]
}