EdgeInteract
Form Interaction
The form interaction type embeds an Atlas Form directly in the interaction inbox. The user completes and submits the form, and the response contains the full submitted form data as a JSON object. This is the primary mechanism for structured data collection in human-in-the-loop workflows.
When to Use
- Collecting additional information before a workflow can proceed
- AI output review with structured feedback fields
- Exception handling — ask a human to fill in missing or ambiguous data
- Onboarding steps that require verified user input
- Audit-required sign-off with structured attestation fields
Atlas Forms Integration
The form type uses Atlas Forms as its form engine. You define the form in the Atlas Forms designer using a formId. At runtime, EdgeInteract fetches the form schema by formId and renders it inside FormComponent. The user fills in the fields and submits — the submitted data is returned as the response payload.
Live Mockup
Vendor Onboarding — Missing Information
Request Payload Schema
interface FormPayload {
/** Atlas Forms form ID — fetched from Atlas Forms service at render time */
formId: string;
/** Optional: pre-populate form fields with known values */
initialValues?: Record<string, any>;
/** Optional: context message shown above the form */
context?: string;
}
Full Request Example
const response = await sendInteraction({
type: 'form',
targetUserId: 'usr_vendor_ops_team',
title: 'Vendor Onboarding — Missing Information',
payload: {
formId: 'vendor-onboarding-v2',
context: 'The following vendor record is missing required fields. Please complete and submit.',
initialValues: {
legalName: 'Acme Supplies Ltd', // pre-populate known values
country: 'IE'
}
},
timeoutMs: 604_800_000, // 7 days
priority: 'normal'
});
if (response.outcome === 'submitted') {
const { taxNumber, contactEmail, paymentTerms } = response.data.formData;
await vendorService.updateRecord(vendorId, { taxNumber, contactEmail, paymentTerms });
}
Response Schema
interface FormResponse {
interactionId: string;
respondedBy: string;
outcome: 'submitted';
data: {
/** The submitted form values, keyed by field name as defined in Atlas Forms */
formData: Record<string, any>;
/** Atlas Forms submission ID for traceability */
submissionId?: string;
};
timestamp: string;
}
Response Example
{
"interactionId": "int_01HXYFORM99Z",
"respondedBy": "usr_vendor_ops_alice",
"outcome": "submitted",
"data": {
"formData": {
"legalName": "Acme Supplies Ltd",
"taxNumber": "IE1234567T",
"contactEmail": "ap@acme.com",
"paymentTerms": "Net 30"
},
"submissionId": "sub_01HXYFORM_001"
},
"timestamp": "2026-05-25T11:22:10Z"
}
Validation Rules
| Field | Rule |
|---|---|
payload.formId | Required; must reference a valid, published Atlas Form |
payload.initialValues | Optional; must be a flat or nested JSON object |
response.outcome | Must be 'submitted' |
response.data.formData | Required; validated against the Atlas Form field schema |
Form Schema Validation
The
ResponseValidationHook validates that response.data.formData contains all required fields as defined in the Atlas Form schema. Required-field validation happens on the client side (form cannot be submitted incomplete), but the server re-validates on receipt.
Cancel Is Not a Response
If the user closes the form without submitting, no response is sent. The interaction remains in-flight until the timeout expires. If you need a cancel signal, use the
confirmation type instead, or add a "I cannot complete this" option using a custom field in the Atlas Form.