JSON payload schema

Developer

The structure returned when format is json. Same assembly as markdown, encoded for programmatic consumers.

NOTE

The schema is versioned 0.1-beta. Read schemaVersion if you parse it in production — it becomes additive-only once stable.


Top level

One assembled record, from Entity.load or Get Records.

KeyTypeAlways?What it is
schemaVersionstringyes"0.1-beta"
entitystringyesThe entity’s API name
entityLabelstringyesThe entity’s label — "Account 360". null when the object has no entity and the payload came from fallbacks
objectstringyesThe object API name
objectLabelstringyesThe object’s label — "Account", or "Widget" where Widget__c is named differently
recordIdstringyesThe record assembled
levelstringyeslist · standard · detailed
instructionstringif setThe entity-level instruction
foundbooleanonly when falsePresent and false when the record wasn’t found or wasn’t visible. A payload carrying it has no record sections
fieldsarraywhen foundCurated fields. Present whenever the record is, even as []
metricsarrayif anyMetric and formula values
enrichmentarrayif anyEnrichment output, grouped by element
relatedListsarrayif anyChild record tables
referencesarrayif anyEmbedded parent records
notesarray of stringif anyAssembly warnings
computedContextobjectif onThe standing context — see below. Off when the org switch is
briefsarrayif anyThe briefs the domain injects. Only on a call that names a domain
infoarray of stringif anyThe Info lines the domain carries, one summary each. Only on a call that names a domain. In the catalog this is an array of objects instead, one per Info, each carrying its summary
markdownstringwhen format is bothThe same assembly rendered as markdown, inside the same envelope

An empty section is left out: an entity with no metrics carries no metrics key. A key can also be present and null, so test for a value rather than for the key.

computedContext, briefs and info describe the caller’s situation rather than the record. A record set carries them once for the whole set.

fields

{ "path": "Industry", "label": "Industry", "type": "picklist", "value": "Media",
  "instruction": "Verticals, not SIC codes." }
KeyNotes
pathField API name. Cross-object fields use dot notation — Owner.Name
labelWhat the agent should call the field — the entity’s own label where one is declared, otherwise the Salesforce label. Absent for cross-object paths. path always carries the API name, which is what filters and writes accept
typeSalesforce field type, lowercased. Absent for cross-object paths
valueTyped — numbers as numbers, booleans as booleans, null when empty. Never null for a field the caller can’t read
instructionPresent only when one is set
absentA field the caller can’t read is absent from the array entirely, with no marker. So is a field the entity doesn’t curate at this level — the payload doesn’t say which → Security

Order is the curated picker order — the same order markdown renders in. → Order

metrics

{ "label": "Open Pipeline", "value": 40000,
  "instruction": "Open, unweighted. Excludes closed-lost." }

Metrics and formulas both land here, each a labeled computed value. A failed element drops out of the array; the failure appears on Issues, and in notes.

enrichment

Grouped by element, because one source can return several items:

[{ "group": "Engagement Signals",
   "items": [
     { "label": "Last Activity", "value": "2026-07-14" },
     { "label": "Open Tasks", "value": 0 },
     { "label": "Stage History", "markdown": "- Prospecting → Discovery (12 days)" },
     { "label": "Stalled Deals", "object": "Opportunity", "objectLabel": "Opportunity",
       "columns": ["Name", "Amount", "StageName"], "truncated": false,
       "records": [{ "Id": "006...", "Name": "Renewal", "Amount": 25000, "StageName": "Proposal" }] }
   ]}]

Three item shapes, distinguished by which key is present:

ShapeKey
Valuevalue
Blockmarkdown — pre-rendered
Recordsrecords, with object, objectLabel, columns, truncated

relatedLists

{ "label": "Open Opportunities", "object": "Opportunity", "objectLabel": "Opportunity",
  "columns": ["Name", "Amount", "StageName", "CloseDate"],
  "truncated": false,
  "records": [
    { "Id": "006...", "Name": "Q3 Expansion", "Amount": 25000,
      "StageName": "Proposal", "CloseDate": "2026-09-30" }
  ]}
KeyNotes
labelThe list’s label on the entity
object / objectLabelThe child object’s API name and label
columnsThe child entity’s curated list fields
recordsEvery row carries Id plus those columns
truncatedtrue when more rows matched than the list’s max-rows cap — the list is a sample, not the whole set

references

An embedded parent record, using the same shape as the top level:

{ "label": "Account", "viaField": "AccountId",
  "object": "Account", "objectLabel": "Account", "recordId": "001...", "level": "standard",
  "fields": [ ... ], "metrics": [ ... ] }

viaField names the lookup ContextWorks followed to reach it. References nest one level only: an embedded record never carries its own references.

A curated reference with an empty lookup still appears:

{ "label": "Parent Account", "viaField": "ParentId", "missing": true }

missing: true means there is no parent record — the lookup is empty, not unfetched — so don’t query again for one.

notes

One string per warning: an element used where it doesn’t apply, a relationship that couldn’t resolve. A payload that carries notes every time usually has a configuration issue, and Issues aggregates them.

computedContext

The standing context, as an object: the same facts the markdown header line carries. Its org switch sits on the Behavior settings page. → Settings

KeyWhat it is
todayToday’s date, in the caller’s time zone
nowAssembly time, which doubles as the data as-of time
timeZoneThe caller’s time zone ID
dayOfWeekToday’s day name — "Tuesday"
fiscalPeriodThe current fiscal period’s label — "FY 2027 Q2"
fiscalPeriodStart · fiscalPeriodEndThe period’s first and last dates
fiscalYearStartThe fiscal year’s first date
daysRemainingDays from today to fiscalPeriodEnd
customFiscaltrue when the org runs a custom fiscal calendar

Find results

Entity.find and Find Records return a set shape instead:

KeyAlways?What it is
schemaVersionyes"0.1-beta"
entity / objectyesThe entity and object API names, as at top level
levelyesAlways "query" — the set shape has no field levels
totalCountyesRows matching the filters — the full set, not the page
returnedyesRows in this response
columnsyesThe entity’s curated fields at the level asked for, list by default
recordsyesThe rows, each carrying Id plus those columns
totalsif anySums over the full matching set: field label → formatted total, as a string
computedContextif onThe standing context, the same object as above
availableNamedFiltersif anyNamed filters this entity defines that the call didn’t use
requestedRows / notesonly when cappedPresent when maxRows exceeded the org’s page-size cap: what was asked for, and a note naming the cap
briefs / infoif anyThe frame, on a call that names a domain
markdownwhen format is bothThe same set rendered as markdown

totalCount and totals cover the full matching set, so a capped query still answers “how many” and “how much” correctly.

Grouped results

groupBy or aggregate returns groups instead of rows, in a shape of its own — and with no schemaVersion.

KeyAlways?What it is
objectyesThe object API name
entityyesThe entity’s label, not its API name
aggregateyesThe measure, echoed back — "sum(Amount)", or "count"
totalyes{ "count": …, "measure": … } over the full matching set
computedContextif onThe standing context as a rendered line, not an object
currencywhen convertedThe currency the measures were converted to
groupBywith groupByThe field grouped on
totalGroups / groupsTruncatedwith groupByDistinct values matched, and whether the group cap cut the list
groupswith groupByOne entry per group: value, count, measure, plus records when you asked for samples
sampledGroupswhen samples were cutHow many groups got sample records
markdownwhen format is bothThe same summary rendered as markdown

Record sets

Entity.loadMany wraps the record payloads in one envelope, so the response parses as a single document:

KeyAlways?What it is
schemaVersionyes"0.1-beta"
requested / returnedyesIDs you passed, and records in records
truncatedyestrue when the request ran past the set cap
recordsyesOne top-level payload per record
errorsyesOne line per ID that couldn’t load — the ID, then the reason
computedContext / briefs / infoif anyThe frame, once for the set
markdownwhen format is bothEvery record’s markdown under one frame

Best practices

  • Check schemaVersion. It’s beta.
  • Check for key presence, not length. Empty sections are left out.
  • Look values up by path, not position. fields order is the curated order, and an admin can change it.
  • Treat found: false as one outcome. Not found and not visible are deliberately indistinguishable from outside.

What’s next