Create Blueprint Transitions

Purpose

To create one or more transitions for an existing Blueprint in your Zoho CRM organization.

Endpoints

  • POST /settings/blueprints/transitions

Request Details

Request URL

{api-domain}/crm/{version}/settings/blueprints/transitions

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

ZohoCRM.settings.transitions.ALL
(or)
ZohoCRM.settings.transitions.CREATE

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/settings/blueprints/transitions"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d @createblueprint.json
-X POST

Input JSON

The transitions JSON array is the root element within which all Blueprint transitions to be created must be specified. In a request up to 50 Blueprint transitions can be created. The transitions JSON array must include the following keys:

  • namestring, mandatory

    Specify the name of the transition to be created. Transition names inside a specific Blueprint have to be unique.

  • descriptionstring, optional 

    Specify the description of the transition to be created.

  • trigger_typestring, mandatory

    Specify the trigger type of the transition to be created - manual or automatic.
    Possible values:  automatic, manual

  • transition_typestring, mandatory

    Specify the type of the transition to be created like "standalone_transition", "parallel_transition", "child_transition".
    Possible values:  standalone_transition, parallel_transition, child_transition

  • color_codestring, optional 

    Specify the color code of the transition button to be created - Example #F27E22.

  • module JSON object, mandatory

    Specify the module of the transition to be created.

    • api_namestring, mandatory

      Specify the API name of the module for which the transition is created in a Blueprint.

    • idstring, mandatory 

      Specify the ID of the module for which the transition is created.

  • during_inputsJSON array, optional 

    Specify the different types of during fields of the transition to be created.

    • typestring, optional 

      Specify the type of the during field configured of the transition to be created.

    • optionalstring, optional 

      Specify whether the during field is mandatory or optional of the transition to be created.

    • sequenceinteger, optional 

      Specify the order of the during fields of the transition to be created.

    • field JSON object, optional 

      Specify the field data of the field associated in during field.

      • api_namestring, optional 

        Specify the field API name of the field associated in during field.

      • idstring, optional 

        Specify the field ID data of the field associated in during field.

    • messagestring, optional 

      Specify the info message to be showing in the during input.

    • validation_filter JSON object, optional 

      Specify the validation criteria detail for the during field.

      • validation_messagestring, optional 

Sample Input

Copied{
    "transitions": [
        {
               "layout": {
                "api_name": "Standard__s",
                "name": "Standard",
                "id": "4794410000000095055"
            },
            "criteria": {
                "group_operator": "AND",
                "group": [
                    {
                        "comparator": "equal",
                        "field": {
                            "api_name": "Annual_Revenue",
                            "id": "4794410000000000581"
                        },
                        "type": "value",
                        "value": "20000"
                    },
                    {
                        "comparator": "not_equal",
                        "field": {
                            "api_name": "City",
                            "id": "4794410000000000605"
                        },
                        "type": "value",
                        "value": "Chennai"
                    }
                ]
            },
            "trigger_type": "manual",
            "module": {
                "api_name": "Leads",
                "id": "4794410000000000125"
            },
            "description": "Test Transition Description",
            "owners": [
                {
                    "resources": null,
                    "type": "record_owner"
                },
                {
                    "resources": [
                        {
                            "name": "Patricia Boyle",
                            "id": "4794410000000642001"
                        }
                    ],
                    "type": "users"
                },
                {
                    "resources": [
                        {
                            "name": "ClientPortal",
                            "id": "4794410000000743021"
                        }
                    ],
                    "type": "portal_user_type"
                }
            ],
            "during_inputs": [
                {
                    "sequence": 1,
                    "optional": true,
                    "id": "4794410000001101985",
                    "type": "info",
                    "message": "New message added<br /><br />"
                },
                {
                    "sequence": 2,
                    "optional": true,
                    "id": "4794410000001101987",
                    "type": "checklist",
                    "title": "1",
                    "items": [
                        {
                            "sequence": 1,
                            "name": "12",
                            "optional": false
                        },
                        {
                            "sequence": 2,
                            "name": "1223",
                            "optional": true
                        }
                    ]
                },
                {
                    "validation_filter": {
                        "validation_message": "Annual revenue should be greater than 1000",
                        "criteria": {
                            "comparator": "less_than",
                            "field": {
                                "api_name": "Annual_Revenue",
                                "id": "4794410000000000581"
                            },
                            "type": "value",
                            "value": "1000"
                        }
                    },
                    "sequence": 3,
                    "field": {
                        "api_name": "Annual_Revenue",
                        "id": "4794410000000000581"
                    },
                    "optional": false,
                    "id": "4794410000001101989",
                    "type": "field"
                }
            ],
            "api_name": "2",
            "parallel_transition": null,
            "name": "Test Transition",
            "transition_type": "standalone_transition",
            "actions": [
                {
                    "name": "reminder",
                    "id": "4794410000001101962",
                    "type": "tasks"
                },
                {
                    "name": "11",
                    "id": "4794410000001101953",
                    "type": "email_notifications"
                }
            ],
            "color_code": "#F27E22"
        }
    ]
}

Possible Errors

  • MANDATORY_NOT_FOUNDHTTP 400

    required field not found

    Possible Cases:

    • $.transitionsmodule
    • $.transitions[0].namename
    • $.transitions[0].typetype
    • $.transitions[0].ownersowners

    Resolution:

    Ensure all mandatory fields are included in the request payload.

  • INVALID_DATAHTTP 400

    invalid data

    Possible Cases:

    • $.transitions[0].module → invalid module API name
    • $.transitions[0].module.id → invalid module ID
    • $.transitions[0].during_inputs[0].type → invalid during input type
    • $.transitions[0].during_inputs[0].id → invalid during input field ID
    • $.transitions[0].during_inputs[0].related_list.id → invalid related list ID
    • $.transitions[0].owners[0].resources[0].id → invalid owner ID
    • $.transitions[0].actions[0].id → invalid action ID
    • $.transitions[0].actions[0].type → unsupported action type
    • $.transitions[0].type → invalid transition type

    Supported values for transition type:

    • standalone_transition
    • common_transition
    • parallel_transition
    • child_transition
    • automatic_transition

    Resolution:

    Provide valid IDs, API names, and supported enum values.

  • AMBIGUITY_DURING_PROCESSINGHTTP 400

    Provide proper data

    Possible Cases:

    • Ambiguity between multiple action types in:
      • $.transitions[0].actions[1].type
      • $.transitions[0].actions[0].type

    Resolution:

    Provide clear and non-conflicting action type data.

  • DEPENDENT_MISMATCHHTTP 400

    You can provide up to 10 checklist items

    Possible Cases:

    • $.transitions[0].during_inputs[0].items exceeds maximum of 10 when $.transitions[0].during_inputs[0].type is checklist

    Resolution:

    Ensure dependent field values satisfy the constraints associated with their corresponding type.

  • INVALID_DATAHTTP 400

    You can provide up to 30 characters. / You can provide up to 140 checklists option character limit

    Possible Cases:

    • $.transitions[0].during_inputs[0].title exceeds maximum length of 30 characters
    • $.transitions[0].during_inputs[0].items[0].name exceeds maximum length of 140 characters

    Resolution:

    Reduce the input length to stay within the allowed character limits.

Sample Response

Copied{
    "blueprints": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "4794410000001096657"
            },
            "message": "blueprints exported successfully",
            "status": "success"
        }
    ]
}