crshman Posted May 3, 2008 Share Posted May 3, 2008 Hello Everyone! Well I managed to get some pretty tight integration with WHMCS and Saeven CRM Here is a breakdown of what this integration does: User logs into WHMCS Sends request to SCRM to login the user If the user doesn't exist, TWIRL kicks in to add the user Once the user exists, they are logged in to BOTH WHMCS and SCRM Here are some of the features this integration offers to your clients: Allows for users to "Submit" a ticket from WHMCS [users get forwarded DIRECTLY to the logged in ticket submission for their account!] Allows for users to "View" their tickets from WHMCS [users get forwarded DIRECTLY to the logged in ticket listing for their account!] A working example of all of this can be found here: http://secure.efirehost.com/whmcs/index.php Note: For this to work your WHMCS and SCRM MUST be on the same domain!! Now...the dirty stuff... First we have to add some code to WHMCS actionhooks.php This is found in whmcs/includes/actionhooks.php Find the following bit of code: function actionhook_ClientLogin($vars) { # This function runs when a client logs in # $vars["ClientID"] } and replace it with the following: (Be sure to change yadada to the link to YOUR SCRM install!) function actionhook_ClientLogin($vars) { # This function runs when a client logs in # $vars["ClientID"] $data = array( "action" => "login", "username" => $_POST['username'], "password" => $_POST['password'] ); $x = simplexml_load_file( 'https://yadada/xmlrpc/request.php?' . http_build_query( $data ) ); if( (int)$x->TR ){ $params = session_get_cookie_params( ); setcookie( (string)$x->cookie_name, (string)$x->cookie, time() + 60*60*24*60, '/', $params['domain'] ); } } That's it! Now WHMCS knows to tell SCRM to log a user in behind the scenes! Now the following bit of code goes through and changes all the occurrences of "supporttickets.php" with the link to your SCRM install. In WHMCS all the links that say "Your Tickets" now forward to SCRM to view tickets. (Be sure to change yadada to the link to YOUR SCRM install!) find ./ -name "*.tpl" -exec sed -i 's:supporttickets.php:https\:\/\/yadada/?tsrc=ticket_list:g' {} \; -print The following bit of code goes through and changes all the occurrences of "submitticket.php" with the link to your SCRM install. In WHMCS all the links that say "Submit a Ticket" now forward to SCRM to submit tickets. (Be sure to change yadada to the link to YOUR SCRM install!) find ./ -name "*.tpl" -exec sed -i 's:submitticket.php:https\:\/\/yadada/?tsrc=ticket_send:g' {} \; -print Now I know some of you are wondering....WHY would I do this if SCRM already has a drop in module for WHMCS....well here are a few of the advantages something like this offers: Users get to use the advanced ticket submission features SCRM offers You can modify the ticket submission requirements for your users through SCRM Users can view all their open, in progress, and closed tickets from SCRM A few more additions for those of you that want to tie together WHMCS and SCRM: The following bit of code goes through and changes all the occurrences of "downloads.php" with the link to your downloads section in your SCRM install. In WHMCS all the links that say "Downloads" now forward to SCRM. (Be sure to change yadada to the link to YOUR SCRM install!) find ./ -name "*.tpl" -exec sed -i 's:downloads.php:https\:\/\/yadada/?tsrc=downloads:g' {} \; -print The following bit of code goes through and changes all the occurrences of "knowledgebase.php" with the link to your Knowldegebase in your SCRM install. In WHMCS all the links that say "Knowledgebase" now forward to SCRM. (Be sure to change yadada to the link to YOUR SCRM install!) find ./ -name "*.tpl" -exec sed -i 's:knowledgebase.php:https\:\/\/yadada/?tsrc=knowledgebase:g' {} \; -print The following bit of code goes through and changes all the occurrences of "announcements.php" with the link to your Announcements in your SCRM install. In WHMCS all the links that say "Announcements" now forward to SCRM. (Be sure to change yadada to the link to YOUR SCRM install!) find ./ -name "*.tpl" -exec sed -i 's:announcements.php:https\:\/\/yadada/?tsrc=announcements:g' {} \; -print 0 Quote Link to comment Share on other sites More sharing options...
flaming Posted June 4, 2008 Share Posted June 4, 2008 Hi, This sounds great. Has it been tested with the latest build of WHMCS (3.6.1) ? Thanks 0 Quote Link to comment Share on other sites More sharing options...
crshman Posted June 5, 2008 Author Share Posted June 5, 2008 Hello, Indeed it has been tested with 3.6.1 0 Quote Link to comment Share on other sites More sharing options...
flaming Posted June 5, 2008 Share Posted June 5, 2008 Superb.. Will give it a bash on my test platform. Many thanks 0 Quote Link to comment Share on other sites More sharing options...
Roger Posted June 6, 2008 Share Posted June 6, 2008 I just purchased the Saeven CRM and they installed it and integrated it for me. Oh, and I'm using WHMCS v3.6.1. What is the main differences in your mod and theirs? I might add that I finally found a another company that gives the level of support that Matt does. I made the "Escapee" purchase of permanent license, unbranded and chat. These guys made me feel like a King. Not to mention their product is lite years ahead of what I had. 0 Quote Link to comment Share on other sites More sharing options...
Roger Posted June 6, 2008 Share Posted June 6, 2008 Never mind... I re-read the first post. 0 Quote Link to comment Share on other sites More sharing options...
flaming Posted June 11, 2008 Share Posted June 11, 2008 Hi, My SCRM and WHMCS are both on the same domain names but differant vhosts and IP's i.e WHMCS = https://my.company.com/clients SCRM = https://help.company.com The both reside on the same server. Will I still e able to use your integration ? 0 Quote Link to comment Share on other sites More sharing options...
Roger Posted June 13, 2008 Share Posted June 13, 2008 I'm using subdomains as well but on the same box. Although I believe yours would be ok as well. It might be a question best asked of Luke or Alex at Saeven|CRM. 0 Quote Link to comment Share on other sites More sharing options...
flaming Posted June 14, 2008 Share Posted June 14, 2008 Hi , Sorry for what if probably a dumb question, but are the following bits of code something I run via the comand line? or do I add them to somewhere ? find ./ -name "*.tpl" -exec sed -i 's:downloads.php:https\:\/\/yadada/?tsrc=downloads:g' {} \; -print Thanks 0 Quote Link to comment Share on other sites More sharing options...
Roger Posted June 14, 2008 Share Posted June 14, 2008 command line 0 Quote Link to comment Share on other sites More sharing options...
renavas Posted July 26, 2008 Share Posted July 26, 2008 Where exactly are written codes that tell us? 0 Quote Link to comment Share on other sites More sharing options...
crshman Posted July 26, 2008 Author Share Posted July 26, 2008 Hello Guys, Sorry, I totally forgot about this post! =( Where exactly are written codes that tell us? Written codes for what? 0 Quote Link to comment Share on other sites More sharing options...
wcsconcierge Posted October 12, 2008 Share Posted October 12, 2008 I just leased 3.7.1, and I also have Saeven CRM Auracle Help Desk. Can the two be integrated? I like Auracle's interface, but I love everything else about Auracle. Any hope? 0 Quote Link to comment Share on other sites More sharing options...
wcsconcierge Posted October 12, 2008 Share Posted October 12, 2008 Not -- sorry. It's late. I love Auracle's sleek interface, but I love everything else about WHMCS. 0 Quote Link to comment Share on other sites More sharing options...
crshman Posted October 12, 2008 Author Share Posted October 12, 2008 What type of integration are you looking to set up? I've worked with the two for a while now so I like to think I'm pretty knowledgeable on the subject.... 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.