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).
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: 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.
Arguments
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. 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)