Move FreeScout docs from TOOLS.md into invoice-generator skill

This commit is contained in:
Hoid 2026-02-09 01:53:40 +00:00
parent e935eb8883
commit ffd01c23bd
2 changed files with 19 additions and 37 deletions

View file

@ -14,22 +14,26 @@ Generate Excel invoices from FreeScout time tracking data and send them via What
3. Send the file to the user via the `message` tool
4. Reply with NO_REPLY (the file message is the reply)
## Available customers
## CLI Reference
If unsure which customer, run `bin/freescout report --from 2024-01-01 --to 2099-12-31` to see all, or pass a wrong name — the script prints available customers.
## Other commands
```
bin/freescout mailboxes # List mailboxes
bin/freescout users # List users
bin/freescout report --from --to # Terminal report (add --customer, --mailbox, --user)
bin/freescout excel --from --to # Excel generation (add --customer, --mailbox, --user, --output)
```bash
freescout mailboxes # List mailboxes
freescout users # List users
freescout report --from DATE --to DATE # Show time report (tab-separated)
[--mailbox ID] [--user ID] [--customer NAME]
freescout excel --from DATE --to DATE # Generate invoice Excel
[--mailbox ID] [--user ID] [--customer NAME] [--output file.xlsx]
```
## Notes
## Technical Details
- `time_spent` in DB is seconds, displayed as decimal hours
- Excel groups by conversation: subject, customer, website, total hours
- Customer and Website come from FreeScout custom fields (dropdowns)
- Only timelogs within the date range are counted, not conversation creation dates
- Credentials: `.credentials/services.env` (CLOONAR_DB_* + FREESCOUT_DB_NAME)
- Queries timelogs table directly (API doesn't expose time tracking)
- Excel groups by conversation, shows subject, customer, website, hours
- Customer and Website are custom field dropdowns (resolved to labels)
- `time_spent` is stored in seconds, displayed as decimal hours
- Only timelogs within the date range are counted (not conversation dates)
## Finding Customers
Pass a wrong `--customer` name — the script prints all available customers.