Results 1 to 2 of 2

Thread: Importing 600K Leads

  1. #1
    manuel2283 is offline Junior Member
    Join Date
    Jul 2009
    Posts
    4

    Default Importing 600K Leads

    Hello, I am looking to import a fairly large number of leads about 600k I am looking to do and executable php script and run that thru ssh. My question is I am trying to put together a statement that would import

    first name, last name, email and home phone.

    I am using the function below to generate the Auto ID but I am still struggling with how to append the email address correctly to the email table and how to structure the MYSQL to incrementally count the rows on the the database with the 600K records any input would be greatly appreciated really stuck

    PHP Code:
    function create_guid()
    {
            
    $microTime microtime();
            list(
    $a_dec$a_sec) = explode(" "$microTime);

            
    $dec_hex sprintf("%x"$a_dec1000000);
            
    $sec_hex sprintf("%x"$a_sec);

            
    ensure_length($dec_hex5);
            
    ensure_length($sec_hex6);

            
    $guid "";
            
    $guid .= $dec_hex;
            
    $guid .= create_guid_section(3);
            
    $guid .= '-';
            
    $guid .= create_guid_section(4);
            
    $guid .= '-';
            
    $guid .= create_guid_section(4);
            
    $guid .= '-';
            
    $guid .= create_guid_section(4);
            
    $guid .= '-';
            
    $guid .= $sec_hex;
            
    $guid .= create_guid_section(6);

            return 
    $guid;

    }
    function 
    create_guid_section($characters)
    {
            
    $return "";
            for(
    $i=0$i<$characters$i++)
            {
                    
    $return .= sprintf("%x"mt_rand(0,15));
            }
            return 
    $return;
    }
    function 
    ensure_length(&$string$length)
    {
            
    $strlen strlen($string);
            if(
    $strlen $length)
            {
                    
    $string str_pad($string,$length,"0");
            }
            else if(
    $strlen $length)
            {
                    
    $string substr($string0$length);
            }
    }

    function 
    microtime_diff($a$b)
    {
            list(
    $a_dec$a_sec) = explode(" "$a);
            list(
    $b_dec$b_sec) = explode(" "$b);
            return 
    $b_sec $a_sec $b_dec $a_dec;

    » Operating system type and version (CentOS)
    » Sugar version and edition 5.2.0 (Build 5380)
    » Webserver type and version Apache/2.2.3
    » PHP version (i.e. 5.1.6)

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Importing 600K Leads

    You need to put the address in email_addresses and the record that links it to the appropriate contact is in email_addr_bean_rel.

    That aside, if you use the SOAP API you wouldn't need to know the structure.
    Regards,

    Angel Magaña
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Importing Leads stops at 220 leads
    By gerald29 in forum Help
    Replies: 0
    Last Post: 2008-04-05, 05:01 AM
  2. Importing Leads v4.5
    By dbcrazy in forum Help
    Replies: 0
    Last Post: 2008-03-07, 07:56 PM
  3. 5.0.0b not importing leads
    By toddebner in forum Help
    Replies: 6
    Last Post: 2008-02-22, 04:37 PM
  4. CSV not importing to Leads
    By Braddock in forum Help
    Replies: 0
    Last Post: 2007-10-03, 04:52 AM
  5. Help importing Leads
    By Proware in forum Help
    Replies: 1
    Last Post: 2006-04-24, 03:09 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •