On this page
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. NOTHING auto-applies — the answer pre-fills the builder and Apply stays yours. 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).
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.
Who may call it
Capability area: Reading your records — Looking up and listing the records of your organization.
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- An API key whose scope allows
api:interpretFilter
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
type | String String! | yes | No further notes. |
text | String String! | yes | No further notes. |
Returns
InterpretedFilter InterpretedFilter! — The NL interpreter's answer: grammar clauses that SURVIVED the strict validator (they pre-fill the builder — NOTHING auto-applies), 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. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. (RATE_LIMIT)