# Using Variables in Click to Call to Personalize Conversations

With our new **Click to Call Variables** feature, you can now pass extra customer information directly from your **Click to Call form** into the AI conversation. This allows your AI agent to greet customers by name, mention their product of interest, or adapt responses based on other attributes like **country, age, or any custom field** you choose.

This is a powerful way to create more **personalized, relevant, and effective conversations**.

***

### How It Works

When a customer submits your **Click to Call form**, you can send additional data as part of the request. This information is passed in the `"variables"` object, and the AI agent can use it dynamically during the call.

#### Example Request Body

```json
{
  "phone": "+34xxxxxxxxx",
  "variables": {
    "name": "John",
    "last_name": "Doe",
    "product": "VoiceB AI",
    "country": "Spain",
    "age": "32"
  }
}
```

In your agent’s script, you can then call any of these variables using **`{{variable_name}}`** syntax.

**Example in Script:**

```
Hello {{name}}, I see you are interested in {{product}}.  
Let’s go over the details together.
```

***

### Setup Instructions

1. **Login** to your VoiceB account.
2. **Select your campaign** from the left-hand menu.
3. **Select the agent** you want to configure.
4. Go to **Configuration > Click to Call**.
5. Click the **Show Credentials & Instructions** button.
6. Copy your **API Token, Secret, and Endpoint**.
7. When sending your POST request to the Click to Call API, include the `variables` object with any customer data you want available during the call.

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

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

***

### Example Use Cases

* **Personalized Greetings**: Greet the customer by name.
* **Product Relevance**: Mention the specific product they selected on your site.
* **Regional Adaptation**: Adapt the conversation depending on the customer’s country or language.
* **Age-Targeted Messaging**: Offer different plan recommendations based on the age group.
* **Custom Data Fields**: Any other field you include in `variables` can be used in real time during the call.

***

### Technical Notes

* Always send requests from your **backend** to keep your credentials secure.
* You can pass as many variables as you want inside the `"variables"` object.
* Use `{{variable_name}}` in your script to insert these values dynamically.

***

✅ **With this new feature, every Click to Call conversation can now feel like a tailored, one-to-one experience.**


---

# 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.voiceb.ai/using-variables-in-click-to-call-to-personalize-conversations.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.
