talkFillDraft
mutation · in the family Work and notes
What it does
Tell the assistant what to change on one of your ready wizard drafts — it answers in plain words and hands back the whole revised sheet, in the background.
Tell the assistant what to change on ONE of your ready wizard drafts: your message (say) and optionally more of your documents go in; your turn is appended and the draft flips back to drafting while the assistant answers in the background — briefly, in plain words — and hands back the whole revised sheet (every value you did not ask about kept; a value you rejected removed); the draft flips ready again and the fill_draft_finished notice tells you. When the conversation outgrows 12 un-summarized turns the older turns fold into the stored summary first. The assistant cannot look anything up — it asks you for facts it lacks. The order of the gates: the draft must be yours and ready (CONFLICT/REF_STATE naming another state; an expired draft refuses too) with its current revision (CONFLICT/REVISION_STALE) · at most 24 turns per draft and 30 messages an hour (VALIDATION/INVALID) · the assistant offline or the machine unwired refuses INTEGRATION/UNAVAILABLE loudly · ONE draft is worked on at a time per person (CONFLICT/FILL_DRAFT_ACTIVE naming the holder) · a document that is not yours or not on this wizard word is NOT_FOUND. A failed answer is told on the transcript (outcome failed) and the sheet stays as it was. Drafts only — nothing is created or applied. A JSON null on an optional input field reads as absent. Requires the unrestricted capability on a user session. Template class (universal staff work).
Before you call
A signed-in user’s session — the call refuses an API key (AUTHZ/FORBIDDEN).
Capability area: Work and notes — Tasks, notes, messages, dashboards and the everyday tools every staff member keeps.
Roles that may call it:
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- Cashier
What happens
It runs as you on your own draft only: the draft must be ready, at most 30 messages an hour, at most 12 exchanges per draft, and one draft at a time per person. Documents must be ones you shared for the same wizard. The assistant cannot look anything up — it asks you for facts it lacks. Nothing is created — the revised sheet is still a draft you review; the calls are charged to your group’s wallet like every assist.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
input | TalkFillDraftInput TalkFillDraftInput! | yes | The talkFillDraft input: the draft + its current revision, your message (say, 1..8192), and optionally up to 4 of your own confirmed materials on the same wizard word (their stored fact sheets compose |
Concurrency
Send the record’s current revision from your last read as revision. A stale revision is refused as CONFLICT/REVISION_STALE — read the record again and retry with the new value.
Returns
TalkFillDraftResult TalkFillDraftResult! — The talkFillDraft answer — the draft (now drafting; activeTurnId names your turn) + your turn as appended. The assistant's turn lands in the background — poll the draft or read fillDraftTurns when it is ready again.
Example request
mutation ExampleTalkFillDraft($input: TalkFillDraftInput!) {
talkFillDraft(input: $input) {
draft {
id
sysId
type
caption
status
parentId
rootId
revision
revisionNum
createdAt
updatedAt
wizardType
subjectId
brief
materialIds
filled
questions
advice
understood
turnCount
summary
summarizedThroughSeq
activeTurnId
activeTurnStartedAt
failReason
sfExecutionArn
startRequestId
startedAt
readyAt
takenAt
takenRef
expiresAt
}
}
}Variables:
{
"input": {
"id": "01900000-0000-7000-8000-37386ae00000",
"revision": "01900000-0000-7000-8000-b7960e180000",
"say": "<say>",
"materialIds": [
"01900000-0000-7000-8000-cbd54f800000"
]
}
}Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"talkFillDraft": {
"draft": {
"id": "01900000-0000-7000-8000-30ff2b9b0000",
"sysId": "FL-EXMP-0000-000F",
"type": "FillDraft",
"caption": "Blue jeans",
"status": "drafting",
"parentId": "01900000-0000-7000-8000-eacdfcfd0000",
"rootId": "01900000-0000-7000-8000-a1295a650000",
"revision": "01900000-0000-7000-8000-53c6eea90000",
"revisionNum": 1,
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"wizardType": "<wizard type>",
"subjectId": "01900000-0000-7000-8000-a07924ef0000",
"brief": "<brief>",
"materialIds": [
"01900000-0000-7000-8000-cbd54f800000"
],
"filled": "<filled>",
"questions": [
"<questions>"
],
"advice": "<advice>",
"understood": "<understood>",
"turnCount": 1,
"summary": "<summary>",
"summarizedThroughSeq": 1,
"activeTurnId": "01900000-0000-7000-8000-14dfd30c0000",
"activeTurnStartedAt": "2027-01-31T00:00:00.000Z",
"failReason": "<fail reason>",
"sfExecutionArn": "<sf execution arn>",
"startRequestId": "01900000-0000-7000-8000-353fdae00000",
"startedAt": "2027-01-31T00:00:00.000Z",
"readyAt": "2027-01-31T00:00:00.000Z",
"takenAt": "2027-01-31T00:00:00.000Z",
"takenRef": "<taken ref>",
"expiresAt": 1
}
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"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)NOT_FOUND/*— That record could not be found. Retry: no. (NOT_FOUND)CONFLICT/*— The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. (CONFLICT)VALIDATION/VERSION_REQUIRED— The request did not say which app version it came from. Retry: no. (VALIDATION)