Enroll Records In Cadences

Purpose

To manually enroll the records of a module in a Cadence.

Endpoints

  • POST /{module_API_name}/actions/enrol_in_cadences

Request Details

Request URL

{api-domain}/crm/{version}/{module_API_name}/actions/enrol_in_cadences

Supported Modules

Leads, Contacts, Deals, Vendors, and Custom modules.

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

ZohoCRM.modules.{operation_type}
(or)
ZohoCRM.modules.{module_name}.{operation_type}

Possible module names

leads, contacts, deals, vendors, and custom modules.

Possible operation types

ALL - Full access to cadence 
CREATE - Create cadence 

Note

This feature is supported for the Enterprise and above editions.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/Contacts/actions/enrol_in_cadences "
-X POST
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Input JSON

  • cadences_idsJSON array

    The unique IDs of the cadences in your org that you want to enroll records in to. Use the Get Cadences API to get the unique IDs. You can specify up to 5 cadence IDs in this array.

  • idsJSON array

    The unique IDs of the records that you want to enroll into cadences. Use the Get Records API to get the unique IDs of the records of a module. You can specify up to 100 record IDs in this array.

Sample Input

Copied{
    "cadences_ids": [
        "554023000004092008"
    ],
    "ids": [
        "554023000001798647",
        "554023000001625028"
    ]
}

Possible Errors

  • MANDATORY_NOT_FOUNDHTTP 400

    You have not specified "ids" in the input.
    Resolution: "ids" is a mandatory input key. 

  • INVALID_DATAHTTP 400

    You have not specified invalid record ID(s) or cadence ID(s) in the input. The "details" key gives the API name and JSON path of the invalid input.
    Resolution: Specify correct record IDs and cadence IDs. Refer to the Get Records API and Get Cadences API to get the record IDs and Cadence IDs, respectively.

  • NOT_ALLOWEDHTTP 400

    The cadence ID you specified is not of the type "Manual Enrollment". 
    Resolution: You can manually enroll records only in a cadence of the type "Manual Enrollment".

  • LIMIT_EXCEEDEDHTTP 400

    You have either given more than 5 cadence IDs or more than 100 record IDs or both in their respective arrays. Refer to the "limit_due_to" key for details.
    Resolution: You can enroll a maximum of 100 records per API call in a maximum of 5 cadences.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    You do not have the right scope to access this API.
    Resolution: Create a new token with the scopes mentioned in the Scope section and try this API.

  • NO_PERMISSIONHTTP 403

    You do not have permission to access this feature.
    Resolution: Contact your system administrator.

  • INTERNAL_SERVER_ERRORHTTP 500

    Unhandled and unexpected exception in server.
    Resolution: Contact support@zohocrm.com for assistance.

Sample Response

Copied{
    "data": [
        {
            "code": "SUCCESS",
            "details": {
                "cadences": [
                    {
                        "name": "CadenceTest1",
                        "id": "554023000004092008"
                    }
                ],
                "id": "554023000001798647"
            },
            "message": "records manually enrolled",
            "status": "success"
        },
        {
            "code": "SUCCESS",
            "details": {
                "cadences": [
                    {
                        "name": "CadenceTest1",
                        "id": "554023000004092008"
                    }
                ],
                "id": "554023000001625028"
            },
            "message": "records manually enrolled",
            "status": "success"
        }
    ]
}