+ Reply to Thread
Results 1 to 5 of 5
This is a discussion on Drupal CMS SF Integration within the Salesforce Coding Discussions forums, part of the Salesforce category; Hi, I am trying to integrate salesforce into our website which is
  1. #1
    Lantzvillian is offline Junior Member
    Join Date
    Jun 2009
    Posts
    10

    Drupal CMS SF Integration

    Hi,

    I am trying to integrate salesforce into our website which is using drupal 6.x. Put alot of time into thinking of a logical solution and usability. Mostly the portal is my biggest concern and I don't want to just "include" it like SF suggests. If you refresh the page the user gets logged out....

    The things I am after are for a user to login only once and have the salesforce portal seamless so the user doesn't have to login twice.

    If a user registers for the site they become a lead (this can be done with a modified login on drupal and a web-to-lead)

    Then once the admin authorizes the account they can be shoveled into a group container. This is where things get interesting:

    I then want the admin user to be able to click a link/button and that lead then gets converted into a contact. This will also enable the self service portal user and give the user a common password. ( Common pass to avoid db discrepancies)

    At this point I can assign the user to another group which enables a menu for this and does a redirect to hide the common password.

    The other large problem I have then, is if the user changes their email on the Drupal account, how do you synchronize it with the SF portal username/email. This looks to be a huge pain in the rump.

    I'd love to help develop something for this and share it. I imagine there are plenty of companies out there that are moving to Drupal, but SF makes integration plenty hard.

    Thanks,

    Ron

  2. #2
    mike's Avatar
    mike is offline Administrator
    Join Date
    May 2007
    Location
    Wylie, Texas
    Posts
    607
    Blog Entries
    16
    Quote Originally Posted by Lantzvillian View Post
    The things I am after are for a user to login only once and have the salesforce portal seamless so the user doesn't have to login twice.
    Does Drupal have some sort of Ldap integration that allows for the use of single sign on or MS Active Directory support? I am sure it does, but is probably not that easy to implement. Of course if these users are external to your internal systems ,then what I am expressing goes right out the window.

    Sorry i am not familiar with Drupal, I do know of it and hear that it is a wonderful application.

    Quote Originally Posted by Lantzvillian View Post
    The other large problem I have then, is if the user changes their email on the Drupal account, how do you synchronize it with the SF portal username/email. This looks to be a huge pain in the rump.

    Couldn't you use a trigger in MySQl or something like that? I know that it depends on your version of MySQL or whatever RDBMS that you are using. We use PL/SQL in Oralce to write triggers, MySQL :: MySQL 5.0 Reference Manual :: 18.3 Using Triggers, or maybe you could right a script to run on CRON that would pull the users and their email address, compare it live to Salesforce and then update it that way?

  3. #3
    Lantzvillian is offline Junior Member
    Join Date
    Jun 2009
    Posts
    10
    Writing a trigger to watch for a change to update emails would solve the sync issue problem. What I would do as far as the php to do the update on the sf side of things boggles me.

    I guess a trigger for self service portal would do the trick if a role change happens.
    What would you write for the php to change a lead to a contact and enable self service?

    Thanks Mike, your help is really appreciated.

  4. #4
    Lantzvillian is offline Junior Member
    Join Date
    Jun 2009
    Posts
    10
    Hi Mike, I just figured out how to update the email field in a contact through SOAP/PHP But this brings about:

    1.) How do I determine the user ID so this transaction can take place?
    2.) I still need to figure out how to take a lead and turn them into a Contact. Major blocker here...

    The trigger is easy, I had a quick thought. Drupal has whats called triggers and actions. Basically they are stored functions that are executed when some condition is met. They are modular, fairly easy to program ( written a few neat ones that email under certain circumstances) and are reliable.

    Everytime the user updates their profile, this action will run and update the account. Score!!!
    Last edited by Lantzvillian; 06-08-2009 at 11:19 AM. Reason: clarification

  5. #5
    mike's Avatar
    mike is offline Administrator
    Join Date
    May 2007
    Location
    Wylie, Texas
    Posts
    607
    Blog Entries
    16
    I would create a local replication system of your contacts table in Salesforce to MySQL and then you could get the Id to update from that table

    You could setup a CRON job script to truncate your contacts table and then refresh it every night or twice a day or whatver. Or you could query you salesforce object live using something like the email address in the where clause

    ~Mike

+ 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