> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.carewithemma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Emma Architecture: Data Flow and System Integration

> See how events, context, and outcomes flow between your existing technology stack, Emma's AI workflows, and your systems of record.

Emma sits between your existing systems and your patients. When a system event occurs, Emma receives context, runs the appropriate workflow, and writes the outcome back to the correct system of record. Your platforms stay in place — Emma adds a coordinated AI engagement layer on top of them without requiring you to change how your clinical or operational stack is built.

## Your systems stay in control

Emma integrates with the following system types, consuming the context each platform provides and returning the outcomes each workflow produces.

| System | How Emma uses it | Example |
| - | - | - |
| EMR / EHR | Receives patient and encounter context; returns clinical outcomes | Trigger an encounter reminder; record the call disposition |
| CRM | Receives lead or patient engagement context; returns interaction outcomes | Contact a lead; update qualification status |
| Forms & Intake | Receives patient journey and form lifecycle events | Trigger outreach when an intake form is abandoned |
| Scheduling | Retrieves availability; performs permitted scheduling actions | Schedule or reschedule an appointment |
| Payments | Receives transaction and payment lifecycle events | Start outreach after a failed payment |
| Operational systems | Connects with pharmacy, fulfillment, labs, support, or internal platforms | Change fulfillment status after a patient call |

## Two ways to start a workflow

<CardGroup cols={2}>
  <Card title="Event-Driven" icon="bolt">
    Your system notifies Emma when something happens. Emma automatically starts the matching workflow. Supported events include intake abandoned, appointment created, appointment approaching, payment failed, prescription or fulfillment status changed, and patient follow-up required.
  </Card>

  <Card title="Request-Driven" icon="arrow-right-arrow-left">
    Your application calls Emma directly to start an action. Use the REST API to initiate a patient call, start a workflow, perform a scheduling action, or retrieve status.
  </Card>
</CardGroup>

## Context in, outcome out

<CardGroup cols={2}>
  <Card title="Context In" icon="arrow-right">
    * Patient or external system identifiers
    * Contact information
    * Workflow or event type
    * Appointment or form context
    * Transaction or payment context
  </Card>

  <Card title="Outcome Out" icon="arrow-left">
    * Workflow status
    * Call status
    * Patient disposition
    * Appointment action taken
    * Form completion status
    * Payment recovery outcome
    * Escalation status
    * Interaction metadata
  </Card>
</CardGroup>

## Augment, don't replace

<Note>
  Your platforms keep owning their data. Each platform keeps its data domain. Emma is designed to consume the context a patient engagement workflow needs and send the resulting actions and outcomes back to the right system — so you add AI-powered patient engagement without changing your clinical or operational stack.
</Note>
