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

# Concepts

> Core concepts behind App Embed, including orgs, teams, members, users, and integration-managed members.

<Card horizontal icon="person-digging" color="#57164A">
  Interested in this feature? Get in touch with your Customer Success Manager.
</Card>

## Preface

App Embed helps you integrate Junction Dashboard features into your web application.

To facilitate this, App Embed makes a few assumptions:

1. You programmatically manage the profiles of the providers as [integration-managed members](#integration-managed-members).
2. An integration-managed member must be at least a **team admin** of the team for App Embed to work.

What *provider* means in your use case may differ. Here are two example mappings for your consideration:

<AccordionGroup>
  <Accordion title="I am a health care practice..." icon="hospital" defaultOpen>
    | Junction noun          | Synonym     | Meaning                                                                           | API                                                    |
    | ---------------------- | ----------- | --------------------------------------------------------------------------------- | ------------------------------------------------------ |
    | Org                    | -           | Your business entity.                                                             | [Management API](/api-details/junction-management-api) |
    | Team                   | -           | A division in your Junction organization, containing an isolated pool of *users*. | [Management API](/api-details/junction-management-api) |
    | Member<br />Org Admin  | Staff       | Your members of staff.                                                            | [Management API](/api-details/junction-management-api) |
    | Member<br />Team Admin | Provider 📍 | Your members of staff, with access restricted to a specific set of *teams*.       | [Management API](/api-details/junction-management-api) |
    | User                   | Patient     | An end user of the device and lab testing services; belongs to a *team*.          | [Junction API](/api-details/junction-api)              |
  </Accordion>

  <Accordion title="I am an EMR..." icon="database" defaultOpen>
    | Junction noun          | Synonym     | Meaning                                                                  | API                                                    |
    | ---------------------- | ----------- | ------------------------------------------------------------------------ | ------------------------------------------------------ |
    | Org                    | -           | Your business entity.                                                    | [Management API](/api-details/junction-management-api) |
    | Team                   | -           | A customer of yours.                                                     | [Management API](/api-details/junction-management-api) |
    | Member<br />Org Admin  | -           | Your own members of staff.                                               | [Management API](/api-details/junction-management-api) |
    | Member<br />Team Admin | Provider 📍 | A customer's members of staff.                                           | [Management API](/api-details/junction-management-api) |
    | User                   | Patient     | An end user of the device and lab testing services; belongs to a *team*. | [Junction API](/api-details/junction-api)              |
  </Accordion>
</AccordionGroup>

## Core flow

<Steps>
  <Step title="Prepare identity and team records">
    Use the Junction Management API to create or resolve the team and integration-managed member for the current provider.
  </Step>

  <Step title="Create a Dashboard URL">
    Call [Create Dashboard URL](/api-reference/org-management/ehr-integration/create-dashboard-url) with the target member, team, modality, feature, and environment.
  </Step>

  <Step title="Launch the App Embed">
    Open the returned Dashboard URL in a top-level browser context for Link Out, or load it in an iframe for Feature Embed.
  </Step>
</Steps>

```mermaid theme={null}
sequenceDiagram
    autonumber
    participant PartnerApp as Your Web App
    participant PartnerBackend as Your Backend
    participant API as Junction Management API
    participant Junction as Junction Web App

    PartnerApp->>PartnerBackend: Request dashboard URL
    PartnerBackend->>API: POST /v1/org/{org_id}/ehr_integration/create_dashboard_url
    API-->>PartnerBackend: Dashboard URL
    PartnerBackend-->>PartnerApp: Dashboard URL
    PartnerApp->>Junction: Open URL
    Junction->>Junction: Configure session and route to feature
```

## Configuration

You can configure App Embed either through ["Org Config -> EHR Integration"](https://app.junction.com/org/ehr-integration) in the Junction Dashboard, or programmatically via the [Upsert App Embed Configuration](/api-reference/org-management/ehr-integration/set-configuration) endpoint on the Junction Management API.

| Setting         | Description                                                                                                                                                                                                                                                                                                                                                                                             |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Unique slug     | A unique kebab-case slug that identifies your organization, e.g., `my-clinical-practice`. Your [Fast Launch](/app-embed/fast-launch) subdomain is based on this slug.                                                                                                                                                                                                                                   |
| Modalities      | The App Embed modalities you intend to use: `link_out`, `feature_embed`, both, or none.                                                                                                                                                                                                                                                                                                                 |
| Allowed origins | Origins allowed to launch Link Out or Feature Embed sessions.<br /><br />For each origin, you may optionally specify a publicly accessible [Session Continuation URL](/app-embed/session-continuation). If this is left unspecified, [Fast Launch](/app-embed/fast-launch) will not work, and App Embed will show an error screen when it encounters a launch error or an irrecoverable client session. |

## Integration-managed members

To launch App Embed in either modality, identify the provider who should use Junction Dashboard as an integration-managed member.

These members are created and managed through the Junction Management API by your backend system.

Integration-managed members:

* can sign in only through App Embed launch flows;
* cannot sign in through Junction Dashboard identity providers; and
* can be assigned team role bindings when created or updated.

## Feature slug

[Features](/app-embed/overview#features) are represented by a **feature slug**.

Use a feature slug when you:

* create a pre-authorized [Dashboard URL](/api-reference/org-management/ehr-integration/create-dashboard-url);
* assemble a [Fast Launch URL](/app-embed/fast-launch); or
* handle a [Session Continuation request](/app-embed/session-continuation) from Junction App Embed.
