> For the complete documentation index, see [llms.txt](https://squarebox-ai.gitbook.io/squarebox/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://squarebox-ai.gitbook.io/squarebox/templates/dynamic-url.md).

# Dynamic URL

### &#x20;Overview

The Dynamic URL Button allows you to add personalized links to your WhatsApp templates in Squarebox. Using dynamic variables like {{1}}, you can send custom URLs to each lead — perfect for sharing lead-specific dashboards, payment links, or forms.

### &#x20;How It Works

You can use dynamic variables ({{1}}, {{2}}, etc.) inside the URL button of your WhatsApp template. When the template is sent via Campaigns, Triggers, or Automations, Squarebox will automatically replace the variable with each customer's specific data.

### &#x20;Steps to Use Dynamic URL Button

#### 1. Create or Edit a Template

Go to:\
Home → Manage Templates → New Template

1. Fill in the basic template details<br>
2. Choose "Add Button"<br>
3. Select Button Type: URL<br>

#### 2. Add the Dynamic Variable in URL

In the URL field, use variables like:

<https://yourdomain.com/lead/\\{{1\\}}>

* {{1}} will be dynamically replaced with data like lead ID, phone number, or any mapped value during template send.<br>

Example:\
If you send a campaign where {{1}} = 9988776655,\
the final button will open:

<https://yourdomain.com/lead/9988776655>

#### 3. Map Variables While Sending

When using the template in a Campaign or Trigger, Squarebox will prompt you to map the dynamic variables.

* You can select what {{1}} should contain (e.g., Phone Number, Lead ID, Custom Field).<br>

### &#x20;Use Cases

* Lead-Specific Dashboard Access:\
  Send a dashboard link with their lead ID embedded.
* Custom Payment Links:\
  Share personalized Razorpay or Stripe payment links.
* Form Submissions:\
  Direct users to fill prefilled forms tied to their profile.<br>

### Notes

* Only use dynamic variables in the URL, not in the button text.
* Avoid using personally sensitive data in the visible URL.
* Test templates with dummy values before submitting for WhatsApp approval.<br>

{% embed url="<https://youtu.be/WXCapnVszRU>" %}

<br>
