Page 1 of 1

Adding columns to vicidial_list

PostPosted: Thu Jul 06, 2017 12:56 pm
by c20xh2
Asterisk version:

Connected to Asterisk 11.25.1-vici

Vicidal :

VERSION: 2.14-588a
BUILD: 170211-1041

Vicidal is using a cluster of 3x4gig

Hi,

Simple question, can I add columns to the "vicidial_list" / "vicidial_lists tables" ? I'm writing an automatique ftp2vicidb python3 script and a simple custom PHP CRM.

Adding something like 10 custom columns to those table would greatly simplify my task (I need to store more infos about the leads).

Thank you !

Re: Adding columns to vicidial_list

PostPosted: Thu Jul 06, 2017 2:43 pm
by Vince-0
Enable custom fields in system settings. Create custom fields on a list. Think this works over two database tables.

Re: Adding columns to vicidial_list

PostPosted: Thu Jul 06, 2017 4:27 pm
by mflorell
I would strongly suggest using the existing Custom List Fields features if you need more field data storage for leads.

Re: Adding columns to vicidial_list

PostPosted: Fri Jul 07, 2017 12:00 am
by c20xh2
Vince-0 & mflorell,

Thanks for your advice.

If anyone else is curious:

I created a custom field called "model".
Now I can see my custom field in the 'vicidial_lists_fields' table (linked to the right list with the list_id column).
Vicidial created the custom_(list_id) table where I can find the data from the list with all the custom field created.

Re: Adding columns to vicidial_list

PostPosted: Fri Jul 07, 2017 12:07 am
by c20xh2
One last question about this,

I see that in `vicidial_lists_fields, it creates a row with a field_id for every field and every list that use the custom field.

Ex:
Code: Select all
field_id    list_id    field_label    field_name    field_description
   1             1004    Modele    Modele    Modele voiture    
   2             1001    Modele    Modele    Modele voiture    1


Considering that I will have to add 10 custom field and that I will need to load 5 to 10 new list every weeks (using all the same custom fields). Do you think the perfomance of the DB could be affected by all those entry ?

Also,

When using the web interface to create custom fields for a list, Vicidial create a table name 'custom_(list_id)' and insert the lead_id with the infos from the custom fields.
Is it safe to manually create the table, copy the columns names and then insert my data there ? My goal here is to import list with custom field from a FTP during the night when no one is online.

Re: Adding columns to vicidial_list

PostPosted: Fri Jul 07, 2017 6:37 am
by mflorell
There shouldn't be any performance issues with custom fields. They were specifically designed to work with large amounts of data.

As for copying them, it's best to do that with the copy utility already built in to the admin web screens. You need to make sure the vicidial_lists_fields entries are there as well as the custom_X table.

Re: Adding columns to vicidial_list

PostPosted: Fri Jul 07, 2017 12:30 pm
by c20xh2
Thanks to your advice I ended up being able to write a script that import list with custom fields.

Everything work as needed :)

Thanks again !