Edit a bot function
dosai_update_functionChange one function of the bot: its name, the description the model reads to decide WHEN to call it, its parameters, whether it is on, the "after this function, say nothing to the client" switch, or the "only looks things up" switch. Send only what changes. The description is the single strongest lever over a function: it is what the model sees. Address, headers, secrets and the action type are NOT editable here, they live in the cabinet. Requires editor role.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Technical name the model calls, latin letters, digits and underscore. | |
| is_active | No | ||
| read_only | No | true = this function only looks things up and changes nothing (product search, stock, price list). When the client writes more while the bot is answering after such a function, the bot waits and answers everything in ONE message, calling the function again. Only for HTTP (webhook) functions, refused for built-in ones and together with "this is a lead", "say nothing", "finish the dialog" or a booking: a function that sends, books or records must never be repeated. false removes the switch. | |
| parameters | No | Full new list of parameters: it REPLACES the old one, so send every parameter you want to keep. | |
| project_id | Yes | Project id, as returned by dosai_list_projects. | |
| description | No | When to call this function and what it does, in the owner's words. This is what the model reads. | |
| function_id | Yes | Function id, as returned by dosai_list_functions. | |
| silent_after_call | No | true = after this function fires, the bot sends the client NOTHING: no text, no bubble in the dialog, and the chat is marked "reply by hand" for the owner. For a function that calls a human in and a person answers within minutes. Refused together with "this is a lead" (the lead card would not be created). false removes the switch. |