CRM
Move an opportunity to another stage
Moves the opportunity forward or backward within its pipeline.
crm:writeResult
generated from the schema
The target stage has to be of open type: for won or lost stages there is the close endpoint. version is the same optimistic lock as in the patch.
Arguments
Opportunity identifier.
Limits: min length 1
Target stage. It has to be an open stage.
Limits: min length 1
Idempotency key chosen by the client (a UUID is recommended). Repeating the same key with the same arguments within 24 h returns the stored response without executing again; with different arguments it responds 422. It is the safe way to retry after a network failure.
Limits: min length 1, max length 255
Optimistic locking: the meta.etag you got from the detail read of this resource (or "*"). If the resource changed since, the call fails with 412 precondition_failed before writing anything; read it again and retry. Omit it to write unconditionally.
Limits: min length 1
Result
On success the result carries structuredContent with data and meta. These are the attributes of data.
Show the attributes of data
Available options: open, won, lost
Available options: open, won, lost
Available options: inbound_email, website_form, referral, cold_outreach, event, social, existing_customer, partner, other
Limits: min 1
Show child attributesHide child attributes
An error is a result with isError: true and the problem in content[0].; there is no structuredContent. See Errors.
The same operation by REST
This tool runs PATCH /api/v1/crm/opportunities/{opportunityId}/stage.
Related pages
Link to this section: Related pagesCRM
Move an opportunity to another stage
Moves the opportunity forward or backward within its pipeline.
Guides
Safe writes
An assistant that can write can also write the wrong thing. Decide which tools need a person, retry without duplicating, and know what a write sets in motion.
Guides
Errors
A tool error is a result with
isError: trueand the problem in the first text block. Branch on itscode.
Was this page helpful?