How to Import Activities Through Database in Vtiger CRM?

How to Import Activities Through Database in Vtiger CRM?

Vtiger CRM have not provided any extension to import activities. Activities can be imported through database by following steps.

 

Go to Database of vtiger,activity data is mainly stored in following tables.

vtiger_activity

vtiger_activity_cf

vtiger_crmentity

vtiger_crmentityrel

vtiger_seactivityrel

For creating activity you may go to vtiger_crmentity_seq,this is id of last created record,note this id.

Now go to vtiger_crmentity.insert new record in this table,you may notice a field crmid, put the value an increment of 1 from the id u noticed from vtiger_crmentity_seq (for ex,if id in vtiger_crmentity_seq was 1,you need to put value of id as 2 in vtiger_crmentity).

There is another field  setype in  vtiger_crmentity,put the value as calendar in this field,label is the activity name.(you may fill other fields as per your data).

After adding record here move to vtiger_activity,put crmid value from vtiger_crmentity in activity_id,add other fields,after this in table vtiger_activity_cf,put same value of crmid in activity_id.

If you want to relate this activity to organisation,contacts and other entities, just move to vtiger_crmentityrel,put entity id(lead,contacts etc) id   in crmid fields,in module field put

the name of that entity(for eg. you want to merge lead put the value Leads in this field),in relcrmid put activityid in relcrmid and calendar in relmodule.

Lastly in table vtiger_seactivityrel just put module ID in crmid, activityID in activity.

Now go to activity tab inside that particular module, you may find activity attached to that entity.

For any further queries feel free to Contact Us we would be glad to help you.