Exposing your data to flows through the module namespace.
A data accessor lets a flow read your module’s data without ever copying it into
session state. The flow asks for module.hr.department; the engine resolves it
through the accessor registered under the namespace hr.
The contract
interface DataAccessorInterface{ /** Namespace of this accessor, e.g. "hr". Maps to module.{namespace}.* */ public function namespace(): string; /** @return mixed scalar or null; must not return objects */ public function get(string $key, string $contactId, string $tenantId): mixed; /** @return string[] Supported keys, used to validate a flow on save */ public function supportedKeys(): array;}
Register it from your service provider. Core does not yet implement
CoreRegistrarInterface (see Building a Plugin), so this
call has no effect in Core today:
protected function registerExtensions(CoreRegistrarInterface $registrar): void{ $registrar->registerDataAccessor('hr', HrDataAccessor::class);}
Why this exists
A condition node must never read module tables directly.
If HR data were read straight from its tables by the flow engine, the engine would
have to know the module’s schema — and every schema change would become a flow
engine change. If it were copied into session state instead, every running session
would carry a snapshot that was correct when the session started and wrong an hour
later.Resolving through an accessor avoids both. The module stays the single source of
truth, the engine stays ignorant of its tables, and the flow always sees current
data.
Implementation notes
Return scalars or null. The accessor sits on a boundary that has to serialise;
returning an object pushes your internal shape into the engine.supportedKeys() is meant as validation, not documentation. Core does not call
it today: when a flow is saved, it only checks that an accessor exists for the
namespace (unknown_module_accessor), not that the key is supported. Keep it
accurate so that key-level validation can rely on it.get() is called during execution. It is on the hot path for any flow that
branches on your data. Keep it cheap, and remember it receives the contact and
tenant it is being asked about — it must not read anything outside that tenant.The accessor belongs to the module, not to Core. Core provides the registry;
you provide the answer.See also State namespaces for how
module.* differs from the namespaces a handler may write.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"FaPost","description":"Conversational assistants and flow automation platform.","colors":{"primary":"#5a6e58","light":"#94a187","dark":"#3f4f3d"},"favicon":"https://mintcdn.com/fapost/dkK02WohiwWLokiz/favicon.svg?fit=max\u0026auto=format\u0026n=dkK02WohiwWLokiz\u0026q=85\u0026s=f3739e1cf80934093fb16564881363f9","background":{"color":{"light":"#f5f4f1","dark":"#131211"}},"navbar":{"links":[{"href":"https://github.com/fapost-lab/core","type":"github"}]},"footer":{"socials":{"github":"https://github.com/fapost-lab/core","website":"https://fapost.in"}},"fonts":{"family":"DM Sans"},"styling":{"codeblocks":{"theme":"one-dark-pro"},"latex":false},"banner":{"content":"FaPost is pre-1.0 and this documentation is still being written. Sections say where they are incomplete.","dismissible":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"fapost","hasAudioNarration":false,"actualSubdomain":"fapost","customDomains":["docs.fapost.in"],"gitSource":{"type":"github","owner":"fapost-lab","repo":"core","deployBranch":"main","contentDirectory":"docs/site","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6b074ff41a35d39c8c78521c","clientVersion":"0.0.4330","searchFilterCounts":[{"language":"default","tag":"Developers","count":35},{"language":"default","tag":"User guide","count":35},{"language":"default","tag":"Self-hosting","count":15},{"language":"default","tag":"Admin panel","count":11},{"language":"default","tag":"Flows","count":9},{"language":"default","tag":"Reference","count":8},{"language":"default","tag":"Operate","count":7},{"language":"default","tag":"Core internals","count":6},{"language":"default","tag":"Development environment","count":5},{"language":"default","tag":"Contributing to Core","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"#content.mdx-content h2{font-size:1.75rem;line-height:1.25;letter-spacing:-0.02em;margin-top:4rem;padding-top:2rem;border-top:1px solid rgb(23 23 23 / 12%)}.dark #content.mdx-content h2{border-top-color:rgb(255 255 255 / 12%)}#content.mdx-content h2:first-child{margin-top:1rem;padding-top:0;border-top:0}#content.mdx-content h3{font-size:1.3125rem;line-height:1.35;letter-spacing:-0.01em;margin-top:2.75rem}#content.mdx-content h4{font-size:1.0625rem;line-height:1.4;margin-top:2rem;color:rgb(82 82 82)}.dark #content.mdx-content h4{color:rgb(163 163 163)}@media (max-width: 639px){#content.mdx-content h2{font-size:1.5rem;margin-top:3rem;padding-top:1.5rem}#content.mdx-content h3{font-size:1.1875rem;margin-top:2.25rem}}"}]}
{"page":{"pagePath":"extending/data-accessors","slug":"/extending/data-accessors","pageMetadata":{"title":"Data accessors","description":"Exposing your data to flows through the module namespace.","href":"/extending/data-accessors"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Exposing your data to flows through the module namespace.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`A data accessor lets a flow read your module’s data without ever copying it into\nsession state. The flow asks for `,_jsx(_components.code,{children:`module.hr.department`}),`; the engine resolves it\nthrough the accessor registered under the namespace `,_jsx(_components.code,{children:`hr`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-contract`,children:`The contract`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes one-dark-pro one-dark-pro`,style:{backgroundColor:`#282c34`,\"--shiki-dark-bg\":`#282c34`,color:`#abb2bf`,\"--shiki-dark\":`#abb2bf`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:`interface`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:` DataAccessorInterface`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#7F848E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#7F848E`,\"--shiki-dark-font-style\":`italic`},children:` /** Namespace of this accessor, e.g. \"hr\". Maps to module.{namespace}.* */`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` public`}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` function`}),_jsx(_components.span,{style:{color:`#61AFEF`,\"--shiki-dark\":`#61AFEF`},children:` namespace`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`():`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:` string`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#7F848E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#7F848E`,\"--shiki-dark-font-style\":`italic`},children:` /** `}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#C678DD`,\"--shiki-dark-font-style\":`italic`},children:`@return`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#E5C07B`,\"--shiki-dark-font-style\":`italic`},children:` mixed`}),_jsx(_components.span,{style:{color:`#7F848E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#7F848E`,\"--shiki-dark-font-style\":`italic`},children:` scalar or null; must not return objects */`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` public`}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` function`}),_jsx(_components.span,{style:{color:`#61AFEF`,\"--shiki-dark\":`#61AFEF`},children:` get`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`(`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:`string `}),_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:`$key`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`,`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:` string `}),_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:`$contactId`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`,`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:` string `}),_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:`$tenantId`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`):`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:` mixed`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#7F848E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#7F848E`,\"--shiki-dark-font-style\":`italic`},children:` /** `}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#C678DD`,\"--shiki-dark-font-style\":`italic`},children:`@return`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#E5C07B`,\"--shiki-dark-font-style\":`italic`},children:` string[]`}),_jsx(_components.span,{style:{color:`#7F848E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#7F848E`,\"--shiki-dark-font-style\":`italic`},children:` Supported keys, used to validate a flow on save */`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` public`}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` function`}),_jsx(_components.span,{style:{color:`#61AFEF`,\"--shiki-dark\":`#61AFEF`},children:` supportedKeys`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`():`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:` array`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Register it from your service provider. Core does not yet implement\n`,_jsx(_components.code,{children:`CoreRegistrarInterface`}),` (see `,_jsx(_components.a,{href:`/extending/plugins`,children:`Building a Plugin`}),`), so this\ncall has no effect in Core today:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes one-dark-pro one-dark-pro`,style:{backgroundColor:`#282c34`,\"--shiki-dark-bg\":`#282c34`,color:`#abb2bf`,\"--shiki-dark\":`#abb2bf`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:`protected`}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` function`}),_jsx(_components.span,{style:{color:`#61AFEF`,\"--shiki-dark\":`#61AFEF`},children:` registerExtensions`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`(`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:`CoreRegistrarInterface`}),_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:` $registrar`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`): `}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:`void`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:` $registrar`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`->`}),_jsx(_components.span,{style:{color:`#61AFEF`,\"--shiki-dark\":`#61AFEF`},children:`registerDataAccessor`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`(`}),_jsx(_components.span,{style:{color:`#98C379`,\"--shiki-dark\":`#98C379`},children:`'hr'`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`, `}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:`HrDataAccessor`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`::`}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:`class`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`why-this-exists`,children:`Why this exists`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`A condition node must never read module tables directly.`})}),`\n`,_jsx(_components.p,{children:`If HR data were read straight from its tables by the flow engine, the engine would\nhave to know the module’s schema — and every schema change would become a flow\nengine change. If it were copied into session state instead, every running session\nwould carry a snapshot that was correct when the session started and wrong an hour\nlater.`}),`\n`,_jsx(_components.p,{children:`Resolving through an accessor avoids both. The module stays the single source of\ntruth, the engine stays ignorant of its tables, and the flow always sees current\ndata.`}),`\n`,_jsx(Heading,{level:`2`,id:`implementation-notes`,children:`Implementation notes`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Return scalars or null.`}),` The accessor sits on a boundary that has to serialise;\nreturning an object pushes your internal shape into the engine.`]}),`\n`,_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`supportedKeys()`}),` is meant as validation, not documentation.`]}),` Core does not call\nit today: when a flow is saved, it only checks that an accessor exists for the\nnamespace (`,_jsx(_components.code,{children:`unknown_module_accessor`}),`), not that the key is supported. Keep it\naccurate so that key-level validation can rely on it.`]}),`\n`,_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`get()`}),` is called during execution.`]}),` It is on the hot path for any flow that\nbranches on your data. Keep it cheap, and remember it receives the contact and\ntenant it is being asked about — it must not read anything outside that tenant.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The accessor belongs to the module, not to Core.`}),` Core provides the registry;\nyou provide the answer.`]}),`\n`,_jsxs(_components.p,{children:[`See also `,_jsx(_components.a,{href:`/extending/flow-nodes/state-namespaces`,children:`State namespaces`}),` for how\n`,_jsx(_components.code,{children:`module.*`}),` differs from the namespaces a handler may write.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":"one-dark-pro"},"config":{},"pageMetadata":{"title":"Data accessors","description":"Exposing your data to flows through the module namespace.","href":"/extending/data-accessors"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"The contract","slug":"the-contract","depth":2,"children":[]},{"title":"Why this exists","slug":"why-this-exists","depth":2,"children":[]},{"title":"Implementation notes","slug":"implementation-notes","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"fapost","siteName":"FaPost","title":"Data accessors - FaPost","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-05T14:34:54.108Z","originalFileLocation":"extending/data-accessors.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Exposing your data to flows through the module namespace.\">\u003cmeta data-mint-head name=\"application-name\" content=\"FaPost\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Data accessors - FaPost\">\u003cmeta data-mint-head property=\"og:description\" content=\"Exposing your data to flows through the module namespace.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"FaPost\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.fapost.in/extending/data-accessors\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://fapost.mintlify.site/_mintlify/api/og/v2?division=Extension+surfaces\u0026amp;title=Data+accessors\u0026amp;description=Exposing+your+data+to+flows+through+the+module+namespace.\u0026amp;theme=baf5a1f6c1a967e68ab29869\u0026amp;signature=1cdae0648ca2fe4f19f801620b95580a9ba02270a99e3d8a742b06afc6403fd1\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Data accessors - FaPost\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Exposing your data to flows through the module namespace.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://fapost.mintlify.site/_mintlify/api/og/v2?division=Extension+surfaces\u0026amp;title=Data+accessors\u0026amp;description=Exposing+your+data+to+flows+through+the+module+namespace.\u0026amp;theme=baf5a1f6c1a967e68ab29869\u0026amp;signature=1cdae0648ca2fe4f19f801620b95580a9ba02270a99e3d8a742b06afc6403fd1\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"FaPost\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5a6e58\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.fapost.in/extending/data-accessors\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/extending/data-accessors.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.fapost.in/#organization\",\"name\":\"FaPost\",\"url\":\"https://docs.fapost.in\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.fapost.in#website\",\"name\":\"FaPost\",\"url\":\"https://docs.fapost.in\",\"publisher\":{\"@id\":\"https://docs.fapost.in/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.fapost.in/extending/data-accessors#webpage\",\"url\":\"https://docs.fapost.in/extending/data-accessors\",\"name\":\"Data accessors\",\"description\":\"Exposing your data to flows through the module namespace.\",\"dateModified\":\"2026-10-05T14:34:54.108Z\",\"isPartOf\":{\"@id\":\"https://docs.fapost.in#website\"},\"breadcrumb\":{\"@id\":\"https://docs.fapost.in/extending/data-accessors#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.fapost.in/extending/data-accessors#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Extension surfaces\",\"item\":\"https://docs.fapost.in/extending/builder-ui\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Data accessors\",\"item\":\"https://docs.fapost.in/extending/data-accessors\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.fapost.in/extending/data-accessors#article\",\"headline\":\"Data accessors\",\"name\":\"Data accessors\",\"description\":\"Exposing your data to flows through the module namespace.\",\"url\":\"https://docs.fapost.in/extending/data-accessors\",\"mainEntityOfPage\":{\"@id\":\"https://docs.fapost.in/extending/data-accessors#webpage\"},\"dateModified\":\"2026-10-05T14:34:54.108Z\",\"publisher\":{\"@id\":\"https://docs.fapost.in/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.fapost.in#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"FaPost\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"FaPost\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/extending/data-accessors.md","siteName":"FaPost","nav":{"global":null,"tabs":[{"tab":"User guide","pages":[{"title":"User guide","href":""}]},{"tab":"Self-hosting","pages":[{"title":"Self-hosting","href":"/self-hosting/overview"}]},{"tab":"Developers","groups":[{"group":"Overview","pages":[{"title":"For developers","href":"/contributing/overview"},{"title":"Technology stack","href":"/contributing/stack"}]},{"group":"Development environment","pages":[{"title":"Local setup","href":"/contributing/local-setup"},{"title":"Receiving webhooks locally","href":"/contributing/local-webhooks"},{"title":"Repository layout","href":"/contributing/repo-layout"},{"title":"Coding conventions","href":"/contributing/conventions"},{"title":"Coding agents and Jig","href":"/contributing/coding-agents"}]},{"group":"Extension model","pages":[{"title":"Extension model","href":"/extending/extension-model"},{"title":"Choosing an extension type","href":"/extending/choosing-an-extension-type"}]},{"group":"Building extensions","pages":[{"title":"Development setup","href":"/extending/development-setup"},{"title":"Building a Solution","href":"/extending/solutions"},{"title":"Connectors","href":"/extending/connectors"},{"title":"Building a Plugin","href":"/extending/plugins"}]},{"group":"Flow nodes","pages":[{"title":"Handler contract","href":"/extending/flow-nodes/handler-contract"},{"title":"Versioning and compatibility","href":"/extending/flow-nodes/versioning"},{"title":"State namespaces","href":"/extending/flow-nodes/state-namespaces"},{"title":"Idempotency and retries","href":"/extending/flow-nodes/idempotency"}]},{"group":"Extension surfaces","pages":[{"title":"Builder UI extensions","href":"/extending/builder-ui"},{"title":"Console UI","href":"/extending/console-ui"},{"title":"Channel contracts","description":"The Foundation contracts a messaging channel implements, with Telegram and Slack as references.","href":"/extending/channel-drivers"},{"title":"Data accessors","href":"/extending/data-accessors"},{"title":"Multilingual extensions","description":"Translating what your extension shows to end users.","href":"/extending/multilingual"}]},{"group":"Shipping an extension","pages":[{"title":"Testing your extension","href":"/extending/testing"},{"title":"Stability policy","href":"/extending/stability-policy"}]},{"group":"Core internals","pages":[{"title":"Runtime architecture","href":"/contributing/runtime"},{"title":"Tenant-aware execution","href":"/contributing/tenant-aware-execution"},{"title":"Migration isolation","href":"/contributing/migration-isolation"},{"title":"Long-lived worker safety","href":"/contributing/worker-safety"},{"title":"ID strategy","href":"/contributing/id-strategy"},{"title":"Dependency direction","href":"/contributing/dependency-direction"}]},{"group":"Contributing to Core","pages":[{"title":"Testing and architecture checks","href":"/contributing/testing"},{"title":"Commit messages","href":"/contributing/commits"},{"title":"Pull requests","href":"/contributing/pull-requests"},{"title":"Releases and versioning","href":"/contributing/releases"},{"title":"Licence, CLA and trademark","href":"/contributing/legal"}]}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/reference/foundation-contracts"}]}]},"basePath":"","title":"Data accessors - FaPost","deploymentId":"dpl_GvkCDNzSMF8rzjWibcqz4RHGyof6","buildId":"dpl_GvkCDNzSMF8rzjWibcqz4RHGyof6","dynamics":[],"chunks":[]}