> For the complete documentation index, see [llms.txt](https://docs.quickreply.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quickreply.ai/product-modules/ai-builder/ads-to-dms.md).

# Ads to DMs

#### **Meta Ad ID**

Every ad on Meta (Facebook or Instagram) is assigned a unique **Ad ID** when it’s created in the Meta Business Manager (BM).\
By mapping this **Meta Ad ID** in your AI Builder, you’re linking your ad campaign to a bot—so whenever a user clicks *Send Message* on that ad, the bot automatically responds inside Instagram DMs.<br>

## **How to Use CTID (Click to Instagram DMs)**

#### Meta Ad ID Mapping

**Step 1: Get your Meta Ad ID**

1. Go to your **Meta Business Manager (BM)**.
2. Open the **Ads Manager** section.
3. Select the **Ad** you want to connect with your bot.
4. In the **URL bar**, you’ll see a numeric value like `act=1234567890&ad_id=987654321`.
   * The number after `ad_id=` is your **Meta Ad ID**.

**Step 2: Map it inside AI Builder**

1. In your QuickReply dashboard, open your **Gen AI Bot**.
2. Go to the **Configure** tab.
3. Under **“Specify Meta Ad IDs that this bot will interact with”**, click **+ Add Meta Ad ID**.
4. Paste your **Meta Ad ID** and save.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.quickreply.ai/product-modules/ai-builder/ads-to-dms.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
