# Set up a campaign (/en/ai/studio/deploy/campaign)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

Campaigns enable your deployed agents to make outbound calls to a list of contacts. Use campaigns for sales outreach, customer follow-ups, appointment reminders, surveys, and other automated calling scenarios.

## Plan your campaign

Before creating a campaign, consider the following:

**What is your goal?** Define the purpose of your campaign, such as appointment confirmations, payment reminders, customer satisfaction survey, or lead qualification. This determines the agent template and prompt you should use.

**Who are you calling?** Only call contacts who have given consent to be contacted. This includes existing customers with opt-in consent, leads who requested information, or users who have an existing relationship with your business.

**When should you call?** Call during business hours in your customer's time zone. Avoid meal times and respect do-not-call hour restrictions in your region.

## How campaigns work

To create a campaign, you select a deployed agent and provide a contact list. The agent calls each contact in the list using the imported phone number you specify as the caller ID. You can include [template variables](../build/prompt-design#template-variables) in your contact list. The agent references these variables during conversations through the LLM's system prompts and greeting messages.

## Prerequisites

* An [imported phone number](import) to use as caller ID. If you are using Twilio, see [Set up SIP trunk](sip-trunk) first.
* A [deployed agent](deploy-agent) configured for your use case.
* A contact list in CSV [format](#contact-list-format) with required phone numbers.

You can also add a phone number or create an agent directly from the campaign creation screen, so these don't strictly need to exist beforehand.

## Create a campaign

To create a new campaign:

1. In the navigation sidebar, select **Outbound Campaigns**.

   ![Create a campaign](https://assets-docs.agora.io/images/console/campaign.png)

2. Select **Create Campaign**.

   ![New campaign](https://assets-docs.agora.io/images/console/campaign-new.png)

3. Configure the campaign details:

   * **Campaign Name** (required): Enter a descriptive name to identify this campaign.
   * **AI Agent** (required): Select the deployed agent that will handle the calls, or select **Create Agent** to create one without leaving this screen.
   * **Phone number** (required): Select the imported phone number to use as the outbound caller ID, or select **Add Phone Number** to import one without leaving this screen.

4. Upload your contact list in the **Contacts List** panel. **Select File**, or drag and drop a CSV file into the upload area. See [Contact list format](#contact-list-format) for requirements. You can also download a template for the CSV file.

   <CalloutContainer type="info">
     <CalloutTitle>
       Info
     </CalloutTitle>

     <CalloutDescription>
       Maximum file size is 25 MB, with a maximum of 50,000 rows.
     </CalloutDescription>
   </CalloutContainer>

5. Configure launch timing:

   * **Launch immediately**: Start calling contacts immediately after creation.
   * **Schedule for Later**: Set a specific **Scheduled Start Time** and **Call Window** to control when your agent makes calls.

6. Configure call settings:

   ![Call settings](https://assets-docs.agora.io/images/console/campaign-call-settings.png)

   * **Max Call seconds** (required): Maximum length for a conversation.

   * **Ring seconds** (required): Maximum time to wait for call connection. The call stops ringing if not connected within the specified duration.

   * **Silence seconds**: Duration of silence before ending the call.

   * **Transcripts & Recording**

     * **Store Transcripts**: Automatically saves the conversation text for review.
     * **Store Call Recording**: Automatically saves the call audio recording for review.

   * **Hang-up Configuration**
     * **Voicemail detection**: Allows the agent to detect voicemail systems and hang up the call.
     * **End of conversation**: Hang up when the conversation naturally ends.
     * **Silence hangup**: End the call after a period of silence.
     * **Fax detection**: Allows the agent to detect fax tones and hang up the call.

   * **Transfer Call to Human**: Transfers the call to a human agent when needed or requested by the caller.

     ![Campaign Transfer Call to Human settings](https://assets-docs.agora.io/images/console/campaign-transfer-call.png)

     When enabled, configure the following:

     * **Transfer Type**: Choose **Number** or **SIP**.
     * **Transfer Destination**: Enter the destination phone number or SIP address. For example, a phone number as `550001234`, or in E.164 format as `+15550001234`.
     * **Transfer Criteria**: Describe when the agent should transfer the call to this number. Select **Show Example** for a sample description.
     * **SIP Headers**: When **Transfer Type** is **SIP**, you can add constant or dynamic SIP headers to the transfer request.

   * **Call Analysis**

     * **Post Call Data Extraction**: Automatically extracts structured outputs from calls according to your business needs.

     ![Transcripts and call analysis](https://assets-docs.agora.io/images/console/campaign-transcript-analysis.png)

7. Select **Schedule Campaign** to launch or schedule your campaign, or select **Save as Draft** to save your progress without launching it.

<CalloutContainer type="warning">
  <CalloutTitle>
    Compliance
  </CalloutTitle>

  <CalloutDescription>
    Outbound calling is subject to legal requirements that vary by region. In the United States, the Telephone Consumer Protection Act (TCPA) requires written consent for marketing calls. Always identify your business name and provide a callback number. Honor do-not-call requests immediately and respect calling hour restrictions (8 AM to 9 PM in the recipient's time zone). Consult your legal team before running large outbound campaigns.
  </CalloutDescription>
</CalloutContainer>

## Contact list format

Your contact list must be a CSV file with the following requirements:

* `phone_number` (required): Phone numbers in E.164 format. For example, `+1234567890`.
* Add columns for variables you want to use in your agent's prompts. Column names become variable names available in your **Prompt** configuration.
* To override agent settings per contact, add columns like `prompt_override`.

You can download a template from the **Contacts List** panel by selecting **Download Template**.

### Sample contact list

The following is an example of a contact list for appointment confirmation:

```
phone_number,name,appointment_time,preferred_language
+19168888860,John Doe,2025-01-15 10:00 AM,English
+19168888861,Jane Smith,2025-01-15 11:00 AM,Spanish
```

In this example, the agent can reference `{{name}}`, `{{appointment_time}}`, and `{{preferred_language}}` in its system prompts and greeting messages when calling each contact.

## Manage campaigns

To view and manage your campaigns:

1. In the navigation sidebar, select **Outbound Campaigns**.
2. The Campaign page displays all your campaigns with their current status and progress.
3. Use the **Action** menu to:
   * **Edit**: Modify scheduled campaigns before they start.
   * **View Results**: Review completed campaign performance.
   * **Delete**: Remove campaigns.

## More transfer options

For SIP transfer setup, valid SIP destination formats, and dynamic SIP header examples, see [Transfer to SIP address and dynamic SIP headers](transfer-to-sip).

## Next steps

* [Agent analytics](../observe/analytics): View performance metrics for your campaigns
* [Call History](../observe/call-history): Review individual call transcripts and outcomes
