Export your current variants
Before importing, export your existing variants to understand the file format:- Navigate to Build > Variant management in Agent Studio
- Click Export CSV
- Save the file to your local machine
CSV file format
The CSV file must include these columns:| Column | Required | Description |
|---|---|---|
id | No | Leave empty for new variants. Include existing IDs to update variants. |
name | Yes | Unique name for the variant |
is_default | Yes | true or false. Only one variant can be default. See note below. |
attribute_* | No | Custom attributes (e.g., attribute_phone_number, attribute_address) |
Default variant behavior
Example CSV
Import process
Prepare your CSV
- Keep column headers exactly as exported
- Leave
idempty for new variants - Include
idvalues for variants you want to update - Include
is_defaultvalues as required by the format (see note above)
Review changes
The platform shows a diff of what will change. New variants are highlighted and updated fields are shown side-by-side.
If you are working in a sandbox environment, changes only apply to sandbox. Promote your sandbox to live when you are ready. See the variants overview for more on testing workflows.
Best practices
- Test in sandbox first - Import to your sandbox environment before production
- Keep a backup - Export before importing to preserve your current state
- Validate data - Check phone numbers, URLs, and other data before importing
- Use consistent naming - Follow a naming convention that scales (e.g.,
City-Location) - One default only - Include exactly one variant with
is_default=truein your CSV (see note above)
Common use cases
Adding new locations
Export your CSV, add new rows with emptyid fields, and import to create new variants.
Updating phone numbers
Export, update theattribute_phone_number column, keep the id values, and import.
Changing default variant
The
is_default field does not control the default variant via CSV import. Use conv.set_variant() in your start function for reliable variant routing.Troubleshooting
Import fails with 'duplicate name' error
Import fails with 'duplicate name' error
Variant names must be unique. Check for duplicate entries in your CSV.
Changes don't appear after import
Changes don't appear after import
Refresh the page. If changes still don’t appear, check the import confirmation screen for errors.
Can't set a variant as default
Can't set a variant as default
The
is_default CSV field does not control the default variant. Use conv.set_variant() in your start function to programmatically set the active variant.Attribute columns not recognized
Attribute columns not recognized
Attribute columns must start with
attribute_. Check your column headers.Import succeeds but is_default doesn't apply as expected
Import succeeds but is_default doesn't apply as expected
The
is_default field does not control the default variant. The platform assigns the default based on creation order. Use conv.set_variant() in your start function to control which variant is active for each conversation.Import fails with 'Error saving your changes'
Import fails with 'Error saving your changes'
This can occur when the CSV contains invalid data. Check for:
- Empty variant name fields (every row must have a
namevalue) - Duplicate variant names
- Malformed attribute values
Validation error: 'too_small'
Validation error: 'too_small'
This usually means a row has an empty required field, such as
name. Ensure every row in your CSV has a value in all required columns. Remove any blank rows at the end of the file.Limits
- Maximum 1000 variants per project
- Maximum 50 custom attributes per variant
- CSV file size limit: 10MB
For larger imports or complex migrations, contact your PolyAI representative for assistance.

