interpretFilter
query · in the family Reading your records
What it does
Turn a written request — “issued orders from Acme since June” — into filter conditions you can review and apply.
Interpret a written request into structured filter conditions for a declared filterable family: the model drafts under a schema constrained to the family's roster, the server re-validates every clause exactly as hand-built (the grammar disposes), and reference names resolve in-tenant (ambiguity answers candidates for the picker — no tenant data leaves the platform; the prompt carries only the roster, its vocabularies, and your sentence). Inexpressible parts come back worded in unmappable. type must be a declared filterable family; text is one sentence (<= 500 chars). Refuses INTEGRATION/UNAVAILABLE while the interpreter is offline/keyless — build the filter by hand. Requires authentication (user sessions). Every call is cost-metered (at.ai.call.v1).
Before you call
A signed-in user’s session — the call refuses an API key (AUTHZ/FORBIDDEN).
Capability area: Reading your records — Looking up and listing the records of your organization.
Roles that may call it:
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
What happens
A drafting assist: nothing filters until you press Apply, and anything it could not express is named so you can add it by hand. Each use makes one metered AI call.
Arguments
Returns
InterpretedFilter InterpretedFilter! — The NL interpreter's answer: grammar clauses that survived the strict validator, the parts that could not map (worded), and the reference names needing a human pick.
Example request
query ExampleInterpretFilter($type: String!, $text: String!) {
interpretFilter(type: $type, text: $text) {
clauses {
field
op
values
}
}
}Variables:
{
"type": "<type>",
"text": "Restock before the weekend."
}Example response
{
"data": {
"interpretFilter": {
"clauses": [
{
"field": "<field>",
"op": "<op>",
"values": [
"<values>"
]
}
]
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": null,
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)