$50 free credit for new accounts - ends in

Claim $50

Integration

How to connect home sleep test pre study prep help to a c…

How to connect home sleep test pre study prep help to a chat widget — answered from your own docs. How Sleep Clinics teams use Chatref (website widget, knowledg

Chatref Team6 min read / Updated June 15, 2026

Connecting home sleep test pre-study prep help to a chat widget means training a Chatref AI agent on your clinic’s pre-study checklists, device instructions, and FAQs, then embedding that agent on your website. Patients get immediate, accurate guidance – no phone tag, no after-hours confusion – grounded entirely in your own material.

What connects to what

The connection is straightforward: your existing home sleep test (HST) preparation documents power a Chatref AI agent, which lives inside a website widget. There is no backend integration, no API coding, and no syncing required. The only technical step is placing a single JavaScript snippet on your site.

Your clinic’s knowledge base – PDFs of patient instructions, a URL with detailed prep steps, plain-text checklists – becomes the agent’s sole source of truth. The widget then surfaces that knowledge in a chat interface on pages where patients already look for help. This is not a generic chatbot guessing from the internet; it is an agent limited to the exact HST prep information you provide, directly tied to the Chatref website-widget and knowledge-base capabilities.

For Sleep Clinics, the typical sources are:

  • A one-page PDF titled “Home Sleep Test: What to Do Before Your Study.”
  • A PDF of device-specific setup guides (e.g., finger probe, chest belt, nasal cannula).
  • A website URL that lists the top 5 pre-study do’s and don’ts.
  • Plain-text copy of the after-hours emergency contact protocol.

The agent reads these documents once and then answers questions like “Can I drink caffeine the night before?” or “The chest belt won’t stay on – how tight should it be?” using only those sources.

How to set it up

The setup takes about 15 minutes and requires no developer. You will create an agent, upload your HST prep content, and add the widget snippet to your website.

1. Create a Chatref agent for HST prep

Log in to your Chatref account and create a new agent. Give it a name your team will recognize, such as “Home Sleep Test Prep.” Set the agent’s primary color to match your clinic’s brand. This agent will handle only pre-study preparation questions, so you can later build separate agents for appointment scheduling or billing if needed.

2. Add your HST prep content

In the agent’s “Knowledge” tab, add the documents you gathered. You can upload PDFs, point to a URL on your site, or paste plain text. For a typical sleep clinic, this might include:

  • hst-pre-study-checklist.pdf – covers showering, avoiding lotions, medication adjustments, and caffeine/alcohol guidelines.
  • device-setup-guide.pdf – photos and steps for wearing the respiratory belt, pulse oximeter, and airflow sensors.
  • A URL like https://yoursleepclinic.com/patients/hst-prep – a public page with your current prep instructions.
  • Plain text: “If the device beeps red, call our after-hours line at 555-0199. Do not remove sensors.”

Chatref processes these in a few minutes. The agent is now grounded in your exact prep material. You can test it immediately in the built-in playground before taking it live.

3. Embed the widget on your website

Go to the agent’s “Embed” tab and copy the provided JavaScript snippet. Paste it just before the closing </body> tag on every page where you want the chat to appear. The best placement is your main HST patient-instruction page, your “Prepare for Your Study” page, and any device-troubleshooting help article. The snippet is identical for all pages – once installed, the widget loads automatically and shows the same agent.

If your site is on a platform like Squarespace, Webflow, or WordPress, adding custom code is usually a single-paste operation in the site settings or a code injection block. There is no additional domain allowlisting needed beyond the origin check Chatref performs when you first embed the snippet.

What users see

Patients encounter a small chat bubble, typically in the lower-right corner, styled with your clinic’s colors. When they click it, a chat window opens with a brief introduction, such as “Ask me anything about preparing for your home sleep test.”

A patient types a question: “Do I need to stop my blood pressure medication?” The agent scans your uploaded documents, finds the relevant section, and responds with the exact instruction you provided, like: “No, continue all prescribed medications unless your physician tells you otherwise. The HST device does not interfere with most medications.” It cites the source document at the end of the reply.

If a question goes beyond prep – for example, “How do I schedule a follow-up appointment?” – the agent can escalate to a human or capture the patient’s contact details using a custom action (if configured). For the core prep use case, the goal is immediate resolution: patients get the answer, feel confident, and are less likely to call your front desk during off-hours.

The experience is consistent across desktop and mobile, and the chat remains open as patients navigate between pages with the widget installed. There is no login required for patients, and no personal health information is stored by Chatref unless you explicitly configure lead capture.

Troubleshooting

Most issues stem from two sources: the agent not having the right information, or the widget not appearing where expected.

Agent gives vague or incorrect answers

This almost always means you are missing the specific instruction in your uploaded documents. If a patient asks “Can I sleep on my stomach with the device?” and the answer is generic, check your knowledge-base sources. Add explicit guidance – for example, update your PDF or plain-text entry with: “You can sleep in any position, but the chest belt works best when you sleep on your back or side. If you roll onto your stomach, the belt may loosen.” After adding this content, go to the “Knowledge” tab and click “Re-train” so the agent reprocesses the material. Test the question again in the playground.

Widget does not appear on a specific page

Verify the JavaScript snippet is present in the page’s source code, right before </body>. A common mistake is adding the snippet only to a template header and forgetting that some pages override the template. Also, check for JavaScript errors in the browser’s developer console – a third-party script conflict can prevent the widget from loading. If you recently changed your site’s domain or moved from a staging environment, confirm the domain is still allowlisted in your Chatref agent settings under “Embed” → “Allowed Origins.”

Widget appears but chat window is blank

This can happen if the agent was recently created and the knowledge-base processing is not yet complete. Wait 2-3 minutes and refresh. If the issue persists, clear your browser cache or test the agent in the Chatref playground; if the playground works, the widget snippet may need to be re-copied after an update.

Patients ask about topics beyond prep

The HST prep agent is specialized. You can either create a second, general agent for other patient questions, or train the same agent with additional sources – appointment policies, billing information, insurance accepted. Keep in mind that the more you add, the broader the agent’s scope becomes. For clarity, limit this agent to prep and create separate agents for scheduling or billing, placing each widget on the corresponding pages.

FAQ

What causes home sleep test pre-study prep problems for Sleep Clinics?

Missed prep steps and patient confusion are the top causes – patients forget to stop caffeine, apply device sensors incorrectly, or do not know whom to call after hours. Many clinics rely on a single pre-study handout or a rushed verbal instruction, leading to inconsistent understanding, more rescheduled studies, and higher front-desk call volume, especially nights and weekends.

How do I improve home sleep test pre-study prep for Sleep Clinics?

Make your prep instructions available 24/7 in a channel patients already use – your website. Add a chat widget trained on your exact prep guides, so patients get instant answers to “when do I remove the device” or “is it okay if the light blinks green” without calling. Supplement the widget with a brief pre-study email that links to the same help page, and audit the chat transcripts monthly to identify and fill gaps in your documents.

Put this into practice

Chatref answers your customers from your own content, day and night. Add it to your site and go live in minutes – free to start.

Get started