+ Reply to Thread
Results 1 to 8 of 8
This is a discussion on Moving Homes - From MySQL to Salesforce within the Salesforce PHP Tutorials forums, part of the Salesforce category; Hi Mike, I am currently making a job-search website. Job seekers would
  1. #1
    Herman.C is offline Junior Member
    Join Date
    Dec 2008
    Posts
    4

    Moving Homes - From MySQL to Salesforce

    Hi Mike,

    I am currently making a job-search website. Job seekers would come in register and apply for the jobs they want, employers would come and post their open positions in their company. Nothing too spectacular. Currently this is all handled via the use of PHP and all the data is stored within MySQL. However as my company has now switched to Salesforce Enterprise Edition, they would also like for the website to be Salesforce based as well. i.e. ditch MySQL and store everything on Salesforce.

    Since I have never used Salesforce before I am totally clueless on what I need to do, I've read many post regarding to MySQL but I am still a bit confused on how I would do that.

    If you could please help me on to how I would migrate/store the information to Salesforce and change my PHP scripts to connect/store information to Salesforce you would definitely make my Christmas very joyful indeed.

    Merry Christmas to you and everyone

  2. #2
    mike's Avatar
    mike is offline Administrator
    Join Date
    May 2007
    Location
    Wylie, Texas
    Posts
    607
    Blog Entries
    16
    Herman,

    Merry Christmas and Happy New Year to you too!! Thanks for joining my site!


    From the way that I read this, you have two tasks at hand:

    1) Migrate you existing data from MySQL to Salesforce using PHP
    2) Change your existing scripts to inset into Salesforce instead of MySQL.

    I am sure that I got that right, but want to make sure

    Your problem and/or task should not be that hard.

    How many records are we talking about?

    So what you would or could do for number 1 is > Create your object/table in Salesforce and add any custom fields to a the salesforce object/table that you want and map the data from MySQL to salesforce and write a script or use the salesforce data loader to move the data. If this sounds foreign to you, I can try and talk to you offline or in more detail.

    For number 2 it will be easier to change your current scripts, basically mapping those to the same fields ( I have some example scripts on here somewhere) and then the data would go straight from the scripts into Salesforce.

    Since you have an enterprise edition, you should have the API enabled and should be ready. I would suggest that you signup for a developer addition, it is like having a small sandbox and it is free, just use an alternate email address. You can test your scripts there.

    You can even install eclipse and the salesforce developer tool add-in and then create the tables/objects in your developer org and export it to your production org.

    I know that this sounds overwhelming or even crazy, but it really doesn't take too much and is really easy

    Anyway that is all for now, thanks again for joining and when you are ready you can ask me the next set of questions

    ~Mike

  3. #3
    tsuyoshi.kihara is offline Junior Member
    Join Date
    Dec 2008
    Posts
    2
    Hi,

    Don't mean to hijack thread, but I just joined up today and I have a similar situation. We're planning to migrate all of our customer/sales related information onto the CRM. We're keeping the mySQL db for system data such as sessions and the heavier product-descriptive data and images.

    I'm having to overcome several obstacles in my dev:
    Firstly, our existing system is PHP4, so it was a bit of job to re-jig it to PHP5 for the SF API. Secondly we're building quite a complex SF customisation to integrate with non-web controlled leads with our sales team, so it's turned into a bit of a rewrite of our PHP system to accommodate the advantages offered by SF.

    I also noticed on another thread that there's some delay with using the API/SalesForce as a main database that going to affect performance in relation to mySQL. Does anyone have any comments about the disadvantage of moving homes like this to SF?

    Merry Xmas & Happy New Year!

    Tsuyoshi

  4. #4
    mike's Avatar
    mike is offline Administrator
    Join Date
    May 2007
    Location
    Wylie, Texas
    Posts
    607
    Blog Entries
    16
    Tsuyoshi -

    There is a delay with using the API to update a local copy of MySQL, but it is faster than updating Oracle from what I have worked with


    You seem to have some work cut out for you on some of the Apps.

    I dont really see any problems using PHP with Salesforce, I feel that all integration with SF will be slower than using the App itself when you are developing something that connects via the API

    Anyway just my two cents


    ~Mike

  5. #5
    Herman.C is offline Junior Member
    Join Date
    Dec 2008
    Posts
    4
    Hi Tsuyoshi,

    Its seems that I am not alone! I sent a Mike a private message regarding my problem. If you would like to know if your problem is like mine, I can post that message. I think we might be able to solve the problem together and get it over and done with!

    Herman

  6. #6
    tsuyoshi.kihara is offline Junior Member
    Join Date
    Dec 2008
    Posts
    2
    Cool - well any info will help!

    For sales activities - I'm currently working on getting something working like the web2lead functionality. I need to get PHP to upload lead/account/contact information to SF and also generate a sales object with all the info included.

    I'm also thinking about tying web-user accounts (customers) directly to the SF.com 'accounts' object with a custom field to hold an encrypted password field so that all user info is managed like accounts on SF..

    What I'm finding with this is that 1 call to SF eats something like ~2 seconds running time. If I have a call to check the user credentials, then another call to update their new account details, then another to open a new sales object in mySQL I will just run different classes which do their own database comms and connect 3-4 times with the database on one user action. On Salesforce on the other hand, we're looking at 2 seconds per connection, so 6-8 seconds for the communication if I do it this way!

    I think that 1 call to SF per user action is the reasonable limit, so I'm trying to root around the manuals to try and organise the calls to SF in single packages. I suppose it will mean that I'm going to have to store quite a lot of data in the session on the mySQL database, or some arrangement to copy or store the bulk of the data on mySQL then use the SF link just to store concluded / confirmed changes.

    <EDIT> Bummer - well just uncovered the API doc which says that you can only bundle objects of the same type together in an SObject array to send in 1 create() call. So that kind of puts a damper on my above plans </EDIT>

    Tsuyoshi
    Last edited by tsuyoshi.kihara; 01-02-2009 at 06:52 AM.

  7. #7
    Herman.C is offline Junior Member
    Join Date
    Dec 2008
    Posts
    4
    Hi tsuyoshi.kihara

    Mike has kindly said that he will be able to help me once he gets back from his new years holiday. Once we get the coding sorted out I'll post you my script and hopefully it may help you. The following is what I sent Mike earlier.


    Since the website is still yet to be released, there aren't that many entries in the MySQL database. So little in fact that it is probably easier to simply start from scratch again in Salesforce. So all I simply need to do is change my PHP code to send the information to Salesforce and not MySQL.

    Most of the information I will be storing are very generic, like normal strings and integers and some long text. The only tricky thing is the password and maybe the ID numbers (auto increment).
    My main problem is changing the PHP code to store to Salesforce and not to MySQL.


    Will post again


    Herman

  8. #8
    Herman.C is offline Junior Member
    Join Date
    Dec 2008
    Posts
    4
    Hi Mike,

    Most of the PHP queries that I have include the following: mysqli connections,
    select data queries, and subsequent result and num rows queries,
    limit/order by, insert & updates.

    Nothing major at all, if you could show me what the Salesforce equivalents are for those MySQL queries are it would be hugely appreciated.

    With so many reads to this topic I am sure we all can learn a thing or two from you!


    Many thanks


    Herman

+ Reply to 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

SEO by vBSEO 3.5.2