Create Opportunity
create_opportunityCreate a CRM pipeline deal on an account or contact with stage, value, close date, custom fields, and an idempotency key to prevent duplicates on retries or imports.
Instructions
Create a deal (an opportunity in the pipeline) on an account or a contact.
A deal has no natural dedupe key: two deals on one account with the same title are
often both real (a renewal each year, a second pilot), so this never matches an
existing deal by title or account. Check first with
list_opportunities(organization_id=..., query=...), and create only when nothing
there is the deal you mean; to change one that exists, use update_opportunity or
move_opportunity. Pass idempotency_key when a retry or an import must not
create a duplicate: a repeat with the same key returns the deal the first call
created. Without that key every call creates a new deal.
Give an organization_id (the account), a primary_contact_id, or both; with
only a contact, the account is taken from that contact's organization.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"title": "<title>"
},
"name": "create_opportunity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stage | No | A stage key from this workspace's pipeline (get_pipeline); defaults to the first open stage. A key the pipeline does not hold is refused, naming the ones it does. | |
| title | Yes | What the deal is (required), e.g. "Acme 2027 renewal". | |
| value | No | The deal's size, in its currency. | |
| fields | No | Custom field values by key; list_fields(entity="opportunity") lists them. A repeat with the same idempotency_key keeps the values the deal holds. | |
| source | No | Where the deal came from (open text, e.g. "manual", "import"). | |
| currency | No | An ISO 4217 code, e.g. "USD". | |
| fields_by | No | Who is setting the fields, when the values do not say. | |
| close_date | No | The target close date (ISO-8601 date). | |
| probability | No | The deal's own win probability, 0-100; omit to take the stage's default. | |
| idempotency_key | No | A token of your choosing that makes a retry or an import converge: a repeat with the same key returns the deal the first call created. | |
| organization_id | No | The account the deal is with. | |
| primary_contact_id | No | The deal's main contact. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||