Want to convert a lead with all associated email, history, notes and so on to a customer. when converted to a customer lead will be removed/deleted from leads.
Just to clarify you want to delete the lead once it has been converted? Usually it is wise to retain that history on the Customer’s record. But if you would like that then I would suggest a logic hook on Lead with the condition of:
if($bean->fetched_row[‘converted’] != 0 && $bean->converted == 1){
// set the lead as deleted
$bean->deleted = 1;
}
Something to that affect.
Awesome thank you, How do we add a logic hook? We also want to be able to convert that lead to a customer not a contact. How do we do that?
To add logic hook you can visit a number of tutorials online - you can use sugarcrm or suitecrm tutorials as they follow the same structure for logic hooks With regards to converting it to a Customer, is this a custom module you’ve created? If so, thenyou will need to map all the information from the lead’s fields into appropriate Customer’s fields.
http://cheleguanaco.blogspot.co.uk/2009/06/simple-sugarcrm-logic-hook-example.html
^^ Above is a simple tutorial. Essentially you will need to do is:
- Add what type of logic hook you wish for Leads (I was go for the before save logic hook)
- Create the Class (and file) that the logic hook will call within custom/modules/leads/
- Inside this class/function you then check if the lead has been converted (from not being) and create a new Customer bean with all the information you need.
Copying the attachments and history may be more difficult as you will need to replicate all the relationships that Leads have in Customers e.g. activities (to store all the emails and notes etc).
Are there any video tutorials explaining the process? I might be going at this the wrong way. I just want to have a crm that will fit our business model. And I do not think I understand the process from a customer to a lead to a customer.