createContract
createContractCreate a new contract in Zenskar with customer details, pricing phases, products, and billing configuration.
Instructions
Create a new contract in Zenskar. Use this after extracting contract data via extractContractFromRaw and creating a customer via createCustomer. The contract includes customer details, pricing phases, products, and billing configuration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Contract name (required). | |
| description | No | Contract description (optional). | |
| status | No | Contract status (required, typically 'draft' for new contracts). | draft |
| currency | No | Currency code for the contract (e.g., 'USD', 'EUR'). | USD |
| start_date | Yes | Contract start date in ISO 8601 format (e.g., '2025-01-01T00:00:00.000000'). | |
| end_date | No | Contract end date in ISO 8601 format (e.g., '2025-12-31T23:59:59.999999'). Optional — omit for open-ended contracts. | |
| anchor_date | No | Anchor date for billing cycles in ISO 8601 format (defaults to start_date). | |
| customer_id | Yes | The ID of the customer for this contract (required, UUID format). | |
| renewal_policy | No | Contract renewal policy. Currently only 'do_not_renew' is supported at runtime. | do_not_renew |
| bill_parent_customer | No | Whether to bill the parent customer (defaults to false). | |
| phases | No | Array of contract phases with pricing details. Each phase includes name, start_date, end_date, phase_type, and pricings array. Defaults to empty array if omitted. | |
| source | No | Source information for the contract (e.g., {source_type: 'ai', source_id: 'uuid'}). | |
| custom_attributes | No | Custom attributes for the contract as key-value pairs. | |
| __userContext | No | Internal user context for multi-tenant authentication and approval workflow |