Adding columns to vicidial_list

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Adding columns to vicidial_list

Postby c20xh2 » Thu Jul 06, 2017 12:56 pm

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 !
c20xh2
 
Posts: 95
Joined: Mon Feb 20, 2017 2:28 am

Re: Adding columns to vicidial_list

Postby Vince-0 » Thu Jul 06, 2017 2:43 pm

Enable custom fields in system settings. Create custom fields on a list. Think this works over two database tables.
Vince-0
 
Posts: 272
Joined: Fri Mar 02, 2012 4:27 pm
Location: South Africa

Re: Adding columns to vicidial_list

Postby mflorell » Thu Jul 06, 2017 4:27 pm

I would strongly suggest using the existing Custom List Fields features if you need more field data storage for leads.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Adding columns to vicidial_list

Postby c20xh2 » Fri Jul 07, 2017 12:00 am

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.
c20xh2
 
Posts: 95
Joined: Mon Feb 20, 2017 2:28 am

Re: Adding columns to vicidial_list

Postby c20xh2 » Fri Jul 07, 2017 12:07 am

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.
c20xh2
 
Posts: 95
Joined: Mon Feb 20, 2017 2:28 am

Re: Adding columns to vicidial_list

Postby mflorell » Fri Jul 07, 2017 6:37 am

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.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Adding columns to vicidial_list

Postby c20xh2 » Fri Jul 07, 2017 12:30 pm

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 !
c20xh2
 
Posts: 95
Joined: Mon Feb 20, 2017 2:28 am


Return to Support

Who is online

Users browsing this forum: No registered users and 34 guests