Sales tools
Sales covers the pipeline: opportunities, their deliverables and tasks, converting a won opportunity to a project, creating proposals, and the budgets of live proposals.
The toolset also has:
search_recordsdelete_recordwith the opportunity row and budget row kinds- The three report tools,
get_overview_report,get_revenue_reportandget_receivables_report
To write or send the proposal document itself, add the Proposals toolset. To change a delivery project’s budget or draft a variation, add Delivery.
Create a proposal
create_proposal makes a draft live proposal from a proposal template, on the opportunity or project that will own it. It is the same operation as New Proposal in Drum and POST /api/v1/proposals.
- The proposal takes the template’s stages, document, budget and live pricing. The assistant should read it with
get_proposal, then change or delete the budget rows that came with it before it adds its own, or the fees show twice. - To copy an existing project into a proposal, the assistant reads the project with
get_project,response_format: "detailed"andinclude: ["budget_lines"], then writes the rows withadd_proposal_row. - The result has
linksto the builder and the preview. They are for members of the account: only a send gives the client a link. - Send a new
idempotency_keywith each create. A retry with the same key gives the first proposal, withreplayedtrue.
Contingency, markup and rate cards
- A dynamic budget item takes
contingency_percent, and a cost line takesmarkup_percent, from 0 to 999.99. A new cost line withoutmarkup_percenttakes the opportunity’s default cost markup, else the account’s. See Contingency and markup. - A proposal budget deliverable takes
rate_card_idonupdate_proposal_row, fromselectable_rate_cardsofget_proposal, andreprice_resources: truere-rates its card-rated lines.add_proposal_rowdoes not takerate_card_id: set the card after the add. - An opportunity deliverable takes
rate_card_idfromselectable_rate_cardsofget_opportunity, andreprice_resourcesonupdate_opportunity_row. The warningsresources_repriced,typed_rates_kept,tasks_skipped_variationandrates_unchangedgive the figures. - A required opportunity role, or a team the account requires, must be set on
create_opportunity(reasonsrole_requiredandteam_required), andupdate_opportunitycannot remove it.
Source, lost reason and competitor
create_opportunityandupdate_opportunitytakesales_source_id(fromsearch_recordskindsales_source),lost_reason_id(kindlost_reason) andcompetitor_company_id(kindcompany).nullclears each on an update.- A lost reason and a competitor belong to a lost opportunity: send them in the same call as the move into a lost status. On an open opportunity they answer
invalid. A move out of lost clears them. - When the account requires a lost reason, a move into a lost status without one answers
invalidwith reasonlost_reason_required. - A new opportunity with no
sales_source_id, for a client that has had an opportunity or project before, gets the Source “Repeat client”. list_opportunitiesfilters bysales_source_ids,lost_reason_idsandcompetitor_company_ids.- Results have
sales_sourceandcompetitor_companyas{id, name}, andlost_reasonas{id, name, category, category_label}, ornull. get_opportunityhasstage_history: the newest 50 stage changes, newest first, with who made each one (orautomation) and the lost reason and competitor it recorded at the time. Drum records stage history from 10 November 2026.
Custom fields on opportunities
update_opportunity takes custom_fields, a list of {custom_field_id, value} (from custom_fields of get_opportunity). Fields you leave out are kept, and null clears a value. A value is a string for text and link fields, a number for a number field, yyyy-mm-dd for a date, one option for a select, or a list of options for a multiselect. A file field is refused.
Accepting changed fees on convert
When convert_opportunity accepts a proposal (accept_proposal: true) whose fees changed after its latest sent version, the call answers invalid with reason accepted_fees_required, and the details give the version and both totals. The assistant should ask you which to accept, then call again with:
accepted_fees:sent_versionaccepts the version the client was sent. The proposal goes back to those fees, and a draft copy keeps the later changes.current_feesaccepts the fees as they are now, which the client was not sent.accepted_total_centsandaccepted_total_currency: the total and currency of the option you chose, from the details. If the fees have moved since, the call answersaccepted_fees_changedwith the new figures.
The result then has acceptance, with accepted_fees, version_number and changes_proposal_id (the draft copy).
Hourly budgets: estimate or client cap
A time and materials deliverable in a proposal budget is either an estimate (a planning figure) or a client cap (a limit agreed with the client). update_proposal_row takes client_cap on a budget deliverable: true for a client cap, false for an estimate. A fixed price deliverable refuses true (client_cap_needs_hourly). add_proposal_row does not take it, so a new deliverable starts as an estimate. Conversion carries the choice to the project. get_proposal, get_project and get_opportunity give each deliverable client_cap and limit_kind: fixed_fee, client_cap, estimate or open (hourly work with no amount).
Closed proposals
An accepted, declined or cancelled proposal refuses every budget write, an unchanged readback included, with conflict and reason proposal_closed, until it is revised with revise_proposal in the Proposals toolset.
Tools
Each tool below shows what the server sends: its description (written for the AI), its kind, the permissions it needs, the fields it returns, and its inputs. An input in a.b or a[].b form is a field inside an object or a list. For the shared rules on results, pages, money and errors, see Results, errors and limits.
list_opportunities
List the opportunities (the sales pipeline) that the user can see, newest first. To find one opportunity by name or number, use search_records. An _ids filter takes the opportunities with any of its ids. Send response_format detailed for the description, dates, tags, currency, referrer, Source, reason and competitor. projects lists the delivery projects made from the opportunity.
| Title | List opportunities |
| Toolsets | Sales |
| Kind | Read only, Idempotent |
| Needs | api_read, and an opportunity read permission (all, team or assigned). A project read permission is not enough |
| Returns | opportunities, count, limit, offset, has_more |
| Input | Type | Required | Description |
|---|---|---|---|
project_status_ids |
array of integers | From search_records with kinds project_status and status opportunity. | |
lead_score_ids |
array of integers | From search_records with kinds lead_score. Needs opportunity money rights. | |
assigned_to_ids |
array of integers | From search_records with kinds member. | |
opportunity_tags |
array of strings | Only those with all of these tags. | |
team_ids |
array of integers | From search_records with kinds team. | |
no_team |
boolean | true: only opportunities with no team. Not with team_ids. | |
sales_source_ids |
array of integers | From search_records with kinds sales_source. | |
lost_reason_ids |
array of integers | From search_records with kinds lost_reason. | |
competitor_company_ids |
array of integers | From search_records with kinds company. | |
estimated_start_date |
string | Estimated start from, yyyy-mm-dd. | |
estimated_end_date |
string | Estimated start by, yyyy-mm-dd. | |
due_date_from |
string | Due on or after, yyyy-mm-dd. | |
due_date_to |
string | Due on or before, yyyy-mm-dd. | |
project_number |
string | Only the opportunity with this exact number. | |
response_format |
string | concise (default) or detailed. One of concise, detailed. |
|
limit |
integer | Maximum rows to return. Default 25, maximum 100 (25 for detailed). | |
offset |
integer | Number of rows to skip. Default 0. |
get_opportunity
Read one opportunity by id, with its deliverables and tasks, custom fields, lead score, stage history and its members with their project roles (members). Read it before update_opportunity or convert_opportunity. projects lists the delivery projects made from the opportunity (empty when not converted), and variation is not null for a variation opportunity and shows what convert_opportunity would do. If deliverables_page.has_more is true, call again with deliverable_offset set to offset plus count. Rows are concise. Send response_format detailed for their money, dates, notes and the budget lines of each task.
| Title | Get opportunity |
| Toolsets | Sales |
| Kind | Read only, Idempotent |
| Needs | api_read, and read access to the opportunity |
| Returns | id, name, project_number, estimated_start_date, project_status, client, team, lead_score, projects, description, currency, estimated_end_date, enquiry_date, target_date, due_date, deal_won_at, deal_lost_at, opportunity_tags, variation_opportunity, variation, referrer_company, referrer_contact, sales_source, lost_reason, competitor_company, amount, due_at, colour, default_rate_card, project_templates, invoicing_structure, estimated_deposit, project_tags, members, stage_history, counts, deliverables, deliverables_page, selectable_rate_cards, contacts, custom_fields, recent_notes, notes_count, total_budget, financial_summary |
| Input | Type | Required | Description |
|---|---|---|---|
opportunity_id |
integer | Yes | From search_records or list_opportunities. |
include |
array of strings | Sections to return. Default all but contacts. tasks also returns deliverables. financials returns total_budget and financial_summary. One of financials, deliverables, tasks, contacts, custom_fields, notes. |
|
deliverable_ids |
array of integers | Only these deliverables and their tasks. Ids from an earlier get_opportunity. Default all. | |
deliverable_offset |
integer | Number of deliverables to skip. Default 0. | |
response_format |
string | concise (default) or detailed. One of concise, detailed. |
create_opportunity
Create an opportunity (a deal in the sales pipeline) for a client company. Search for the opportunity with search_records first, and use update_opportunity when it exists. An omitted field takes the default of the Drum form: the default status and lead score, today as the enquiry date, the default templates, and the user as the member when the account has no opportunity roles. The templates add their deliverables. The money fields and the lead score need the opportunity money permission. It sends the account’s webhooks and can start its automations.
| Title | Create opportunity |
| Toolsets | Sales |
| Kind | Writes data |
| Needs | api_create, create_opportunities and read_companies. Money fields and lead_score_id also need view_opportunity_financial_values |
| Returns | opportunity, replayed |
| Input | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | 255 characters or fewer. |
client_company_id |
integer | Yes | From search_records with kinds company. |
project_status_id |
integer | From search_records with kinds project_status and status opportunity. | |
description |
string | ||
lead_score_id |
integer | From search_records with kinds lead_score. | |
team_id |
integer | From search_records with kinds team. | |
amount_cents |
integer | Deal value in cents. | |
invoicing_structure |
string | How the deal is invoiced. One of payment_on_delivery, monthly. |
|
estimated_deposit_cents |
integer | Expected deposit in cents. | |
enquiry_date |
string | yyyy-mm-dd. | |
target_date |
string | Next action date. | |
due_at |
string | Due time, ISO 8601. | |
estimated_start_date |
string | yyyy-mm-dd. | |
estimated_end_date |
string | yyyy-mm-dd. | |
default_rate_card_id |
integer | From search_records with kinds rate_card. | |
project_template_ids |
array of integers | From search_records with kinds project_template. Replaces the templates. | |
referrer_company_id |
integer | From search_records with kinds company. | |
referrer_contact_id |
integer | From search_records with kinds contact. | |
sales_source_id |
integer | From search_records with kinds sales_source. | |
lost_reason_id |
integer | If lost. From search_records with kinds lost_reason. | |
competitor_company_id |
integer | If lost. From search_records with kinds company. | |
colour |
string | One of red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose. |
|
role_members |
array of objects | The members of each role. A role marked required must have a member. | |
role_members[].project_role_id |
integer or null | Yes | From search_records with kinds project_role. null: the members with no role. |
role_members[].member_ids |
array of integers | Yes | From search_records with kinds member. |
opportunity_tags |
array of strings | Tag names. | |
location_id |
integer | From search_records with kinds location. Needed when the number uses the location. | |
idempotency_key |
string | 255 characters or fewer. |
update_opportunity
Change the fields of one opportunity. Omit a field to keep it, and send null to clear an optional field. A lost status sets the lost date, takes lost_reason_id and competitor_company_id in one call, and on a variation opportunity declines the proposal and rejects the variation. A won status does not convert the opportunity, and a variation opportunity refuses it: use convert_opportunity. Send expected_project_status_id from get_opportunity: a changed status answers conflict (stale_state). The money fields and the lead score need the opportunity money permission, a change sends the account’s webhooks, and a status change can start its automations.
| Title | Update opportunity |
| Toolsets | Sales |
| Kind | Writes data, Idempotent |
| Needs | api_update, and read and update access to the opportunity. Money fields and lead_score_id also need view_opportunity_financial_values |
| Returns | opportunity |
| Input | Type | Required | Description |
|---|---|---|---|
opportunity_id |
integer | Yes | From search_records or list_opportunities. |
name |
string | ||
client_company_id |
integer | From search_records with kinds company. | |
project_status_id |
integer | From search_records with kinds project_status and status opportunity. | |
description |
string or null | null clears it. | |
lead_score_id |
integer or null | From search_records with kinds lead_score. null clears it. | |
team_id |
integer or null | From search_records with kinds team. null clears it. | |
amount_cents |
integer | Deal value in cents. | |
invoicing_structure |
string or null | How the deal is invoiced. null clears it. | |
estimated_deposit_cents |
integer | Expected deposit in cents. | |
enquiry_date |
string or null | yyyy-mm-dd. null clears it. | |
target_date |
string or null | Next action date. null clears it. | |
due_at |
string or null | Due time, ISO 8601. null clears it. | |
estimated_start_date |
string or null | yyyy-mm-dd. null clears it. | |
estimated_end_date |
string or null | yyyy-mm-dd. null clears it. | |
default_rate_card_id |
integer | From search_records with kinds rate_card. | |
project_template_ids |
array of integers | From search_records with kinds project_template. Replaces the templates. | |
referrer_company_id |
integer or null | From search_records with kinds company. null clears it. | |
referrer_contact_id |
integer or null | From search_records with kinds contact. null clears it. | |
sales_source_id |
integer or null | From search_records with kinds sales_source. null clears it. | |
lost_reason_id |
integer or null | If lost. From search_records with kinds lost_reason. null clears it. | |
competitor_company_id |
integer or null | If lost. From search_records with kinds company. null clears it. | |
colour |
string or null | null clears it. | |
project_role_id |
integer or null | From search_records with kinds project_role: the role member_ids sets. null: no role. | |
member_ids |
array of integers | From search_records with kinds member. Replaces project_role_id’s members. | |
add_opportunity_tags |
array of strings | Other tags are kept. | |
remove_opportunity_tags |
array of strings | Other tags are kept. | |
expected_project_status_id |
integer | The current status id, from get_opportunity. | |
custom_fields |
array of objects | Entries left out are kept. | |
custom_fields[].custom_field_id |
integer | Yes | From get_opportunity. |
custom_fields[].value |
Yes | By field_type: text, number, yyyy-mm-dd, ISO 8601, option(s). null clears it. |
add_opportunity_row
Add a deliverable or task to an opportunity. A task needs deliverable_id, from get_opportunity. Price an opportunity in its proposal budget (add_proposal_row), not on its tasks. After a timeout, read the opportunity with get_opportunity before you try again.
| Title | Add opportunity row |
| Toolsets | Sales |
| Kind | Writes data |
| Needs | api_create, and the web permissions for the row: opportunity update access or update_budgets for a deliverable or task, and update_budgets for budget fields and expense lines |
| Returns | rows, warnings |
| Input | Type | Required | Description |
|---|---|---|---|
opportunity_id |
integer | Yes | From search_records or list_opportunities. |
row_type |
string | Yes | One of deliverable, task. |
deliverable_id |
integer | row_type task, from get_opportunity. | |
position |
integer | 1-based place among its siblings. Default last. | |
row |
object | The fields of the new row. | |
row.name |
string | ||
row.description |
string | deliverable. | |
row.start_date |
string | yyyy-mm-dd. | |
row.end_date |
string | deliverable. | |
row.due_date |
string | task. | |
row.project_phase_id |
integer | deliverable. | |
row.rate_card_id |
integer | From get_opportunity selectable_rate_cards. | |
row.from_project_template_deliverable_ids |
array of integers | deliverable: copies these template deliverables with their tasks. | |
row.item_type |
string | One of task, heading, event, process_only. |
|
row.note |
string | task. |
update_opportunity_row
Change a deliverable or task of an opportunity, by row_type and id from get_opportunity. Omit a field to keep it, and send null to clear it. Price an opportunity in its proposal budget (add_proposal_row), not on its tasks. A rate_card_id change also changes booking rates. Delete rows with delete_record, row_type as kind.
| Title | Update opportunity row |
| Toolsets | Sales |
| Kind | Writes data, Idempotent |
| Needs | api_update, and the same permissions as add_opportunity_row |
| Returns | rows, warnings |
| Input | Type | Required | Description |
|---|---|---|---|
opportunity_id |
integer | Yes | From search_records or list_opportunities. |
row_type |
string | Yes | One of deliverable, task. |
id |
integer | Yes | From get_opportunity. |
position |
integer | 1-based place among its siblings. | |
row |
object | The fields to change. | |
row.name |
string | ||
row.description |
string or null | deliverable. null clears it. | |
row.status |
string | deliverable or task. One of not_started, in_progress, completed, not_applicable, blocked. |
|
row.start_date |
string or null | yyyy-mm-dd. null clears it. | |
row.end_date |
string or null | deliverable. null clears it. | |
row.due_date |
string or null | task. null clears it. | |
row.project_phase_id |
integer or null | deliverable. null clears it. | |
row.rate_card_id |
integer or null | From get_opportunity selectable_rate_cards. null clears it. | |
row.reprice_resources |
boolean | true re-rates lines on the old card. | |
row.deliverable_id |
integer | task: moves it there, from get_opportunity. | |
row.item_type |
string | One of task, heading, event, process_only. |
|
row.member_ids |
array of integers | task: replaces its members. | |
row.note |
string or null | task. null clears it. |
convert_opportunity
Convert an opportunity and mark it won, which cannot be reversed. Use it only when asked to convert, and update_opportunity to only mark it won. A usual opportunity becomes a new delivery project with a project number, its company becomes a client, its email threads move to it, and the account’s webhooks and automations can run. A variation opportunity (variation not null in get_opportunity) makes no project: it accepts the variation’s proposal into its project’s budget and contract value, so send expected_total_cents and no project inputs. Send expected_project_status_id from get_opportunity, and a changed status or total answers conflict (stale_state). If already converted, it returns created false and the project.
| Title | Convert opportunity |
| Toolsets | Sales |
| Kind | Writes data, Destructive |
| Needs | api_create, opportunity read and update access and create_projects, or read_quotes and accept_quotes for the accepted proposal. budget_cents also needs view_opportunity_financial_values |
| Returns | created, project, opportunity, acceptance |
| Input | Type | Required | Description |
|---|---|---|---|
opportunity_id |
integer | Yes | From search_records or list_opportunities. |
expected_project_status_id |
integer | Yes | The current status id, from get_opportunity. |
project_status_id |
integer | From search_records kinds project_status, status project. Default: the template’s default. | |
name |
string | Default: the opportunity name. | |
description |
string | Default: the opportunity description. | |
team_id |
integer | From search_records with kinds team. Default: the opportunity team. | |
start_date |
string | Project start, yyyy-mm-dd. | |
end_date |
string | Project end, yyyy-mm-dd. | |
location_id |
integer | From search_records with kinds location. | |
budget_cents |
integer | Budget and final deal value, ex tax, in the account’s default currency. Needs opportunity money rights. | |
proposal_id |
integer | The accepted proposal to build from, or to accept with accept_proposal. From search_records kinds proposal. Default: the last accepted one. | |
structure_type |
string | budget (default): deliverables from the proposal budget. proposal: from the quote sections. One of budget, proposal. |
|
allow_additional_project |
boolean | One more project if one exists. Default false. | |
accept_proposal |
boolean | Accept proposal_id first. Default false. | |
accepted_fees |
string | Fees changed since the send: ask the user. sent_version keeps later edits in a draft. One of sent_version, current_fees. |
|
accepted_total_cents |
integer | That option’s total from the refusal. | |
accepted_total_currency |
string | Currency. | |
expected_total_cents |
integer | Variation only, required if you see opportunity money: variation.total cents from get_opportunity. | |
won_status_id |
integer | Variation only. From search_records kinds project_status, status opportunity. Default: the default one. |
get_proposal
Read one live proposal (a quote on an opportunity) with its budget and the ids of all budget rows. Each row shows the keys that add_proposal_row and update_proposal_row take for its row type, and its record_kind for delete_record. The quote sections and fee lines are not in the result. If budget.deliverables_page.has_more is true, call again with budget_deliverable_offset set to offset plus count.
| Title | Get proposal |
| Toolsets | Sales |
| Kind | Read only, Idempotent |
| Needs | api_read, read_quotes, read_budgets, and read access to the proposal’s opportunity or project |
| Returns | id, name, description, status, project, project_template, currency, total_excluding_tax, deleted, closed, closed_at, closed_by, budget, warnings |
| Input | Type | Required | Description |
|---|---|---|---|
proposal_id |
integer | Yes | From search_records with kinds proposal. |
budget_deliverable_ids |
array of integers | Only these budget deliverables, from get_proposal. Default all. | |
budget_deliverable_offset |
integer | Number of budget deliverables to skip. Default 0. | |
response_format |
string | concise (default): id, record_kind, kind, name, item_type and position of each budget item. detailed adds the values, the other fields and the lines. One of concise, detailed. |
create_proposal
Create a draft live proposal from a template on the opportunity or project that will own it, which you ask for if only a source project to copy is named. Template rows come too: read them with get_proposal and change or delete them, or fees show twice. To copy a project, write rows from its current budget lines at the new prices, rounded per line to the cent. On a fixed row with child lines, raise only the row rate unless asked, and a dynamic row rate change moves the budget too. If pricing_live is false, rows miss the fee table: tell the user. Give links.builder_url or links.preview_url (member links, not client links).
| Title | Create proposal |
| Toolsets | Sales |
| Kind | Writes data |
| Needs | api_create, create_quotes, read_quotes and read_budgets, and read access to the opportunity or project |
| Returns | id, name, status, project, currency, total_excluding_tax, document_format, pricing_live, links, warnings, replayed |
| Input | Type | Required | Description |
|---|---|---|---|
project_id |
integer | Yes | The opportunity or project that owns the proposal, from search_records with kinds opportunity or project. |
proposal_template_id |
integer | Yes | From search_records with kinds proposal_template. |
description |
string | Default: the description of the template. | |
expiry_date |
string | yyyy-mm-dd. Default: the expiry days of the template. | |
idempotency_key |
string | 255 characters or fewer. |
add_proposal_row
Add one row to the budget of a live proposal. A new budget_deliverable or budget_item can include its new children, and a new budget_deliverable can copy one of the same budget (copy_from_id). delete_record takes row_type as kind. On a Builder proposal the stages and fees follow the budget, and a finalised budget refuses the row. After a timeout, read the proposal with get_proposal before you try again.
| Title | Add proposal row |
| Toolsets | Sales |
| Kind | Writes data |
| Needs | api_create, the get_proposal permissions, and update_budgets |
| Returns | proposal_id, row_type, record_kind, row, rows, warnings |
| Input | Type | Required | Description |
|---|---|---|---|
proposal_id |
integer | Yes | From search_records with kinds proposal. |
row_type |
string | Yes | One of budget_phase, budget_deliverable, budget_item, budget_item_resource, budget_item_cost. |
budget_deliverable_id |
integer | row_type budget_item: its budget deliverable, from get_proposal. | |
budget_item_id |
integer | row_type budget_item_resource or budget_item_cost: its budget item, from get_proposal. | |
position |
integer | 1-based place in the row’s list. | |
row |
object | Yes | The keys of row_type, as get_proposal shows that row. |
row.name |
string | ||
row.description |
string | ||
row.colour |
string | A phase takes gray, red, orange, yellow, blue, green or indigo. One of red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose, gray. |
|
row.budget_type |
string | One of fixed_price, time_and_materials. |
|
row.budget_phase_id |
integer | A budget phase, from get_proposal. | |
row.budget_phase_name |
string | Or a budget phase name. | |
row.client_option |
object | Deliverables only. | |
row.client_option.kind |
string | required, optional (client includes it or not), quantity (client picks how many). Initially required. One of required, optional, quantity. |
|
row.client_option.included |
boolean | optional only: included by default. Starts true. | |
row.client_option.quantity |
integer | quantity only: default whole number, 0-999. Initially 1. | |
row.client_option.min |
integer | quantity only: whole-number minimum, 0-999. Initially min(quantity, 1). | |
row.client_option.max |
integer | quantity only: whole-number maximum, 0-999. Initially max(quantity, 10). | |
row.client_option.unit |
string or null | quantity only: label up to 30 characters, for example visits. Starts unset. null clears it. | |
row.kind |
string | fixed: quantity x rate. dynamic: sum of lines. One of fixed, dynamic, non_financial. |
|
row.item_type |
string | One of task, event, process_only. |
|
row.delivery_task_name |
string | Its task name on a project. | |
row.quantity |
number | ||
row.quantity_unit |
string | One of hour, day, per_item. |
|
row.billable_rate_cents |
integer | Tax exclusive. | |
row.contingency_percent |
number | Dynamic only: % of cost. At least 0. At most 999.99. | |
row.resource_type_id |
integer | From search_records with kinds resource_type. | |
row.preferred_member_id |
integer | From search_records with kinds member. | |
row.rate_cents |
integer | Tax exclusive. Omit to use the rate cards. | |
row.notes |
string | ||
row.cost_type_id |
integer | From search_records with kinds cost_type. | |
row.markup_percent |
number | % on cost. Omit for the default markup. At least 0. At most 999.99. | |
row.items |
array of objects | ||
row.items[].kind |
string | fixed: quantity x rate. dynamic: sum of lines. One of fixed, dynamic, non_financial. |
|
row.items[].name |
string | Yes | |
row.items[].item_type |
string | One of task, event, process_only. |
|
row.items[].description |
string | ||
row.items[].delivery_task_name |
string | Its task name on a project. | |
row.items[].quantity |
number | ||
row.items[].quantity_unit |
string | One of hour, day, per_item. |
|
row.items[].billable_rate_cents |
integer | Tax exclusive. | |
row.items[].contingency_percent |
number | Dynamic only: % of cost. At least 0. At most 999.99. | |
row.items[].resources |
array of objects | ||
row.items[].resources[].resource_type_id |
integer | From search_records with kinds resource_type. | |
row.items[].resources[].preferred_member_id |
integer | From search_records with kinds member. | |
row.items[].resources[].quantity |
number | ||
row.items[].resources[].quantity_unit |
string | One of hour, day, per_item. |
|
row.items[].resources[].rate_cents |
integer | Tax exclusive. Omit to use the rate cards. | |
row.items[].resources[].notes |
string | ||
row.items[].costs |
array of objects | ||
row.items[].costs[].cost_type_id |
integer | Yes | From search_records with kinds cost_type. |
row.items[].costs[].name |
string | Yes | |
row.items[].costs[].description |
string | ||
row.items[].costs[].quantity |
number | ||
row.items[].costs[].quantity_unit |
string | One of hour, day, per_item. |
|
row.items[].costs[].billable_rate_cents |
integer | Tax exclusive. | |
row.items[].costs[].markup_percent |
number | % on cost. Omit for the default markup. At least 0. At most 999.99. | |
row.resources |
array of objects | ||
row.resources[].resource_type_id |
integer | From search_records with kinds resource_type. | |
row.resources[].preferred_member_id |
integer | From search_records with kinds member. | |
row.resources[].quantity |
number | ||
row.resources[].quantity_unit |
string | One of hour, day, per_item. |
|
row.resources[].rate_cents |
integer | Tax exclusive. Omit to use the rate cards. | |
row.resources[].notes |
string | ||
row.costs |
array of objects | ||
row.costs[].cost_type_id |
integer | Yes | From search_records with kinds cost_type. |
row.costs[].name |
string | Yes | |
row.costs[].description |
string | ||
row.costs[].quantity |
number | ||
row.costs[].quantity_unit |
string | One of hour, day, per_item. |
|
row.costs[].billable_rate_cents |
integer | Tax exclusive. | |
row.costs[].markup_percent |
number | % on cost. Omit for the default markup. At least 0. At most 999.99. | |
row.copy_from_id |
integer | A deliverable of the same budget to copy, from get_proposal. |
update_proposal_row
Change one budget row of a live proposal by row_type and id from get_proposal. Only the keys sent change, and null clears a field. Add a child row with add_proposal_row, not here. A finalised budget refuses the change, and delete_record deletes a row with row_type as kind.
| Title | Update proposal row |
| Toolsets | Sales |
| Kind | Writes data, Idempotent |
| Needs | api_update, the get_proposal permissions, and update_budgets |
| Returns | proposal_id, row_type, record_kind, row, rows, warnings |
| Input | Type | Required | Description |
|---|---|---|---|
proposal_id |
integer | Yes | From search_records with kinds proposal. |
row_type |
string | Yes | One of budget_phase, budget_deliverable, budget_item, budget_item_resource, budget_item_cost. |
id |
integer | Yes | Row id, from get_proposal. |
budget_deliverable_id |
integer | row_type budget_item: move it to this budget deliverable, from get_proposal. | |
position |
integer | 1-based place in the row’s list. | |
row |
object | The keys to change, as get_proposal shows that row. | |
row.name |
string | ||
row.description |
string or null | null clears it. | |
row.colour |
string or null | A phase takes gray, red, orange, yellow, blue, green or indigo. null clears it. | |
row.budget_type |
string | One of fixed_price, time_and_materials. |
|
row.budget_phase_id |
integer or null | A budget phase, from get_proposal. null clears it. | |
row.budget_phase_name |
string | Or a budget phase name. | |
row.client_option |
object | Deliverables only. | |
row.client_option.kind |
string | required, optional (client includes it or not), quantity (client picks how many). Initially required. One of required, optional, quantity. |
|
row.client_option.included |
boolean | optional only: included by default. Starts true. | |
row.client_option.quantity |
integer | quantity only: default whole number, 0-999. Initially 1. | |
row.client_option.min |
integer | quantity only: whole-number minimum, 0-999. Initially min(quantity, 1). | |
row.client_option.max |
integer | quantity only: whole-number maximum, 0-999. Initially max(quantity, 10). | |
row.client_option.unit |
string or null | quantity only: label up to 30 characters, for example visits. Starts unset. null clears it. | |
row.kind |
string | fixed: quantity x rate. dynamic: sum of lines. One of fixed, dynamic, non_financial. |
|
row.item_type |
string | One of task, event, process_only. |
|
row.delivery_task_name |
string or null | Its task name on a project. null clears it. | |
row.quantity |
number | ||
row.quantity_unit |
string | One of hour, day, per_item. |
|
row.billable_rate_cents |
integer | Tax exclusive. | |
row.contingency_percent |
number | Dynamic only: % of cost. At least 0. At most 999.99. | |
row.resource_type_id |
integer | From search_records with kinds resource_type. | |
row.preferred_member_id |
integer or null | From search_records with kinds member. null clears it. | |
row.rate_cents |
integer | Tax exclusive. Omit to use the rate cards. | |
row.notes |
string or null | null clears it. | |
row.cost_type_id |
integer | From search_records with kinds cost_type. | |
row.markup_percent |
number | % on cost. At least 0. At most 999.99. | |
row.rate_card_id |
integer or null | Deliverables: from get_proposal selectable_rate_cards. null clears it. | |
row.reprice_resources |
boolean | true re-rates lines on the old card. | |
row.client_cap |
boolean | false: an estimate. |