Prerequisites
Before connecting Emerge EHR with OpenMic, make sure you have:- An active Emerge EHR account with API credentials (Client ID and Client Secret).
- An OpenMic account with at least one agent created.
- Access to the OpenMic Dashboard to manage integrations and custom functions.
Step 1: Connect Your Emerge EHR Account
- In the OpenMic Dashboard, go to Integrations.
- Find the Emerge EHR card.
- Click Connect.
- Enter your Emerge EHR Client ID and Client Secret.
- Configure your Location ID, Calendar Slug, Provider ID, and other required settings.
- Click Save to complete the connection.
Your Emerge EHR API credentials can be found in your Emerge EHR account settings. Contact your Emerge EHR administrator if you don’t have access to these credentials.
Step 2: Add Emerge EHR Functions to an Agent
Once connected, you can add Emerge EHR tools to your agent.- Go to Dashboard → Simple Agents.
- Select or create an agent.
- Open the Custom Functions tab and click Add Function.
-
From the list, choose from the available Emerge EHR tools:
- Emerge EHR Search Contact — Look up existing patients
- Emerge EHR Create Contact — Register new patients
- Emerge EHR Check Availability — Check open appointment slots
- Emerge EHR Create Appointment — Book appointments
- Click Create Function to add the selected tool to your agent.

Available Functions
Emerge EHR Search Contact
Search for an existing patient/contact in Emerge EHR by phone number, email address, or name.- Function Name:
emergeehr_contact_search - Search Options:
- Phone Number — Search by caller’s phone number (recommended as primary)
- Email Address — Search by patient email
- Patient Name — Search by first/last name

During live calls, the caller’s phone number is used automatically. You can enable multiple search types as fallbacks — for example, search by phone first, then by name if no match is found.
Emerge EHR Create Contact
Create a new patient/contact in Emerge EHR with a default case.- Function Name:
emergeehr_contact_create - Required fields: First name, last name
- Optional fields: Phone number, email address, date of birth, gender
Emerge EHR Check Availability
Check available appointment slots for a specific date in Emerge EHR.- Function Name:
emergeehr_get_available_slots - Input: A date (the agent can understand natural language like “tomorrow” or “next Monday”)
Emerge EHR Create Appointment
Book an appointment in Emerge EHR for a patient.- Function Name:
emergeehr_create_appointment - Required: Patient contact ID, case ID, selected time slot
The agent must have a valid contact ID and case ID before booking. Always use Search Contact or Create Contact first, then Check Availability, and finally Create Appointment.
Suggested System Prompt
After adding the Emerge EHR tools, configure your agent’s system prompt to define the workflow. Here’s a sample prompt you can use or adapt:Complete Booking Workflow
Here’s how all four Emerge EHR tools work together:-
Patient Lookup — uses Search Contact to check if the caller exists in Emerge EHR by phone number.
- If found: retrieves contact ID and case ID, skips to step 3.
- If not found: proceeds to step 2.
-
Patient Registration — uses Create Contact to add the caller as a new patient with a default case.
- Collects: first name, last name, email, phone.
- Returns contact ID and case ID.
-
Check Available Times — uses Check Availability to find open appointment slots.
- Queries the connected Emerge EHR calendar for the requested date.
- Presents available times in the caller’s local timezone.
-
Book Appointment — uses Create Appointment to confirm the booking.
- Links the appointment to the patient’s contact and case.
- Creates the entry in your Emerge EHR calendar with the selected provider.