Count and filter the user's records — exact numbers and full lists.
Records are what a connected tool like a CRM, help desk, billing system,
issue tracker or code host holds (deals, tickets, subscriptions, issues,
merge requests, deployments), as they stand now. What changed in them over
some days is read_evidence with changes, not this.
Pass ONE source:
- record_type: a connected tool's records, named as the tool does
("HubSpot deals", "Zendesk tickets", "Stripe customers"), without a
collection, including questions that span tools.
- collection: one of the user's collections by name ("Reading list",
"Candidates", "Clients"): each row's CURRENT values (what a person set
or accepted); suggestions still waiting for a person are counted, never
shown as the value. To change a value, suggest_property on the row's
page.
Pass neither to list what you can ask: record types and their fields,
and the collections.
For record types, conditions and sorting use the tool's own field
labels: where=[{"field": "Deal Stage", "op": "is", "value": "Contract
Sent"}] (op: is, is not, contains, is empty, is not empty, and for
numbers, money and dates at least / at most, bounds included, dates as
YYYY-MM-DD). To span tools, list the records related to records in
another tool: related=[{"record_type": "Zendesk tickets",
"where": [{"field": "Priority", "op": "is", "value": "Urgent"}]}].
Related means one names the other in its tool, or the same company or
person across tools as the workspace's linking lined them up.
A code host's merge requests, pull requests, pipelines and deployments
are records too, as the host reports them: "is !214 merged?" is "GitLab
merge requests" where Reference contains "!214"; "what's deployed to
staging?" is "GitLab deployments" where Environment is "staging", latest
first.
Counts are exact over the records this person may see. Values are the
tool's own, as reported, with the day each record last changed in the
tool, so you can say how current an answer is. Where the team wrote what
a field means (field_notes, by field), that note is what the field's
values mean. Each record has a ``ref``: read_evidence opens it (every
field, or with scope="source" its change history); what changed across
a type over some days is read_evidence with changes. Read-only: nothing
here changes a tool.
Args:
record_type: the type, e.g. "HubSpot deals" (or "deals" when one tool has them).
collection: a collection's name (or part of it, if that's unique).
where: record types: up to 10 conditions on fields, by the tool's labels.
sort_by: record types: a field label to sort by (where the tool's data allows it).
descending: record types: sort largest / latest first.
related: record types: up to 3 other record types, each with conditions, that a
listed record must have a related record of.
limit: most rows (records 1-100, default 25; collection rows 1-200, default 50).