Skip to content

Unpaid invoices

Up to 50 invoices with a balance still due, oldest due date first.

Run it with the run_report tool, passing the report id outstanding-invoices. If the workspace has more than one connected entity, also pass the connection_id of the one you want, from list_entities.

Output columns

  • txn_date
  • due_date
  • txn_number
  • company_name
  • total
  • amount_due

SQL

This is the exact query Kipper runs, against your own data and under your own permissions.

SELECT
    t.txn_date,
    t.due_date,
    t.txn_number,
    c.company_name,
    t.total,
    t.amount_due
FROM v_ai_transactions t
LEFT JOIN v_ai_companies c ON t.company_external_id = c.source_id
    AND t.data_source_id = c.data_source_id
WHERE t.type = 'invoice'
    AND t.amount_due > 0
ORDER BY t.due_date NULLS LAST
LIMIT 50

Limits

  • Capped at 100 rows.
  • Covers one connected entity. To span every entity, use the run_sql tool with all_entities=true rather than running the report once per entity.
  • Takes no parameters besides connection_id, which picks the entity and is required when the workspace has more than one. Any date window a report uses is already part of the SQL above.