Update Blueprint Details

Purpose

To update a single transition at a time. An error is thrown if the record is not in transition, transition_id is wrong, field_value data type mismatches, or field validation fails.

Request Details

Request URL

{api-domain}/crm/{version}/{module_api_name}/{record_id}/actions/blueprint

Supported modules

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

Header

Authorization: Zoho-oauthtoken 100xx.92d4xxxxxxxxxxxxx15f52

Scope

scope=ZohoCRM.modules.ALL
(or)
scope=ZohoCRM.modules.{module_name}.{operation_type}

Possible module names

leads, accounts, contacts, deals, campaigns, tasks, cases, events, calls, solutions, products, vendors, pricebooks, quotes, salesorders, purchaseorders, invoices, custom, notes, and activities

Possible operation types

ALL - Full access to records
WRITE - Edit records in the module
UPDATE - Update records in the module

Sample Request

Copiedcurl "https://www.zylkercorp.zohoplatform.com/crm/v3/Leads/3652397000003931001/actions/blueprint"
-H "Authorization: Zoho-oauthtoken 100xx.d92d4xxxxxxxxxxxxx15f52"
-d "@blueprint1.json"
-X PUT
CopieddataMap = Map();
dataMap.put("Notes", "Updated via blueprint");
blueprint1 = Map();
blueprint1.put("transition_id", "692969000000981130");
blueprint1.put("data", dataMap);
blueprintList = List();
blueprintList.add(blueprint1);
param = Map();
param.put("blueprint", blueprintList);
	response = invokeurl
[
	url: "https://www.zylkercorp.zohoplatform.com/crm/v3/Leads/692969000000983046/actions/blueprint"
	type: PUT
	parameters: param.toString()
	connection:"crm_oauth_connection"
];
info response;

In the request, "@blueprint1.json" contains the sample input data.

Note
  • In the Related List sample, the key "Tasks" is the name of the list related to the record used in the transition.

  • The related list support for this API depends on the module of the record, which is used in the transition of the blueprint.

  • In case the number of fields in the input does not meet the required number, the "message" in the response would be "transition saved partially".

  • In a parallel transition, a transition can have multiple the parent transition gets completed automatically only when all its child transitions are completed. We will introduce this feature in the upcoming versions. 

  • You can update only to the next state of Blueprint using Update Blueprint API and not to any of the previous states of the Blueprint.

Sample Input

CopiedSample Input: To upload attachments, notes, input data to multi-select user lookup, multi-select lookup, and widget to the blueprint
{
    "blueprint": [
        {
            "transition_id": "3652397000003921127",
            "data": {
                "Attachments": [
                    {
                        "$file_id": [
                            "59cf260313b6907ffc56957f4241bd94ba3e0b6aad53b50f8b38583a859d623a",
                            "59cf260313b6907ffc56957f4241bd94ba3e0b6aad53b50f8b38583a859d624d"
                        ]
                    },
                    {
                        "$link_url": "www.zoho.com"
                    }
                ],
                "Phone": 8940372937,
                "Notes": "Updated via blueprint",
                "Listings": [
                    {
                        "Interested_Listings": {
                            "id": "3652397000001978005"
                        }
                    },
                    {
                        "Interested_Listings": {
                            "id": "3652397000001978016"
                        }
                    }
                ],
                "Multi_user": [
                    {
                        "Multi_user": {
                            "name": "Shylaja Sridhar",
                            "id": "3652397000000186017"
                        }
                    },
                    {
                        "Multi_user": {
                            "id": "3652397000000281001"
                        }
                    }
                ],
                "widget": {
                    "name": "widget",
                    "id": "3652397000003937009"
                }
            },
            "process_info": {
                "escalation": {
                    "days": 1,
                    "status": "overdue"
                }
            },
            "transitions": [
                {
                    "type": "manual",
                    "next_transitions": [
                        {
                            "name": "Call Later",
                            
                            "id": "3652397000003921103",
                            "type": "manual"
                        },
                        {
                            "name": "Product Brief",
                            
                            "id": "3652397000003921135",
                            "type": "manual"
                        }
                    ]
                }
            ]
        }
    ]
}

Sample Input: To handle parent module fields during transition
{
    "blueprint": [
       {
            "transition_id": "2000000031536",
            "data": {
                "Lookup_2": {
                    "phone": "123458939",
                    "id": "2000000048165"
                }
            }
        }
    ]
}

Sample Input: To update checklist information
{
    "blueprint": [
       {
            "transition_id": "1000000034304",
            "data": {
                "CheckLists": [
                   {
                        "list 1": true
                    },
                   {
                        "list 2": false
                    },
                   {
                        "list 3": true
                    },
                   {
                        "list 4": true
                    }
                ]
            }
        }
    ]
}

Sample Input: To update related list information
{
    "blueprint": [
       {
            "transition_id": "2000000031536",
            "data": {
                "Tasks": {
                    "Subject": "Event"
                }
            }
        }
    ]
}

Possible Errors

  • INVALID_MODULEHTTP 400

    The module name given seems to be invalid
    Resolution: You have specified an invalid module name or there is no tab permission, or the module could have been removed from the available modules. Specify a valid module API name.

  • INVALID_MODULEHTTP 400

    The given module is not supported in API
    Resolution: The modules such as Documents and Projects are not supported in the current API. (This error will not be shown, once these modules are been supported). Specify a valid module API name.

  • 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 above.

  • AUTHORIZATION_FAILEDHTTP 400

    User does not have sufficient privilege to update records
    Resolution: The user does not have the permission to update blueprint data. Contact your system administrator.

  • INVALID_DATAHTTP 400

    the id given seems to be invalid
    Resolution: You have specified an incorrect record ID. Please specify a valid record ID. Refer to Get Records API to get valid record IDs.

  • MANDATORY_NOT_FOUNDHTTP 400

    mandatory param missing
    Resolution: You have not specified one or more mandatory fields in the input. Refer to Fields Metadata API to know the mandatory fields.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    Unauthorized
    Resolution: Client does not have ZohoCRM.modules.{module_name}.UPDATE scope. Create a new client with valid scope. Refer to scope section above.

  • NO_PERMISSIONHTTP 403

    Permission denied to update records
    Resolution: The user does not have permission to update blueprint data. Contact your system administrator.

  • 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 above.

  • INTERNAL_ERRORHTTP 500

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

Sample Response

Copied{
    "code": "SUCCESS",
    "details": {},
    "message": "transition updated successfully",
    "status": "success"
}