Save a deal
crm_save_dealCreate a deal (no deal_id) or update one (with deal_id): pipeline and stage, amount, expected close date, next step, the company and contact it belongs to, tags and custom fields. A new deal starts at the first stage of its pipeline unless you give one. Costs $0.01 per call; nothing if it fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Tags to add, e.g. ["vip"]; a new tag is made on first use. crm_tag_records removes tags. | |
| stage | No | Stage name or id in that pipeline, e.g. "Proposal". A new deal without one starts at the first stage. crm_move_deal moves deals too. | |
| title | No | ||
| amount | No | ||
| deal_id | No | ||
| currency | No | ||
| pipeline | No | Pipeline name or id (crm_list_pipelines). Default: the deal's own, else the first pipeline. | |
| next_step | No | ||
| close_date | No | YYYY-MM-DD: when it is expected to close | |
| company_id | No | ||
| contact_id | No | ||
| description | No | ||
| lost_reason | No | ||
| company_name | No | ||
| contact_email | No | ||
| custom_fields | No | Custom fields as {"key": value}, merged into the existing ones; null clears one. Keys defined with crm_define_field are checked against their type. |