> ## Documentation Index
> Fetch the complete documentation index at: https://graine.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CSV Format

> Proper format for campaign calling lists

## CSV Structure

Your CSV file must have specific columns for the campaign to work correctly.

## Required Columns

Every CSV must include these two columns:

| Column          | Description                    | Example       |
| --------------- | ------------------------------ | ------------- |
| `callee_name`   | Customer's name                | John Doe      |
| `mobile_number` | Phone number with country code | +919876543210 |

## Example CSV

```csv theme={null}
callee_name,mobile_number
John Doe,+919876543210
Jane Smith,+911234567890
Bob Johnson,+919123456789
```

## With Custom Variables

Add any custom variables as additional columns:

```csv theme={null}
callee_name,mobile_number,appointment_date,order_number
John Doe,+919876543210,2025-01-15,ORD001
Jane Smith,+911234567890,2025-01-16,ORD002
Bob Johnson,+919123456789,2025-01-17,ORD003
```

## Formatting Rules

### Phone Numbers

<AccordionGroup>
  <Accordion title="Include Country Code">
    Always include the country code with + prefix:

    * ✅ `+919876543210` (India)
    * ✅ `+14155552671` (USA)
    * ❌ `9876543210` (Missing +91)
  </Accordion>

  <Accordion title="No Spaces or Special Characters">
    * ✅ `+919876543210` - ❌ `+91 9876 543 210` - ❌ `+91-9876-543210`
  </Accordion>

  <Accordion title="Valid Number Format">
    Ensure numbers are valid and active:

    * Correct length for country
    * No landline numbers (mobile only)
    * Active numbers (not disconnected)
  </Accordion>
</AccordionGroup>

### Names

* Use full names when possible
* Keep formatting consistent
* Avoid special characters that might cause issues
* Example: "John Doe" not "John, Doe" or "Doe; John"

### Custom Variable Values

* Keep values simple and clear
* Avoid commas within values (or use quotes)
* Match the format expected by your agent
* Test with sample data first

## CSV File Requirements

<CardGroup cols={2}>
  <Card title="Encoding" icon="file-code">
    Use UTF-8 encoding for international characters
  </Card>

  <Card title="File Size" icon="hard-drive">
    Up to 50MB per file (around 100,000 contacts)
  </Card>

  <Card title="Headers" icon="heading">
    First row must contain column names
  </Card>

  <Card title="Delimiter" icon="grip-lines-vertical">
    Use comma (,) as delimiter
  </Card>
</CardGroup>

## Variable Mapping

The platform automatically maps CSV columns to agent variables:

1. Upload your CSV
2. Review the mapping preview
3. Verify columns match variable names exactly
4. Confirm and proceed

<Warning>
  Column names must match your agent's custom variable names exactly
  (case-sensitive)
</Warning>

## Common Issues

<AccordionGroup>
  <Accordion title="Missing Required Columns">
    **Error**: "CSV missing required columns"

    **Fix**: Ensure your CSV has both `callee_name` and `mobile_number` columns
  </Accordion>

  <Accordion title="Invalid Phone Numbers">
    **Error**: "Invalid phone number format" **Fix**: Add country code with +
    prefix, remove spaces and special characters
  </Accordion>

  <Accordion title="Variable Mismatch">
    **Error**: "Variable not found in agent" **Fix**: Column names must exactly
    match your agent's custom variable names
  </Accordion>

  <Accordion title="Encoding Issues">
    **Error**: Special characters appear as �

    **Fix**: Save your CSV with UTF-8 encoding
  </Accordion>
</AccordionGroup>

## Creating Your CSV

### Using Excel/Google Sheets

<Steps>
  <Step title="Create Spreadsheet">
    Open Excel or Google Sheets and create your data
  </Step>

  <Step title="Add Headers">
    First row: `callee_name,mobile_number,custom_var1,...`
  </Step>

  <Step title="Add Data">Fill in contact information row by row</Step>

  <Step title="Export as CSV">
    File → Save As → CSV (UTF-8)
  </Step>
</Steps>

### Using Text Editor

Create a plain text file with `.csv` extension:

```csv theme={null}
callee_name,mobile_number,appointment_date
John Doe,+919876543210,2025-01-15
Jane Smith,+911234567890,2025-01-16
```

## Sample CSV Templates

Download sample templates:

<Note>Contact support at [support@graine.ai](mailto:support@graine.ai) for sample CSV templates</Note>

## Next Steps

<CardGroup cols={2}>
  <Card title="Custom Variables" icon="brackets-curly" href="/campaigns/custom-variables">
    Learn how to use custom variables
  </Card>

  <Card title="Launch Campaign" icon="rocket" href="/campaigns/creating-campaigns">
    Ready to create your campaign
  </Card>
</CardGroup>
