On this page
suggestCaption
query · in the family Reading your records
What it does
Suggest a cleaned-up version of a record name you are typing — casing, spacing, and obvious typos fixed.
Suggest a cleaned-up display name: the model fixes casing, stray whitespace, and obvious typos in YOUR draft — it never invents a different name. The answer arrives already normalized under the name rule (ends trimmed; internal whitespace runs collapsed to one space) and bounded 1..160 like every stored caption. type is the record kind word (prompt context only); text is the draft name (<= 500 chars). NOTHING auto-applies — the answer pre-fills the rename input. Refuses INTEGRATION/UNAVAILABLE while the assistant is offline/keyless — clean the name by hand. Requires authentication (user sessions). Every made call is cost-metered (at.ai.call.v1).
What happens
A drafting assist: the suggestion only fills the rename box, and nothing saves until you press Save. It never invents a different name. 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:suggestCaption
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
type | String String! | yes | No further notes. |
text | String String! | yes | No further notes. |
Returns
SuggestedCaption SuggestedCaption! — The name assist's answer: ONE cleaned-up name, already normalized under the name rule and bounded like every stored caption. It pre-fills the rename input — NOTHING auto-applies.
Example request
query ExampleSuggestCaption($type: String!, $text: String!) {
suggestCaption(type: $type, text: $text) {
suggestion
}
}
Variables:
{
"type": "<type>",
"text": "Restock before the weekend."
}
Example response
{
"data": {
"suggestCaption": {
"suggestion": "<suggestion>"
}
},
"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)