Results 1 to 6 of 6

Thread: Populate new Opportunity via external program

  1. #1
    dholmes is offline Sugar Community Member
    Join Date
    Aug 2007
    Location
    Sarasota, FL
    Posts
    22

    Default Populate new Opportunity via external program

    I'm looking to populate a new Opportunity with data from an external program. Basically, we have an Excel sheet that's filled out for each Opportunity at a customer's site. We want to take some of the data from that Excel sheet and create and Opportunity with it.

    Reading the data from the Excel file is no problem - I can pull all of the necessary fields that we're looking for from the sheet just fine. I'm just getting stuck on how exactly to go about adding that to an EditView of an Opportunity without having an entry in the database. I want all of the relevant data shown on the screen for the user - they just need to pick the account that fits the Opportunity and then save it and go. Anyone have any pointers for how to go about doing this? The only thing I can come up with is to make some sort of temporary entry into the Opportunity table and pull that with EditView, but that seems rather hacky.
    Dann Holmes
    Star2Star Communications

  2. #2
    swhitlow's Avatar
    swhitlow is offline Sugar Community Member
    Join Date
    Jun 2005
    Location
    Indianapolis, IN.
    Posts
    204

    Talking Re: Populate new Opportunity via external program

    Not sure which thing you are wanting here. But, I will give it a shot:

    #1. If you are wanting to populate data from an Excel spreadsheet into SugarCRM regularly - I would look into a JitterBit/SOAP solution. Using Jitterbit to tie the Excel spreadsheet data to the WSDL endpoints of the SOAP connection. Then, building a small class to use SugarSOAP to actually insert the data into the Opportunity. You can read more about SOAP on the developer Wiki.

    #2. If you are just wanting some of the Excel data present on the Opportunities module, I would simply ditch the Excel spreadsheet and start using custom fields in Sugar Studio and start editing away. Pretty soon, you will not need the Excel spreadsheet at all.

    I guess the main line above that was confusing for me was the "adding that to an EditView of an Opportunity without having an entry in the database" line. Just not sure about what you mean here.
    Scott Whitlow
    Lead Software Engineer/SugarCRM Developer
    swhitlow at gmail.com
    Indianapolis, IN. USA

  3. #3
    fedepia is offline Sugar Community Member
    Join Date
    Aug 2007
    Location
    Rosario, Argentina
    Posts
    104

    Default Re: Populate new Opportunity via external program

    you could use set_entry web service
    here you can find info about this
    http://www.sugarcrm.com/wiki/index.p...tical_Examples

  4. #4
    dholmes is offline Sugar Community Member
    Join Date
    Aug 2007
    Location
    Sarasota, FL
    Posts
    22

    Default Re: Populate new Opportunity via external program

    The initial goal was going to be to use the internal Sugar Opportunity module to allow some of the functionality - but I think I'm going to have to go the SOAP route.

    Just in case, the workflow of what I was wanting to do:
    1. Excel sheet is filled out at a customer's site. I know that this could be set up within Sugar, but there are quite a few other things going on in the Excel sheet that we don't want to move to Sugar (just yet)
    2. Salesperson goes to a module within Sugar and uploads the Excel sheet.
    3. Using PHP and some other tools, parse the Excel sheet and extract the information we're looking for.
    4. Present that information in a nearly-filled-out Opportunity form with a lot of custom fields that hold the data - just get the sales user to select an account and fill in a couple of other options and submit.

    It's getting the information from the Excel data array into an Opportunity that I was stuck on - and don't see any easy way through.

    Thanks to everyone for the help, though. I'm going to investigate the SOAP route and see what I can come up with. I'll probably just host that somewhere and add it as a Portal tab as an option.
    Dann Holmes
    Star2Star Communications

  5. #5
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Populate new Opportunity via external program

    If I understand you correctly this is already in Sugar. Under Opportunities you can import opportunities in a number of formats. With Excel you just save it as a CSV then import that.

  6. #6
    dholmes is offline Sugar Community Member
    Join Date
    Aug 2007
    Location
    Sarasota, FL
    Posts
    22

    Default Re: Populate new Opportunity via external program

    Quote Originally Posted by eggsurplus
    If I understand you correctly this is already in Sugar. Under Opportunities you can import opportunities in a number of formats. With Excel you just save it as a CSV then import that.
    If it were a simpler spreadsheet that would be a more viable option, but it's huge, complicated and getting to a point of exporting to CSV, then importing again just adds more steps into the process that sales can manage to make mistakes on. I'm trying to work towards a one-shot solution on this particular problem, unfortunately. Plus there are some additional things that will need to be selected that won't be on the Excel file but will be required in the Opportunity.
    Dann Holmes
    Star2Star Communications

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Edit Opportunity Contact is broken?
    By jengle in forum Help
    Replies: 2
    Last Post: 2007-08-06, 08:12 PM
  2. Replies: 0
    Last Post: 2007-02-05, 09:49 PM
  3. Replies: 9
    Last Post: 2006-07-18, 08:41 PM
  4. External trigger of email send
    By mericson in forum Feature Requests
    Replies: 0
    Last Post: 2005-08-16, 06:37 PM

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
  •