On this page
takeFillDraft
mutation · in the family Work and notes
What it does
Mark one of your ready wizard drafts as taken — the record you created from it is born, and the draft is its history now.
Take ONE of YOUR READY wizard drafts into a record: the office fires it AFTER the wizard's create lands — the moment the sheet was consumed; ready → taken SET ONCE with takenAt stamped. Another state refuses CONFLICT/REF_STATE naming it (a second take is that refusal; an expired draft refuses too); another person's draft, or none at all, is NOT_FOUND. A taken draft stays in your list as history until its lifetime ends and takes no more messages. Nothing is created here — the record was born by its own wizard. 🤖: takenRef (optional, 1..64) names the record the draft became — its sysId or its id — and rides the same flip (a malformed reference refuses VALIDATION/INVALID before anything is read). Requires the unrestricted capability on a USER session. Template class.
What happens
It runs as you on your own draft only: the draft must be ready and not past its lifetime; once taken it takes no more messages and cannot be taken again. Nothing is created here — the wizard already created the record. The draft stays in your list until its lifetime ends.
Who may call it
Capability area: Work and notes — Tasks, notes, messages, dashboards and the everyday tools every staff member keeps.
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- Cashier
- An API key whose scope allows
api:takeFillDraft
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
id | ID ID! | yes | The id of the record. |
takenRef | String | no | No further notes. |
Returns
FillDraft FillDraft! — One background wizard draft (🤖 — slice): YOUR text and/or documents in, a drafted sheet across EVERY page of the walk out — in the background (the assistant thinks at its highest effort; the machine polls every 8 s inside a 480 s wall). The sheet (pages · questions · advice · understood) is ABSENT until status ready; failReason is present on failed. DRAFTS ONLY — nothing is created or applied; you review every value. expiresAt = the draft's lifetime in epoch seconds (startedAt + 30 days).
Example request
mutation ExampleTakeFillDraft($id: ID!, $takenRef: String) {
takeFillDraft(id: $id, takenRef: $takenRef) {
id
sysId
type
caption
status
parentId
rootId
revision
revisionNum
createdAt
updatedAt
wizardType
brief
materialIds
filled
questions
advice
understood
turnCount
summary
summarizedThroughSeq
activeTurnId
activeTurnStartedAt
failReason
sfExecutionArn
startRequestId
startedAt
readyAt
takenAt
takenRef
expiresAt
}
}
Variables:
{
"id": "01900000-0000-7000-8000-37386ae00000",
"takenRef": "<taken ref>"
}
Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"takeFillDraft": {
"id": "01900000-0000-7000-8000-37386ae00000",
"sysId": "FL-EXMP-0000-000F",
"type": "FillDraft",
"caption": "Blue jeans",
"status": "drafting",
"parentId": "01900000-0000-7000-8000-065235280000",
"rootId": "01900000-0000-7000-8000-a093dd800000",
"revision": "01900000-0000-7000-8000-b7960e180000",
"revisionNum": 1,
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"wizardType": "<wizard type>",
"brief": "<brief>",
"materialIds": [
"01900000-0000-7000-8000-a36392ca0000"
],
"filled": "<filled>",
"questions": [
"<questions>"
],
"advice": "<advice>",
"understood": "<understood>",
"turnCount": 1,
"summary": "<summary>",
"summarizedThroughSeq": 1,
"activeTurnId": "01900000-0000-7000-8000-770cb7810000",
"activeTurnStartedAt": "2027-01-31T00:00:00.000Z",
"failReason": "<fail reason>",
"sfExecutionArn": "<sf execution arn>",
"startRequestId": "01900000-0000-7000-8000-c154ec1d0000",
"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. (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)NOT_FOUND/*— That record could not be found. (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. (VALIDATION)