record_refund
Record a refund of a sale
Records a refund against one recorded sale (sale ids are in get_lead).
The refund is always in the sale's own currency and basis, must be more than zero and at most what is left of the sale after earlier refunds; the error states what is left. Booked revenue is reduced by the amount. Use only an amount the person stated: never estimate. Pass external_id (the credit note number) or request_key so a retry does not record the refund twice. This records bookkeeping facts only: no money is moved, no payment provider is contacted and nothing is sent to the customer. It does not change the lead's status; if the whole deal fell through, say so and let the person decide whether the status should be corrected with update_lead_status.
Arguments
| Name | Type | Needed | What it is |
|---|---|---|---|
sale_id |
string | yes | The id of the sale being refunded, from get_lead. |
amount_minor |
integer | yes | The refunded amount in minor units, in the sale's currency. |
occurred_at |
string | no | When the refund happened (ISO 8601). Default now. Not in the future. |
external_id |
string | no | Credit note or refund number. The same number is never recorded twice. |
note |
string | no | A short note without personal details. |
request_key |
string | no | Any unique string for this request. The same key returns the first result instead of a second refund. |
Like every workspace tool it also takes workspace: a workspace id or slug. Leave it out to use the workspace the person last worked in.
How it behaves
- It changes something in the workspace, within what the signed-in person's role allows.
- It is not in the first list an assistant sees; the assistant finds it with search_tools and runs it with execute_tools.
How tools behave: confirmation, review links, errors and limits
In the same group
create_lead · create_status_link · get_crm_status · get_lead · import_leads · list_leads · manage_opportunities · record_sale · revoke_status_link · update_lead · update_lead_status