# Using dynamic variables

{% embed url="<https://www.tella.tv/video/dynamic-input-variables-ejkk?b=0>" %}

Dynamic variables are placeholders used in AI prompts to personalize interactions by dynamically inserting specific information during a conversation. They are essential for tailoring the AI's responses to the individual needs and context of each customer interaction.

### Structuring the Input Variables Section <a href="#structuring-the-input-variables-section" id="structuring-the-input-variables-section"></a>

#### Purpose <a href="#purpose" id="purpose"></a>

The Input Variables section is crucial for defining the dynamic variables that will be used throughout the AI prompt. This section ensures that each variable is clearly documented, providing clarity on its purpose and usage.

Common use cases:

* Pre-fill variables previous to an outbound call for customization
* Grab user's name from database and greet them by their name
* Confirm user's address in a database
* Confirm an appointment with user in existing database

#### Notation <a href="#notation" id="notation"></a>

* Dynamic variables are enclosed in double curly braces, e.g., **{{variable\_name}}**.
* Each variable should be listed with a brief description of its role in the conversation.
* These variables go directly in your prompt and can be tested during test calls.

#### Declaration Example <a href="#declaration-example" id="declaration-example"></a>

* **{{customer\_name}}**: The name of the customer.
* **{{product\_interest}}**: The product the customer is interested in.
* **{{customer\_email}}**: The email address of the customer.
* **{{customer\_company}}**: The company the customer represents.

<figure><img src="/files/aTIAGQYpnM4xDONZB7eD" alt=""><figcaption></figcaption></figure>

#### Usage Example <a href="#usage-example" id="usage-example"></a>

Comment

* Greeting: "Hello {{customer\_name}}, I see you're interested in our {{product\_interest}}."Comment
* Company Reference: "I understand {{customer\_company}} has been experiencing {{specific\_issue}}."

***

#### Placement <a href="#placement" id="placement"></a>

Dynamic variables should be placed in the `# Input Variables` section of the prompt. It is recommended to position them at the end of this section to ensure clarity and organization.

<figure><img src="/files/t54jyTRSkuDwKN4QKceK" alt=""><figcaption></figcaption></figure>

***

### Best Practices <a href="#best-practices" id="best-practices"></a>

* Ensure all dynamic variables are accurately populated before the conversation begins.
* Regularly update the list of dynamic variables to reflect any changes in business needs or customer interactions.
* Test the implementation of dynamic variables to ensure they function as expected in various scenarios.

***

### Conclusion <a href="#conclusion" id="conclusion"></a>

Dynamic variables are a powerful tool for creating personalized and effective AI interactions. By understanding and implementing them correctly, businesses can significantly improve the quality of their customer engagements.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dapta.ai/ai-voice-agents/how-to-set-up-your-ai-voice-agent/using-dynamic-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
