{ "name": "DM Clinical Workflow", "nodes": [ { "name": "introduction", "type": "conversation", "isStart": true, "metadata": { "position": { "x": -1018.1014495942081, "y": -399.62158155420525 } }, "prompt": "**INITIAL GREETING**\n\n1. **Greet:** \"Hello, this is Eva from DM Clinical. May I speak with {{first_name}} {{last_name}}?\"\n", "model": { "model": "gpt-4.1-mini", "provider": "openai", "maxTokens": 1000, "temperature": 0.5 }, "voice": { "voiceId": "Spencer", "provider": "vapi" }, "transcriber": { "model": "nova-3", "keyterm": [], "language": "en", "provider": "deepgram" }, "variableExtractionPlan": { "output": [] }, "messagePlan": { "firstMessage": "" } }, { "name": "Context_Setting", "type": "conversation", "metadata": { "position": { "x": -565.4209982028456, "y": 29.66448946060521 } }, "prompt": "**State Purpose & Check Availability:** \"You recently expressed interest in our Paid Research Study. This study is for individuals aged 18 to 75 and offers compensation between $650 and $1990. Is now a good time for us to discuss the details?\"", "model": { "model": "gpt-4.1-mini", "provider": "openai", "maxTokens": 146, "temperature": 0.5 }, "voice": { "voiceId": "Spencer", "provider": "vapi" }, "transcriber": { "model": "nova-3", "language": "en", "provider": "deepgram" }, "messagePlan": { "firstMessage": "Great! How are you doing today?" } }, { "name": "hangup_1748939687740", "type": "tool", "metadata": { "position": { "x": -1470.8623928991049, "y": 27.632530978899922 } }, "tool": { "type": "endCall", "function": { "name": "untitled_tool", "parameters": { "type": "object", "required": [], "properties": {} } }, "messages": [ { "type": "request-start", "content": "Sorry for disturbing you. It seems like there was some confusion. Have a great day!", "blocking": true } ] } }, { "name": "hangup_1748945208827", "type": "tool", "metadata": { "position": { "x": -1255.6089999615167, "y": 502.8013858898423 } }, "tool": { "type": "endCall", "function": { "name": "untitled_tool", "parameters": { "type": "object", "required": [], "properties": {} } }, "messages": [ { "type": "request-start", "content": "Okay, I understand. Would you prefer a callback at a more convenient time, or would you like me to send you a text message with a link to an online form? You can also reach us at 033-333-3333 if you change your mind. Thank you for your time.", "blocking": true } ] } }, { "name": "DOB Verification", "type": "conversation", "metadata": { "position": { "x": 52.25441525550592, "y": 501.6562834847274 } }, "prompt": "**Ask for DOB:** \"Perfect.To confirm identity, could you please provide me with your Date of Birth?\" (Wait for response: )", "model": { "model": "gpt-4.1", "provider": "openai", "maxTokens": 150, "temperature": 0.5 }, "voice": { "voiceId": "Spencer", "provider": "vapi" }, "transcriber": { "model": "nova-3", "language": "en", "provider": "deepgram" }, "variableExtractionPlan": { "output": [ { "enum": [], "type": "string", "title": "extractedDOB", "description": "The provided date of birth by the user in `YYYY-MM-DD` format (e.g. \"2020-03-23\")." } ] }, "messagePlan": { "firstMessage": "Perfect.To confirm identity, could you please provide me with your Date of Birth?" } }, { "name": "hangup_1748951339025", "type": "tool", "metadata": { "position": { "x": -524.233190905826, "y": 843.0663729807501 } }, "tool": { "type": "endCall", "function": { "name": "untitled_tool", "parameters": { "type": "object", "required": [], "properties": {} } }, "messages": [ { "type": "request-start", "content": "It seems the date of birth you provided doesn't match what we have on file. Based on the study criteria, it appears you may not be eligible for this particular study at this time. I appreciate you taking the time to speak with me today. Have a wonderful day.", "blocking": true } ] } }, { "name": "hangup_1748952608466", "type": "tool", "metadata": { "position": { "x": 38.70664437558388, "y": 847.0030151855151 } }, "tool": { "type": "endCall", "function": { "name": "untitled_tool", "parameters": { "type": "object", "required": [], "properties": {} } }, "messages": [ { "type": "request-start", "content": "Thank you, your age is verified. I will now ask a few general medical questions to assess your eligibility further. Is that acceptable?", "blocking": true } ] } } ], "edges": [ { "from": "introduction", "to": "Context_Setting", "condition": { "type": "ai", "prompt": "if the user verifies as {{first_name}} {{last_name}}" } }, { "from": "introduction", "to": "hangup_1748939687740", "condition": { "type": "ai", "prompt": "if the user refuses to verify as {{first_name}} {{last_name}}" } }, { "from": "Context_Setting", "to": "hangup_1748945208827", "condition": { "type": "ai", "prompt": "if the user said no to discuss details" } }, { "from": "Context_Setting", "to": "DOB Verification", "condition": { "type": "ai", "prompt": "if the user said yes to discuss the details" } }, { "from": "DOB Verification", "to": "hangup_1748951339025", "condition": { "type": "ai", "prompt": "{{ extractedDOB != dob }}" } }, { "from": "DOB Verification", "to": "hangup_1748952608466", "condition": { "type": "ai", "prompt": "{{ extractedDOB == dob }}" } } ], "globalPrompt": "## Identity and Purpose\n\nYou are Eva, an AI assistant for DM Clinical, conducting prescreening interviews for paid clinical research studies. Your primary goals are to determine eligibility, maintain a strict question flow, and provide an empathetic, conversational, and friendly experience.\n\n## Core Directives & Tone\n\n1. **Strict Question Flow:** Adhere precisely to the question sequence and logic defined in each section. Do not deviate, skip questions, or introduce unscripted topics.\n2. **Empathetic & Conversational Tone:** Maintain a friendly, empathetic, and professional tone throughout the conversation. Use phrases like \"Thank you for sharing that,\" \"I understand,\" or \"I appreciate you letting me know\" appropriately.\n3. **Response Clarity:** If a user's response is unclear or insufficient for a question, politely re-ask the question or ask for clarification before proceeding. Do not move on until a proper response is received.\n4. **Hard Disqualification (DNQ) Handling:**\n * **Age & Cancer:** These are hard DNQs. Pay special attention to age verification.\n * **DNQ Notification:** If a hard DNQ condition is met (e.g., age mismatch, age outside range, recent cancer diagnosis), politely inform the patient: \"Thank you for providing that information. Based on the study criteria, it appears you may not be eligible for this particular study at this time. I appreciate you taking the time to speak with me today. Have a wonderful day.\" Then, conclude the call.\n5. **Call Conclusion:** Always conclude the call in a polite, conversational manner, regardless of the outcome (DNQ, successful scheduling, user declines).\n6. **Tool Usage:**\n * When instructed to call a tool, do so precisely with the specified parameters. Do not call it earlier than specified.\n * Do not verbalize the input parameters you are sending to the tool.\n * Do not mention or repeat information that has already led to a denial or ineligibility.\n7. **Protected Information Handling:**\n - **Crucially, never state the `{{dob}}` (system DOB) aloud.** Refer to it only as _\"the date of birth we have on file.\"_\n\n## General Fallbacks:\n\n* If the user expresses confusion at any point, politely rephrase or clarify.\n* If a technical issue occurs (e.g., a tool call fails unexpectedly beyond normal error handling like a slot being taken), apologize and suggest a callback: \"I seem to be experiencing a temporary technical issue. Could I arrange for us to call you back shortly to complete this?\"" }