Portal Community

How It Works

The FormComponent integrates directly with Atlas Forms via the FormRenderer from the player-components-react package. When the interaction is received:

1

Payload Contains formId

The payload carries the Atlas Form ID and any pre-fill data. The FormComponent passes these to FormRenderer.

2

FormRenderer Loads the Form

FormRenderer fetches the form schema from the Atlas Forms API by formId and renders the fully interactive form with all fields, validation, and layout.

3

User Submits — Response Contains Field Data

On form submission, FormComponent calls respond("submitted", formData) where formData is an object mapping field keys to values.

Form Payload Schema

interface FormPayload {
  /** Atlas Form ID — the form schema to render */
  formId: number;

  /** Pre-fill values — mapped to form field keys */
  initialValues?: Record<string, unknown>;

  /** Submit button label (default: "Submit") */
  submitLabel?: string;

  /** Cancel button label (default: "Cancel") */
  cancelLabel?: string;
}

Response Schema

// Outcome: "submitted"
// Data: all submitted form field values
interface FormResponseData {
  [fieldKey: string]: unknown;
}

// Example response data
{
  "recipientName": "Jane Smith",
  "country": "US",
  "address": "123 Main St",
  "city": "Springfield",
  "postalCode": "62701"
}

Server-Side Usage

// Server — send a form interaction
var request = new InteractionRequest {
  Type = InteractionTypes.Form,
  TargetUserId = userId,
  Title = "Enter Shipping Details",
  Description = "Please provide the shipping address for this order.",
  Payload = new FormPayload {
    FormId = 13042, // Atlas Form ID for "Shipping Address Form"
    InitialValues = new Dictionary<string, object> {
      { "recipientName", currentUser.FullName },
      { "country", "US" }
    },
    SubmitLabel = "Save Shipping Details"
  },
  TimeoutMs = 600_000 // 10 minutes
};

var response = await _publisher.PublishAndWaitAsync(request, ct);

if (response.Outcome == "submitted")
{
    var shippingData = response.Data?.Deserialize<Dictionary<string, object>>();
    await _orderService.SetShippingAddressAsync(orderId, shippingData, ct);
}

Form Validation

Atlas Form validation rules (required fields, format validation, conditional fields) are enforced by the FormRenderer on the client side. The form cannot be submitted until all validation rules pass. The FormComponent does not send the response until the form submission event fires from FormRenderer.

FormId Must Exist The formId must reference an active Atlas Form in the current tenant. If the form does not exist or is archived, FormRenderer will fail to load and the interaction will show an error state to the user.

Form Interaction vs. Atlas Form Player

FeatureForm Interaction (EdgeInteract)Atlas Form Player (standalone)
Triggered byServer-side workflow or agentUser navigating to a form URL
Response destinationEdgeInteract callback topicForm submission handler / API
TimeoutYes — interaction timeoutNo
Awaitable on serverYesNo (async via webhook)
Audit trailEdgeInteract audit hookAtlas Forms submission log