Answered by:
Converting from SugarCRM

Question
-
I've written code to convert our SugarCRM data into MSCRM. I've got all the leads imported, and now I'm looking at accounts, contacts, and opportunities. Is there a way to call "Convert Lead" from the API? If not, is that doing anything "special" other than creating a new contact/account/opportunity and relating them to each other? Which entities relate to which in a conversion situation?Wednesday, May 6, 2009 11:00 AM
Answers
-
There is no "convert lead" message in the SDK. The basic process is that an account, contact, and/or opportunity are created from the lead and then the lead is qualified. Scott is correct in saying the lead is connected to the account and contact through the orginating lead field, but there's a little more to it.
There is a message in the SDK called InitializeFromRequest. You can pass to this message the lead and destination entity types and it takes care of all the mappings, except one. When a lead is converted to both an account and contact, the contact is set as the primary contact of the account.
I don't think I would explore converting the leads using custom code, unless converting the leads automatically is something that has to happen often. If the only time the leads will be converted automatically is during the initial data import, I would import the leads and related them to the leads, as Scott suggested. Just make sure to set the primary contact if necessary and set the lead to qualified.- Proposed as answer by Scott Sewell, Hitachi SolutionsModerator Wednesday, May 6, 2009 4:59 PM
- Marked as answer by DavidJennawayMVP, Moderator Tuesday, June 2, 2009 7:41 PM
Wednesday, May 6, 2009 4:12 PM
All replies
-
There may be a way to call the 'convert' functionality (or reproduce it in code) - but if you're importing, I wouldn't see it as needed.
Import the leads first, (be sure to stick a key value in a field that relates back to your source.) Then using the newly created lead's guid, create your Accounts/contact/opportunities and place the lead's GUID in the 'originating lead' field on the account/contact/opportunity as appropriate. - that's all that's needed.
Scott Sewell, CustomerEffective | http:\\blog.CustomerEffective.com | Twitter:@ScottSewell- Proposed as answer by Scott Sewell, Hitachi SolutionsModerator Wednesday, May 6, 2009 4:59 PM
Wednesday, May 6, 2009 11:11 AMModerator -
There is no "convert lead" message in the SDK. The basic process is that an account, contact, and/or opportunity are created from the lead and then the lead is qualified. Scott is correct in saying the lead is connected to the account and contact through the orginating lead field, but there's a little more to it.
There is a message in the SDK called InitializeFromRequest. You can pass to this message the lead and destination entity types and it takes care of all the mappings, except one. When a lead is converted to both an account and contact, the contact is set as the primary contact of the account.
I don't think I would explore converting the leads using custom code, unless converting the leads automatically is something that has to happen often. If the only time the leads will be converted automatically is during the initial data import, I would import the leads and related them to the leads, as Scott suggested. Just make sure to set the primary contact if necessary and set the lead to qualified.- Proposed as answer by Scott Sewell, Hitachi SolutionsModerator Wednesday, May 6, 2009 4:59 PM
- Marked as answer by DavidJennawayMVP, Moderator Tuesday, June 2, 2009 7:41 PM
Wednesday, May 6, 2009 4:12 PM -
Good info Richard -
Additionally, the nice thing with approaching this as a data import rather than attempting to programmatically reproduce the 'convert lead' functionality is that you can de-dupe your accounts / contacts on the way in.
(By duplicate avoidance I mean that you could create a lead, account and attach multiple contacts to that account and link everything together. - With the normal lead coversion, there's only one account/contact, and you would need to manually avoid the duplication of existing accounts.)
Scott Sewell, CustomerEffective | http:\\blog.CustomerEffective.com | Twitter:@ScottSewell- Edited by Scott Sewell, Hitachi SolutionsModerator Wednesday, May 6, 2009 4:58 PM hopefully added clarity.
Wednesday, May 6, 2009 4:54 PMModerator