Skip to content

Zoho: Convert Inventory Record

Zoho inventoryConvert.convertInventory: arguments, response, policy and SDK examples.

← Inventory convert operations · Get started

Operation zoho.convertinventory

Provider route: POST /crm/v8/{moduleApiName}/{id}/actions/convert. Alter supplies the connection’s credentials and routing.

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["inventoryConvert"]["convertInventory"]>[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.inventoryConvert.convertInventory(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from 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.inventory_convert.convert_inventory(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.moduleApiNamestringRequired within parentOne of: Quotes, Sales_Orders
path.idstringRequired within parentMaximum length: 255
bodyobjectRequired within parentRepresents the request payload for the inventory record conversion.
Additional keys: not allowed
body.dataarrayOptionalSpecify the inventory record conversion details.
Maximum items: 1
body.data[]objectEach itemSpecify the details for the inventory record to convert.
Additional keys: not allowed
body.data[].convert_toarrayRequired within parentSpecify the target module details for the conversion.
Maximum items: 1
body.data[].convert_to[]objectEach itemSpecify the target module name and ID for the converted record.
Additional keys: not allowed
body.data[].convert_to[].carry_over_tagsbooleanOptionalSpecifies whether the tags from the source record are carried over to the converted target record. Must be set to true or omitted; setting this to false returns a NOT_ALLOWED error.
body.data[].convert_to[].moduleobjectRequired within parentSpecify the target inventory module to which the record is to be converted.
Additional keys: not allowed
body.data[].convert_to[].module.api_namestringRequired within parentSpecify the API name of the target inventory module. Possible values: Invoices, Sales_Orders. Use the [Get Modules API](modules.yaml#$.paths./settings/modules.get) to retrieve module IDs and API names.
Maximum length: 50
body.data[].convert_to[].module.idstringRequired within parentUnique ID of the target module. Use the [Get Modules API](modules.yaml#$.paths./settings/modules.get) to retrieve module ID.
Format: int64
Maximum length: 255

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$objectRootRepresents the successful response returned when the inventory record is converted.
Additional keys: not allowed
dataarrayOptionalRepresents the list of conversion results returned by the operation.
Maximum items: 1
data[]objectEach itemRepresents the conversion result for the inventory record.
Additional keys: not allowed
data[].codestringOptionalRepresents the result code of the conversion operation. Possible values: SUCCESS.
Known values: SUCCESS
data[].detailsobjectOptionalRepresents the details of the converted record, organized by the target module API name.
Additional keys: not allowed
data[].details.InvoicesobjectOptionalRepresents the details of the converted Invoice record.
Additional keys: not allowed
data[].details.Invoices.idstringOptionalRepresents the unique ID of the converted Invoice record.
Maximum length: 255
data[].details.Invoices.namestringOptionalRepresents the display name of the converted Invoice record.
Maximum length: 50
data[].details.Sales_OrdersobjectOptionalRepresents the details of the converted Sales Order record.
Additional keys: not allowed
data[].details.Sales_Orders.idstringOptionalRepresents the unique ID of the converted Sales Order record.
Maximum length: 255
data[].details.Sales_Orders.namestringOptionalRepresents the display name of the converted Sales Order record.
Maximum length: 50
data[].messagestringOptionalRepresents the message describing the result of the conversion operation.
Known values: The record has been converted successfully
data[].statusstringOptionalRepresents the status of the conversion operation. Possible values: success.
Known values: success

SDK function policy ID: zoho.convertinventory. Catalog operation: convertInventory. 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.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.