/
/
See the real margin on a client from Rillet and Teamwork.com
For finance and delivery leads who want a client's margin worked out from Rillet revenue and Teamwork.com delivery cost for a period.
On this page
Connector
Connect Rillet, pick your AI tool and paste the prompt.
The problem
Client margins look better than they are
Knowing whether a client is worth keeping means setting Rillet invoiced revenue against the cost of hours logged in Teamwork.com. Pulling and matching it all takes an afternoon, and people with no cost rate quietly inflate the margin.
Without PopdockAI
- Export hours and cost from Teamwork.com
- Total invoice lines in Rillet for the client
- Net out credit memos by hand
- Miss the people with no cost rate
With PopdockAI
- Hours, cost and billable value read for every project
- The client matched to a Rillet customer by name or email domain
- Invoices less credit memos totalled for the period
- People with no cost rate named, and nothing changed
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Estimate the margin on `{company-name}` between `{from-date}` and `{to-date}` (default today) by setting Rillet revenue against Teamwork delivery cost.
**Step 1: Find the client and its projects in Teamwork**
Call `teamwork-get-companies` with `name.contains` = `{company-name}`. If several match, list them and stop. Call `teamwork-get-projects` with that `company-id`.
**Step 2: Read delivery cost and effort**
For each project, call `teamwork-get-time` with `project-id`, `time-logged.from` = `{from-date}` and `time-logged.to` = `{to-date}`, with no billable filter. Total hours, `cost-total`, `billable-total`, and the billable share of hours. Note entries where `cost-total` is zero; the person has no cost rate.
**Step 3: Read revenue in Rillet**
Match the Teamwork company to a Rillet customer. Call `rillet-get-customers` (it takes no filters and returns every customer) and compare its `name` and `invoicing-name` to the Teamwork company `name`, ignoring case, punctuation and legal suffixes such as Inc, LLC, Ltd, Corp and GmbH. If no name matches, call `teamwork-get-people` with the Teamwork `company-id` and compare each contact's `email` with `email` from `rillet-get-customer-emails`; the same address, or the same company email domain (never a public domain such as gmail.com or outlook.com), is a match. State which rule produced the match. Call `rillet-get-invoice-lines` and total `line-total` for that `customer-id` whose revenue period overlaps the review period (use `invoice-date` if there is no period). Subtract matching lines from `rillet-get-credit-memo-lines` with the same `customer-id` and date range.
**Step 4: Report**
Per project: hours, cost, billable value. Then the client total: revenue (Rillet), cost (Teamwork), margin and margin percent, effective revenue per hour (revenue / total hours), and billable value not yet invoiced (Teamwork billable total minus Rillet revenue, if positive). List any people with hours but no cost rate, and say the margin is overstated by their time.
**Rules & Guidelines:**
* Tools starting teamwork- are on the teamwork MCP server; tools starting rillet- are on the rillet MCP server. If a tool from either server is unavailable, say which server is not connected and stop.
* This prompt is read-only. Do NOT call `rillet-add-invoice`, `rillet-update-invoice`, `rillet-add-customer`, `rillet-update-customer`, `rillet-add-credit-memo`, `teamwork-create-company`, `teamwork-update-company`, `teamwork-create-time-entry`, `teamwork-update-time-entry`, or any other tool on either server whose name starts with add, update, create, apply, set or record.
* Never convert between currencies. If Teamwork and Rillet amounts are in different currencies, report both side by side and say the comparison is not like for like. Teamwork's site currency is `currency-code` from `teamwork-get-account`.
* Revenue is invoiced revenue, not recognised revenue. Say so.
**Validation:**
* If no customer matches in Rillet, report the cost side only and say revenue could not be found.
* If no time is logged, report revenue only and say there is no delivery cost to compare.Who it's for
One answer, three teams that use it
Finance managers
Know which clients make money
Margin, margin percent and revenue per hour for a client in one answer, with its blind spots named.
What was our margin on Fabrikam in Q3, using Rillet invoices and Teamwork.com time?
Agency owners
Decide on rates with real numbers
See revenue per hour against cost before you renew or reprice a client.
Is Northwind Traders profitable this year once Teamwork.com hours are costed?
Delivery managers
Find work not yet invoiced
Billable value not yet invoiced shows where time has gone unbilled.
How much billable time on Contoso projects in Teamwork.com has not been invoiced in Rillet?
How it works
What PopdockAI does when you ask
You name the client and a period and your AI assistant sets invoiced revenue against delivery cost. It names the blind spots in the margin and changes nothing in either system.
01
Ask
You name the client and a period.
02
Read
It reads Teamwork.com hours, cost and billable value for each project.
03
Match
It finds the Rillet customer and totals invoices less credit memos.
04
Report
You get margin, revenue per hour and value not yet invoiced.
What PopdockAI provides
The tools behind the answer
Ready made tools for Rillet and one secure connection to your AI tool. No code, no exports.
teamwork-com-get-companies
teamwork-com-get-projects
teamwork-com-get-time
rillet-get-customers
teamwork-com-get-people
rillet-get-customer-emails
rillet-get-invoice-lines
rillet-get-credit-memo-lines
teamwork-com-get-account
This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.
The outcome
An honest margin for every client
Related use cases
More ways to put this data to work
One prompt template with infinite possibilities.
Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.
Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

.webp)
