b24_bizproc_start
Start a business process workflow on a CRM document by providing the template and document IDs.
Instructions
Inicia un proceso de negocio (workflow) sobre un documento o registro CRM.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template_id | Yes | ID de la plantilla de proceso de negocio | |
| document_id | Yes | Array con 3 elementos identificando el documento: ["crm", "CCrmDocumentDeal", "DEAL_123"] para un deal con ID 123 | |
| parameters | No | Parámetros del proceso | |
| webhook_url | No |
Implementation Reference
- src/tools/feed-notifications.js:122-130 (handler)The handler function that executes the bizproc.workflow.start API call with template_id, document_id, and parameters.
export async function bizprocStart({ template_id, document_id, parameters = {}, webhook_url }) { const client = new Bitrix24Client(resolveWebhook(webhook_url)); const res = await client.call('bizproc.workflow.start', { TEMPLATE_ID: template_id, DOCUMENT_ID: document_id, PARAMETERS: parameters, }); return { portal: client.portal, workflow_id: res.result, success: true }; } - Zod schema defining the input parameters for bizprocStart: template_id, document_id (array of 3), parameters (record), and optional webhook_url.
export const bizprocStartSchema = z.object({ template_id: z.union([z.string(), z.number()]).describe('ID de la plantilla de proceso de negocio'), document_id: z.array(z.string()).describe( 'Array con 3 elementos identificando el documento: ' + '["crm", "CCrmDocumentDeal", "DEAL_123"] para un deal con ID 123' ), parameters: z.record(z.any()).optional().default({}).describe('Parámetros del proceso'), webhook_url: z.string().url().optional(), }); - index.js:253-255 (registration)Registration of the tool 'b24_bizproc_start' on the MCP server with its description, schema, and handler.
server.tool('b24_bizproc_start', 'Inicia un proceso de negocio (workflow) sobre un documento o registro CRM.', bizprocStartSchema.shape, wrap(bizprocStart)); - src/tools/feed-notifications.js:1-4 (helper)Imports: Bitrix24Client for API calls, resolveWebhook for webhook URL resolution.
import { z } from 'zod'; import { Bitrix24Client } from '../bitrix24/client.js'; import { fetchAllPages } from '../utils/pagination.js'; import { resolveWebhook } from '../utils/resolve-webhook.js';