Insights tools
Insights gives an assistant the firm’s reports: the business overview, revenue, accounts receivable, and the sales reports of the opportunities dashboard. It is read only.
The toolset also has search_records, and list_projects and get_project. The overview, revenue and receivables tools are also in Sales and Resourcing. get_sales_report is in Insights only.
Each report needs the same insights permission as its screen in Drum.
Sales report
get_sales_report gives the figures of the sales reports on the opportunities dashboard, computed the same way. It counts the opportunities added in the period, variation opportunities included. The period defaults to the dashboard’s: from the first day of the month 12 months ago to today, in the account’s time zone.
report |
What it gives |
|---|---|
breakdown |
For the dimension source (the default), client_source or referrer: each row’s count, value, won count, won value and win rate |
lost |
Lost opportunities by reason, by reason category and by competitor, and competitive_win_rate (won, over won plus lost to a competitor) |
sales_cycle |
Days to won and to lost, the average days in each stage, and the last stage before a loss. Stage history starts on the date in stage_data_from |
proposals |
How long proposals take: days from send to accepted and to declined, how many were accepted online or by a member, answers after each follow-up email, the acceptance rate by a grouping (group_by: custom_field, tag, source, team or primary_role, with group_by_id for a custom field or role), and the take-up of optional deliverables. It needs the proposal builder |
- A
breakdownorlostlist has up to 20 rows, as on the dashboard. The rest are summed in one row of kindother, so the rows add up to the totals. Opportunities with no value are onenot_setrow, last. A deleted Source, reason or company keeps its row withdiscarded: true. - With no
group_by, theproposalsreport uses the first grouping the account offers, andgroupingslists them all. An unknowngroup_byorgroup_by_idisinvalid, and the message lists the allowed values. - Unlike the dashboard, the figures cover only the opportunities the user can read. Without
view_opportunity_financial_values, rows have counts and rates and no money.
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.
get_overview_report
Read the financial overview of one month for the account. It gives net revenue, credit notes, expenses, and what is unpaid now on outstanding and overdue invoices. Use get_revenue_report for a date range, and get_receivables_report for the invoices one by one.
| Title | Get overview report |
| Toolsets | Delivery, Resourcing, Sales, Insights |
| Kind | Read only, Idempotent |
| Needs | api_read, and access to business insights |
| Returns | month, monthly_revenue, monthly_credit_notes, monthly_expenses, outstanding_invoices, overdue_invoices |
| Input | Type | Required | Description |
|---|---|---|---|
date |
string | A day in the month to report, yyyy-mm-dd. Default: today. |
get_revenue_report
Read the invoiced revenue of a date range. Revenue is invoices less credit notes by issued date, excluding tax, as on the Insights dashboard. It gives the total, the total for each project type, and the five projects with the most revenue. Use get_receivables_report for the invoices one by one.
| Title | Get revenue report |
| Toolsets | Delivery, Resourcing, Sales, Insights |
| Kind | Read only, Idempotent |
| Needs | api_read, and access to business insights |
| Returns | start_date, end_date, total, per_project_type, top_projects |
| Input | Type | Required | Description |
|---|---|---|---|
start_date |
string | First day, yyyy-mm-dd. Default: the first day of the current month. | |
end_date |
string | Last day, yyyy-mm-dd. Default: the last day of the current month. |
get_receivables_report
Read the accounts receivable report, with the invoices and credit notes of the account, newest issue date first, and the report totals. A row has the client, project, due date, status, and the amounts without and with tax. A credit note has negative amounts. Send response_format detailed for the issue date, reference and original invoice number.
| Title | Get receivables report |
| Toolsets | Delivery, Resourcing, Sales, Insights |
| Kind | Read only, Idempotent |
| Needs | api_read, and access to accounts receivable insights |
| Returns | rows, total_count, totals, count, limit, offset, has_more |
| Input | Type | Required | Description |
|---|---|---|---|
start_date |
string | Only records issued on or after this day, yyyy-mm-dd. | |
end_date |
string | Only records issued on or before this day, yyyy-mm-dd. | |
project_id |
integer | Only records of this project. From search_records. | |
client_id |
integer | Only records billed to this company (the invoice company, not the project client). From search_records with kinds company. | |
status |
string | Only invoices with this status. One of draft, awaiting_approval, approved. |
|
overdue_only |
boolean | Only overdue invoices, with no credit notes. Default false. | |
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_sales_report
Read a sales report of the opportunities that the user can see, as on the opportunities dashboard. breakdown, lost and sales_cycle count the completed (won or lost) opportunities added in the period, with up to 20 rows in a list and the rest in one row of kind other. breakdown gives the count, value, won count, won value and win rate of each Source, Client Source or Referrer, and lost gives the lost count and value by lost reason, category and competitor, and the competitive win rate: won over won plus lost to a competitor. sales_cycle gives the days from enquiry to won and to lost, the days in each stage, and the stage before lost. proposals covers every proposal of the opportunities added in the period: the days from first send to accepted and declined, answers, answers after each follow-up, figures by group, option take-up, and groupings (group_by choices and ids). Group rows of a multi_valued grouping overlap, and an answer after follow-up N does not show the follow-up caused it.
| Title | Get sales report |
| Toolsets | Insights |
| Kind | Read only, Idempotent |
| Needs | api_read and view_opportunity_insights. Money also needs view_opportunity_financial_values, and the proposals report needs the proposal builder |
| Returns | report, start_date, end_date, dimension, rows, lost, sales_cycle, proposals |
| Input | Type | Required | Description |
|---|---|---|---|
report |
string | Yes | The report to read. One of breakdown, lost, sales_cycle, proposals. |
dimension |
string | For breakdown: source is how each opportunity arose; client_source is how clients first found the firm; referrer is the referring company. Default: source. One of source, client_source, referrer. |
|
group_by |
string | For proposals: the grouping of by_group. Default: the first of groupings in the result. One of custom_field, tag, source, team, primary_role. |
|
group_by_id |
integer | For proposals with group_by custom_field or primary_role: the custom field or role id, from groupings in a proposals result. | |
start_date |
string | First day that an opportunity was added, yyyy-mm-dd. Default: the first day of the month 12 months ago. | |
end_date |
string | Last day, yyyy-mm-dd. Default: today. |