Changes

Jump to navigation Jump to search
440 bytes added ,  06:45, 4 June 2008
== Ideas on How to do the import ==
My self-imposed goal was to capture all of the data provided -- assuming the owner of the data collected it for a reason and that they wouldn't be too happy with a loss of data in a migration to a new application.
=== Existing Work ===
My first instinct was to find info about somebody doing this before (e.g. APIs, Documentation, forum questions, Wikis)
I searched the wiki for importing or APIs and quickly found the SOAP Intro and Practical Examples, so I figured I was onto a fast track.
However, the soap example worked with a frontend form (which wasn't explained much and so I looked ) leading me to investigate more into what was requiredby the soap service. When I found the form in "examples", it did not work as an application entry point (because even though it defined ('sugarEntry', true); there was also an IF that pre-empted that definition)Not because other code was being loaded before the form. I did not immediately seeing see this cause for the example failure, so I put the example form outside the application directory and then successfully used the form to insert a single lead This is illustrated at http://www.sugarcrm.com/wiki/index.php?title=Creating_a_lead_capture_form_for_your_websiteSeeing that the example worked, but did not capture all the details provided in the data exercise, I knew I should look at the existing functionality of modules/Lead dealing with Import (dataMaps), the database abstraction layer (SugarBeans and/VarDefs) or the database directly to get a clear clearer picture of what I needed to label everything.
=== Use the Source Luke ===
My second instinct was to look at the source. Answers are always found in the source, with the caveat that it can be confusing and/or time-consuming to find those answers.
Looking at the full application import routines and the four-step forms for importing leads, it seemed was obvious that there was a lot of machinery that I didn't need or want to get involved with to simply import records. For instance, why deal with all I would not want to (re-)write the form and UI handling when I simply needed to insert records into a database. This made me reconsider using the SOAP example to write a scriptdo the job. In essence, it would only need to read the exercise data and create full records for the 50 provided leads.
From looking at the source code of the import routines, I noticed that the modules/Import/config.php file defined various types of data formats, and that the "Salesforce" one matched the needs I had for mapping source data to our application contacts.
Soap examples seem to have changed with the addition of a version number, so you must be careful about what example you use, and generally rely on the source to be the definitive source ;-)
== Some Issues discovered ==
"Import Step 2: Upload Export File" is a confusing title on the second step of the "Import Contacts" wizard. It could read "Import Step 2: Specify Data File to load"
4,558

edits

Navigation menu