Zoho: Create Blueprint States
Zoho blueprintStateConfig.createBlueprintStates: arguments, response, policy and SDK examples.
← Blueprint state config operations · Get started
Operation zoho.createblueprintstates
Provider route: POST /crm/v8/settings/blueprints/{blueprintId}/states. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/zoho with npm, or alter-sdk-zoho with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { ZohoIntegration } from "@alter-ai/zoho";
async function execute(input: Parameters<ZohoIntegration["blueprintStateConfig"]["createBlueprintStates"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new ZohoIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.blueprintStateConfig.createBlueprintStates(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_zoho import ZohoIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = ZohoIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.blueprint_state_config.create_blueprint_states(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.blueprintId | string | Required within parent | Format: int64 Maximum length: 19 Minimum length: 1 Pattern: ^[0-9]+ |
headers | object | Required within parent | Additional keys: not allowed |
headers.X-ZOHO-SERVICE | string | Required within parent | One of: automation |
body | Model | Optional | Expand Create Blueprint States — request body — body |
Referenced models: Create Blueprint States — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | Model | Alternative | Expand Create Blueprint States — response body — states — Blueprint State Create Response |
$ (anyOf 2) | Model | Alternative | Expand Create Blueprint States — response body — states — Blueprint State Create Multi Status Response |
Referenced models: Create Blueprint States — response body — states — Blueprint State Create Multi Status Response, Create Blueprint States — response body — states — Blueprint State Create Response
Schemas
Section titled “Schemas”15 more schemas are linked from the tables above, on the schema pages.
Create Blueprint States — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The batch request payload for creating multiple Blueprint states, containing a **states** array with the state definitions to be created. Additional keys: not allowed |
states | array | Required within parent | The list of Blueprint state objects to be included in the batch create request. Maximum items: 300 Minimum items: 1 |
states[] | Model | Each item | Expand Create Blueprint States — request body — body states item |
Referenced models: Create Blueprint States — request body — body states item
Create Blueprint States — response body — states — Blueprint State Create Multi Status Response
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A multi-status response for Blueprint state creation requests, where each entry in the **states** array independently indicates success or failure for a corresponding state in the request. Additional keys: not allowed |
states | array | Optional | The list of per-state creation results, containing both successful entries and error entries for each state processed in the request. Maximum items: 25 |
states[] | JSON | Each item | |
states[] (anyOf 1) | Model | Alternative | Expand Delete a Blueprint state — response body — states item |
states[] (anyOf 2) | Model | Alternative | Expand Create Blueprint States — response body — states / states / item / code: DUPLICATE DATA, status: error |
states[] (anyOf 3) | Model | Alternative | Expand Create Blueprint States — response body — states / states / item / code: INVALID DATA, message: the id given seems to be invalid, status: error |
states[] (anyOf 4) | Model | Alternative | Expand Create Blueprint States — response body — states / states / item / code: INVALID DATA, status: error |
states (allOf 1) | JSON | All variants apply | Ensures at least one successful state creation result is present. |
states (allOf 2) | JSON | All variants apply | Ensures at least one error result is present. |
Referenced models: Create Blueprint States — response body — states / states / item / code: INVALID DATA, status: error, Create Blueprint States — response body — states / states / item / code: DUPLICATE DATA, status: error, Create Blueprint States — response body — states / states / item / code: INVALID DATA, message: the id given seems to be invalid, status: error, Delete a Blueprint state — response body — states item
Create Blueprint States — response body — states — Blueprint State Create Response
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The response returned after creating one or more Blueprint states, containing the result details for each state in the **states** array. Additional keys: not allowed |
states | array | Optional | The list of Blueprint states returned in the create response. Maximum items: 50 |
states[] | Model | Each item | Expand Delete a Blueprint state — response body — states item |
Referenced models: Delete a Blueprint state — response body — states item
Create Blueprint States — request body — body states item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A single Blueprint state entry to be created, including the associated process, **module**, picklist value, and escalation settings. Additional keys: not allowed |
module | Model | Required within parent | Expand Create Blueprint States — request body — body states item module Module for which the blueprint state is configured (Required) |
pick_list_value | Model | Required within parent | Expand Create Blueprint States — request body — body states item pick list value Picklist option value for which the state is configured (Required) |
process_id | string or null | Optional | The ID of the Blueprint for which the state is to be created. Maximum length: 25 Pattern: [0-9]+ |
state_escalation | Model | Optional | Expand Create Blueprint States — request body — body states item state escalation Contains details of the state escalation alerts to be configured for the particular state |
Referenced models: Create Blueprint States — request body — body states item module, Create Blueprint States — request body — body states item state escalation, Create Blueprint States — request body — body states item pick list value
Create Blueprint States — response body — states / states / item / code: INVALID DATA, status: error
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The error response returned when invalid data is provided in a request. Contains the error **code**, **status**, **message**, and validation **details**. Additional keys: not allowed |
code | string | Required within parent | The error code returned when the request contains invalid data. Possible values: **INVALID_DATA** - The request was rejected because one or more submitted values are invalid. Known values: INVALID_DATA |
details | Model | Required within parent | Expand Create Blueprint States — response body — states / states / item / code: INVALID DATA, status: error details |
message | string | Required within parent | The error message describing the invalid value encountered. Possible values: the id given seems to be invalid - The provided ID does not match a valid record. the value given is invalid - The supplied field value is not accepted. invalid data - The request contains data that failed validation. Invalid data - The request contains data that failed validation. Known values: the id given seems to be invalid, the value given is invalid, invalid data, Invalid data |
status | string | Required within parent | Represents the status of the response. Possible values: **error** - Indicates the request resulted in an error. Known values: error |
Referenced models: Create Blueprint States — response body — states / states / item / code: INVALID DATA, status: error details
Create Blueprint States — response body — states / states / item / code: DUPLICATE DATA, status: error
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Error returned when the provided picklist value is already present. Additional keys: not allowed |
code | string | Required within parent | Error code Known values: DUPLICATE_DATA |
details | Model | Required within parent | Expand Create Blueprint States — response body — states / states / item / code: DUPLICATE DATA, status: error details |
message | string | Required within parent | The error message returned when a duplicate picklist value is detected in the Blueprint. Possible values: There is already a state with the same pick list value used in the blueprint - Indicates that another state in the Blueprint already uses the same picklist value. Known values: There is already a state with the same pick list value used in the blueprint |
status | string | Required within parent | The status of the error response. Possible values: **error** - Indicates the request resulted in an error. Known values: error |
Referenced models: Create Blueprint States — response body — states / states / item / code: DUPLICATE DATA, status: error details
Create Blueprint States — response body — states / states / item / code: INVALID DATA, message: the id given seems to be invalid, status: error
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the error response returned when one or more of the provided state IDs are invalid. Additional keys: not allowed |
code | string | Required within parent | Error code Known values: INVALID_DATA |
details | object | Required within parent | Represents the details of the validation error, containing an object with the affected record **id**. Additional keys: not allowed |
details.id | string | Required within parent | Represents the ID of the invalid state that caused the error. Maximum length: 255 |
message | string | Required within parent | Represents the error message returned when an invalid state ID is provided. Possible values: the id given seems to be invalid - The supplied state ID does not correspond to a valid state in Zoho CRM. Known values: the id given seems to be invalid |
status | string | Required within parent | Represents the status of the response. Possible values: **error** - Indicates the request resulted in an error. Known values: error |
Delete a Blueprint state — response body — states item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The result of a state operation, including status, code, message, and per-item details. Additional keys: not allowed |
code | string | Optional | The result code for the operation. Possible values: **SUCCESS** - The operation completed successfully. Known values: SUCCESS Maximum length: 255 |
details | Model | Optional | Expand Delete a Blueprint state — response body — states item details |
message | string | Optional | The message returned for the state operation result. Maximum length: 255 |
status | string | Optional | The outcome status of the state operation for the corresponding item. Maximum length: 255 |
Referenced models: Delete a Blueprint state — response body — states item details
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.createblueprintstates. Catalog operation: createBlueprintStates. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.