Results 1 to 5 of 5

Thread: Import Leads from Database

  1. #1
    errorfree is offline Member
    Join Date
    Sep 2009
    Location
    Brooklyn, NY
    Posts
    5

    Default Import Leads from Database

    How can I set up sugar so that it automatically imports lead information from a database (SQL or PHP) when new data is added. I then need it to assign the lead to the appropriate user depending on the lead category.

    All help is greatly appreciated, Thanks.

    Sugar Version: 5.2 Community Edition
    Web server: Apache
    PHP version: not sure
    MySQL version: not sure
    Operation system: Linux

  2. #2
    salesagility's Avatar
    salesagility is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    2,379

    Default Re: Import Leads from Database

    PHP is not a database.

    You would need to write a script that selected from one database and inserted it into SugarCRM preferable via the SOAP API.

    You could then allocated the lead.

  3. #3
    datasponge is offline Sugar Community Member
    Join Date
    Mar 2008
    Location
    San Jose, CA, USA
    Posts
    553

    Default Re: Import Leads from Database

    Depends on how automatic you need it.

    You can write sql statements that select from the other database and insert into the sugarcrm users table. You could run it from a crontab entry so it runs regularly at set times and write a timestamp to a custom table to track when last run and use to select newly added records since that timestamp.

    You could also write a php page to do it on demand or run as a script, again using cron.

    The queries have to also create any relationships to accounts and contacts(if needed) and potentially check if the user already exists in Sugar, so they can get pretty complicated.

    If you need real-time, you'd have to hook into the other db to have it initiate the action (like running a php page or use something like triggers so you'd have to figure that out.

    Setting the assigned entry is pretty simple with a MySQL case statement in the query.

    We have a bunch of SQL scripts we run overnight, plus other scripts for example to update from a change of address database, but we don't use the Leads module, so you'd have to adapt for Leads. So if you can narrow down where you need help, I could probably provide some samples.

    Phil

  4. #4
    errorfree is offline Member
    Join Date
    Sep 2009
    Location
    Brooklyn, NY
    Posts
    5

    Default Re: Import Leads from Database

    Thank you very much guys, I will give it a try.

    Stan

  5. #5
    errorfree is offline Member
    Join Date
    Sep 2009
    Location
    Brooklyn, NY
    Posts
    5

    Default Re: Import Leads from Database

    The process is as follows:

    Customer fills out a "Request Info Form" on my website. His or her information goes into MySQL and also to me via e-mail. How can I set up Sugar to also create a lead when this form is submitted?

    Stan

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 2009-09-23, 06:33 AM
  2. how to import 4.5.1 database into 5.0.0a
    By marcuscherry in forum Installation and Upgrade Help
    Replies: 2
    Last Post: 2008-02-26, 07:43 PM
  3. how to add a database field in during import
    By sandeep.saurav in forum Installation and Upgrade Help
    Replies: 1
    Last Post: 2008-01-04, 07:07 AM
  4. Max import size or SQL database limited
    By casibbald in forum General Discussion
    Replies: 4
    Last Post: 2005-01-25, 08:11 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
  •