Skip to Content

Schema Reference

This page documents the serialized schemas used by Applied when passing data into workflows (Flows), tools, and event logs.

Conventions

  • All IDs are UUID strings unless otherwise noted.
  • All timestamps are ISO 8601 strings (UTC) when present.
  • Many fields are optional and may be null depending on the channel, integration, and whether a conversation is assigned/resolved.

Conversation

Shape

{ "id": "8b2dbb9c-0e62-4d5e-9a4c-0b4a5c5f6c2d", "model": "Conversation", "type": "web_chat", "title": "Where is my order?", "summary": "Customer asked for a tracking update.", "flags": ["2a54c2e6-6f2d-4d5f-9f22-6ce6f1f5a4f0"], "label": { "id": "c4b7c6df-6b7f-4f76-8d2d-1a8c1f0f1d1b", "name": "Shipping" }, "sublabel": { "id": "4fa3f5b6-14e2-4a9b-9f4b-2c3d4e5f6a7b", "name": "Tracking" }, "user": { "id": "0de1d9f0-2cc9-4d38-9a6e-5e0edcb8c2c1", "display_name": "Alex", "email": "alex@example.com" }, "metadata": { "context": { "email": "alex@example.com", "firstName": "Alex" }, "groups": ["vip"], "data": { "plan": "pro" }, "source": "chat_widget", "platform": "web" }, "start_time": "2026-01-26T18:12:54Z", "resolved_at": null, "escalation_time": null, "remote_id": "12345", "remote_platform": "slack" }

Fields

FieldTypeDescription
idstringConversation ID.
modelstringAlways "Conversation".
typestringChannel/modality. Common values: web_chat, email, sms, phone_call, web_call, web_call_demo, comments, form.
titlestring | nullOptional title.
summarystringOptional/derived summary text.
flagsstring[]UUIDs for flag choices attached to the conversation.
label{ id: string, name: string } | nullTopic (a PropertyChoice).
sublabel{ id: string, name: string } | nullIntent (a PropertyChoice).
userUserRef | nullHuman assignee/owner (when applicable).
metadataobjectFreeform JSON object. See Metadata.
start_timestring | nullWhen the conversation started.
resolved_atstring | nullWhen the conversation was resolved.
escalation_timestring | nullWhen the conversation was escalated.
remote_idstring | nullExternal platform conversation ID.
remote_platformstring | nullExternal platform name (varies by integration).

Message

Shape

{ "id": "b71b2f8d-5a27-4f0b-8c2b-19e9e0ed3b5a", "model": "Message", "content": "<p>Hi — your order is on the way.</p>", "text": "Hi — your order is on the way.", "formatted_content": "Agent: Hi — your order is on the way." }

Fields

FieldTypeDescription
idstringMessage ID.
modelstringAlways "Message".
contentstringMessage body (often HTML or Markdown, depending on channel).
textstringPlain-text version of the message.
formatted_contentstringReadable rendering (typically includes sender + text).

Users

UserRef

This is the user shape embedded inside other payloads (for example, on a conversation as the assignee).

{ "id": "0de1d9f0-2cc9-4d38-9a6e-5e0edcb8c2c1", "display_name": "Alex", "email": "alex@example.com" }
FieldTypeDescription
idstringUser ID.
display_namestringName shown in the UI.
emailstring | nullEmail address (may be unset).

Core user fields

The underlying User model includes additional fields such as: username, phone, description, profile_picture, and boolean flags like is_active and is_staff.

Metadata

Metadata is stored as JSON on both Conversations and Messages (and can also be passed into tools/connectors as a JSON string).

Common conversation.metadata keys

These keys are used frequently, but metadata is not strictly limited to them:

KeyTypeMeaning
contextobjectCustomer/contact context (identity and enrichment).
groupsstring[]Group labels associated with the contact.
dataobjectFreeform, conversation-scoped payload.
sourcestringWho/what created the conversation (varies by channel).
platformstringPlatform identifier (varies by integration).
stateobjectInternal workflow/runtime state (used by conversational flows).

Metadata string parsing (coerce)

When a tool argument expects “metadata”, Applied accepts several input formats and normalizes them into an object or array:

  • Strict JSON: {"a": 1} or [1, 2, 3]
  • Lenient JSON: supports // comments, /* ... */ comments, and trailing commas
  • Python-literal style: {'a': 1, 'b': True, 'c': None}
  • Base64-encoded JSON: base64 of a JSON object/array
  • Query string: a=1&b=true&user.name=alice (supports dotpath nesting)
  • Key/value lines: a=1\\nb: true\\nname='bob'
  • Comma-separated pairs: a=1, b:false, c:3.2
  • Simple lists: a,b,c["a", "b", "c"]

Scalar coercions in query/key-value formats:

  • true/false/yes/no → booleans
  • integers and floats → numbers
  • null/nonenull
Last updated on