create and mount.md
Documentation Index
Fetch the complete documentation index at: https://filecheck.io/docs/llms.txt Use this file to discover all available pages before exploring further.
Create & mount
The Filecheck factory, the intake element, its create options, and its methods.
Create the factory
const fc = Filecheck('pk_live_…', {
agentId: 'agt_…', // optional sub-tenant scope
// iframeSrc: '…', // staging/dev override only
});
[!NOTE]
agentId(sub-tenant scope). Pass anagentId(agt_…) to scope the Element to a specific sub-tenant under your account — useful when one account serves multiple stores or brands. Leave it out to use your account default. The e-commerce plugins expose it as an optional setting.TODO(filecheck): define what an agent/sub-tenant is, when to use one, and where to obtain an
agentIdin the dashboard.
Create an intake element
const intake = fc.elements.create('intake', {
workflowId: 'wf_…', // required unless resuming with jobId
presentation: 'inline', // 'inline' (default) | 'dialog'
});
Create options
workflowId string
The Workflow to run. Required unless jobId is provided.
jobId string
Resume an existing job. When set, workflowId is ignored.
presentation 'inline' | 'dialog' (default: inline)
Render inline in the page flow, or behind a trigger button as a dialog.
artworkTiming 'checkout' | 'either' | 'after_order' (default: checkout)
When the product collects its artwork. With 'either' the upload is optional; with 'after_order' the Element shows a note instead of an upload box. Both report status: 'idle' with canProceed: true before any upload, so a gated Add to cart stays enabled, and the artwork is collected after the order. See Artwork after checkout.
locale string
Locale for the widget UI, for example en-US.
connector object
Map file facts onto your product-page controls. See Connectors.
connectorId string
Resolve a connector server-side by id (cntr_…).
ui object
UI overrides: title, subtitle, theme, accent, layout, showHeader, submitLabel, autoSubmit, and more.
Methods
intake.mount('#fc-slot'); // or .mount(htmlElement)
intake.update({ workflowId: 'wf_…', ui: { theme: 'dark' } });
intake.focus(); // open a dialog/drawer layout programmatically
intake.blur();
intake.respondToProof(true); // approve a soft-proof gate
intake.setConnector({ /* … */ }); // replace the active connector
intake.applyNow(); // re-run the connector against the last facts
intake.unmount();
[!NOTE]
intake.on(...)returns an unsubscribe function. See Events.
This documentation is built and hosted on Mintlify, a developer documentation platform.