VICIdial custom fields: types, setup and loading leads
How to add custom fields to a VICIdial list: switch the feature on, where to define a field, what each field type does, and how leads fill them.

To the point
A custom field is an extra question on a list: a policy number, a renewal date, a pick-list. To add one:
- Switch the feature on. It is off by default, for the whole system.
- Define the field on the list: a label, a name the agent reads, and a type.
- Fill it: agents type in it on the FORM tab, and leads loaded with a value for its label arrive already filled.
What a custom field is
VICIdial gives every lead the same standard fields: name, address, phone, email, comments and so on. A custom field adds a field of your own to one list, and only that list. Agents see the list's custom fields in a FORM tab on the agent screen.
Three things to know first:
- It belongs to a list, not to a campaign. Two lists in the same campaign can ask different questions.
- The feature is off by default. The system setting Enable Custom List Fields is 0 until someone changes it, and until then the custom fields page shows
ERROR: Custom Fields are not active on this system. - A field's label is also its key. It names the column that holds the answers, and it is the name you use to load a value into it.

Add a field in admin.php
- Open the list in Lists and look for the line Custom fields defined for this list, with a count. It links to the custom fields page for that list.
- Add a field. Your user needs User Level 8 or more and Custom Fields Modify set to 1 (on Modify User, shown once the feature is on).
- Fill the form below, and save.
| Setting | What it does |
|---|---|
| Field Label | The database name. Unique within the list, 2 to 50 characters, no spaces or punctuation. |
| Field Name | What the agent reads next to the field. Spaces are fine, punctuation is not, 2 to 50 characters. |
| Field Description | Optional, up to 100 characters, shown in admin only. |
| Field Rank | The row on the form, lowest on top. |
| Field Order | Fields with the same rank share a row, in this order, left to right. |
| Re-Rank Fields Below | YES moves the fields at an equal or lower rank down one place. Default NO. |
| Field Help | Optional text the agent sees behind a help link. |
| Field Default | The value used when nothing is loaded. NULL turns it off. |
| Field Required | Y forces the agent to fill it before hanging up; INBOUND_ONLY does so only on in-group calls. Needs the campaign's Allow Required Fields option on too. |
| Field Name Position | LEFT or TOP. Default LEFT. |
The field types
Field Type decides what the agent sees. The default is TEXT.
| Type | What the agent gets |
|---|---|
| TEXT | A single line. Field Size is the characters shown, Field Max the characters allowed. |
| AREA | A multi-line box. Size is the width, Max the rows shown. Use it for long notes. |
| SELECT | A pull-down menu with one choice. |
| MULTI | A list box where several choices can be picked. Size is how many show. |
| RADIO | Radio buttons, one choice. |
| CHECKBOX | Checkboxes, several choices. |
| DATE and TIME | A calendar popup, and a time box. A default of 3 means three days, or three minutes, from now. |
| DISPLAY | Text shown to the agent, not editable, with the field name. |
| SCRIPT | Text from the options box, with script variables filled in, and no field name. |
| READONLY | The stored value, shown and not editable. |
| HIDDEN | Not shown, but data can be imported into it and exported from it. Scripts and web forms can read it. |
Other types exist for special cases: HIDEBLOB for data stored as a BLOB, SWITCH to move the form to another list's fields, SOURCESELECT for a menu that follows another field, and BUTTON to save the form and reload it.
For SELECT, MULTI, RADIO and CHECKBOX, fill Field Options with one choice per line, as label, text. Neither part may contain punctuation, and the first has no spaces, for example electric_meter, Electric Meter. For RADIO and CHECKBOX, Option Position sets HORIZONTAL or VERTICAL.
Limits and copies
- Field Cost. The fields on one list have a combined cost that must stay under 65,000. That allows hundreds of fields, but a few very long TEXT fields use it up fast. Pick AREA for long text, which is stored differently.
- Default fields as labels. A field can use a standard label such as
vendor_lead_code,emailorcomments. VICIdial then reads the standard column instead of adding a new one. - Field Duplicate. When you create a TEXT field, it can duplicate an existing one, so a value typed in the copy is written back to the original.
- Copy Option. When you copy fields from one list to another, APPEND adds the ones that are missing and touches nothing else. UPDATE overwrites the matching ones, and data can change or be lost. REPLACE removes all fields on the destination list and their data.
A label can't be changed in admin.php once the field exists. To change it there, you remove the field, which deletes its column and every answer in it, and add a new one. So pick labels with care, and check what is stored before you remove a field.
Filling the fields
By the agent. Agents see the list's fields on the FORM tab of the agent screen.
By add_lead. When a lead is added through the add_lead API with custom_fields=Y, send one parameter per field label and the values are stored in the list's custom table. A defined field you do not send is written empty. The add_lead guide covers the call, and loading a CSV covers the file route.
By API. The non-agent API can read a list's definitions with list_custom_fields (a user with Modify Lists), and update_list can add, change or delete one field per request with custom_fields_add=Y, custom_fields_update=Y or custom_fields_delete=Y. Those three need Custom Fields Modify.
In the Trustane console
Open the list in Lists and pick the Extra questions tab:
- If the server shows Custom fields are switched off on this server, press Switch it on. This applies to the whole server.
- Press Add a field, and pick a type from the groups: Text, Choice, Date and time, Display only, Special.
- Set what the agent reads, the label, the choices and whether it is required.
- Check Preview as an agent, then press Review changes. The plan lists what will change on the server, and Apply to the server makes it live. A change that deletes answers is counted first and asks you to type that number. A removed field can't be brought back.
- Open Lead-loading keys to see the label for each field. Each label is the key for loading leads, by file or by API.
Field sets save the whole group of fields under a name, so you can use it on another list or another server. See loading a CSV to fill the list.
- Start free for 7 days and add your first custom field.
VICIdial is a trademark of its owner. Trustane is an independent hosting provider.
Sources
- VICIdial help text for the custom field settings (Enable Custom List Fields, Field Label, Field Type, Field Options, Copy Option and the rest), SVN r4038
- VICIdial non-agent API, the custom_fields switch on add_lead and the custom field functions on lists, SVN r4038
- Trustane's model of a list's custom fields, read off a real ViciBox
- The Extra questions tab and its field builder in the console
- Trustane's own flow diagram of a custom field from its definition to the agent screen, drawn from the checks above
Every VICIdial guide and article in one place: the complete VICIdial guide.
Managed VICIdial hosting

