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

# Prompts And Welcome Messages In DialNexa

> Understand DialNexa prompts, system prompts, welcome messages, conversation start modes, first sentence behavior, and prompt review.

Prompts and welcome messages tell a DialNexa agent what to do and how the call begins. The prompt controls the conversation goal, the system prompt adds higher-level rules, and the welcome message controls the first spoken turn when the agent starts the conversation.

<img src="https://mintcdn.com/dialnexa/0efoAN-6So4r-6NC/images/documentation/screenshots/agent-prompt-editor.png?fit=max&auto=format&n=0efoAN-6So4r-6NC&q=85&s=60f45f90e53a644a08e11e20c0fd3346" alt="DialNexa prompt editor showing the Welcome Message field above detailed Agent Prompt instructions." style={{ width: '100%', maxWidth: '1100px', margin: '8px 0 24px', border: '1px solid #e5e7eb', borderRadius: '6px' }} width="2776" height="1752" data-path="images/documentation/screenshots/agent-prompt-editor.png" />

<Note>
  The first sentence has a job: make the caller stay on the line long enough for the second sentence to matter.
</Note>

## Before You Begin

Write down the agent's single objective, required facts, prohibited behavior, escalation rules, and a clear definition of success. Collect approved wording for sensitive or regulated statements.

## Prompt Fields And Meaning

Write each field for a different purpose.

| Field            | Use it for                                                                                          |
| ---------------- | --------------------------------------------------------------------------------------------------- |
| Prompt text      | The main instructions: goal, script, objections, eligibility rules, tone, and call ending behavior. |
| System prompt    | Static higher-level behavior constraints and persistent rules. Do not use dynamic variables here.   |
| Agent identity   | Who the agent is in a conversational flow setup.                                                    |
| Agent background | Context the agent should remember while handling flow nodes.                                        |
| Welcome message  | The first message when the agent is configured to start.                                            |

## Variable Syntax Validation

The agent builder validates dynamic variable placeholders before saving, testing, or publishing prompt-related text. Use simple double-brace syntax such as `{{first_name}}`. Prompt text, welcome messages, and voicemail messages must be valid Handlebars template text.

| Problem                             | Example          | Fix                                                                   |
| ----------------------------------- | ---------------- | --------------------------------------------------------------------- |
| Unclosed variable                   | `{{first_name`   | End every opening `{{` with `}}`.                                     |
| Empty variable                      | `{{}}`           | Add a variable key.                                                   |
| Extra brace or spacing before close | `{{amount} }`    | Use `{{amount}}`.                                                     |
| Invalid variable name               | `{{first name}}` | Use letters, numbers, underscores, or dots, such as `{{first_name}}`. |

The validation message points to the first affected line and can report additional errors after that. Fix malformed variables before changing the prompt content itself.

System prompt text is static. Put dynamic caller data in the main prompt, welcome message, voicemail message, default variables, batch CSV, workflow lead data, or API launch payload instead.

## Conversation Start Modes

<Tabs>
  <Tab title="User starts">
    The caller speaks first. Good for inbound calls where the caller has a reason to call.
  </Tab>

  <Tab title="Agent defined">
    The agent uses a fixed welcome message. Good for outbound reminders or introductions.
  </Tab>

  <Tab title="Agent dynamic">
    The first turn can use dynamic values. Good when the greeting needs caller-specific context.
  </Tab>
</Tabs>

## Write Prompt Instructions That Survive Real Calls

<Steps>
  <Step title="Name the caller goal">
    Tell the agent the single most important outcome.
  </Step>

  <Step title="Define what not to do">
    Add boundaries for speculation, pricing, escalation, or unsupported requests.
  </Step>

  <Step title="Use examples">
    Include phrasing for short answers, objections, wrong number, busy caller, and language switch.
  </Step>

  <Step title="Connect tools to intent">
    Tell the agent when to use functions, not just that functions exist.
  </Step>

  <Step title="Make the ending explicit">
    Tell the agent when to end, transfer, schedule, or summarize.
  </Step>
</Steps>

## Prompt Review Questions

<AccordionGroup>
  <Accordion title="Does the agent know success?">
    If success is vague, post-call fields and summaries will be vague too.
  </Accordion>

  <Accordion title="Are variables wrapped correctly?">
    Use placeholders such as `{{first_name}}` and define defaults where needed.
  </Accordion>

  <Accordion title="Does the welcome message match the route?">
    Inbound and outbound openings usually need different wording.
  </Accordion>

  <Accordion title="Can the prompt be shorter?">
    Long prompts are sometimes necessary, but repeated rules and unclear sections make behavior harder to debug.
  </Accordion>
</AccordionGroup>

## Verify The Prompt And Welcome Message

Test the normal path, an interruption, silence, an out-of-scope question, a correction, and a request for a human. Confirm the agent stays within scope and the transcript reflects the intended behavior.

## Related Reading

<CardGroup cols={2}>
  <Card title="Dynamic Variables" icon="braces" href="/docs/agents/dynamic-variables">
    Add caller-specific values.
  </Card>

  <Card title="Single Prompt Agents" icon="sparkles" href="/docs/agents/single-prompt-agents">
    Use one instruction set.
  </Card>

  <Card title="Testing Agents" icon="phone-call" href="/docs/agents/testing-agents">
    Test the first turn and edge cases.
  </Card>

  <Card title="Agent Prompts Video" icon="circle-play" href="/docs/tutorials/platform-videos/write-agent-prompts">
    Watch how to write focused agent instructions.
  </Card>

  <Card title="Welcome And System Prompt Video" icon="circle-play" href="/docs/tutorials/platform-videos/welcome-message-and-system-prompt">
    Watch how the opening and core instructions work together.
  </Card>
</CardGroup>
