Jump to content

Saeven CRM Integration


Recommended Posts

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:

  1. User logs into WHMCS
  2. Sends request to SCRM to login the user
  3. If the user doesn't exist, TWIRL kicks in to add the user
  4. 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:

  1. Allows for users to "Submit" a ticket from WHMCS [users get forwarded DIRECTLY to the logged in ticket submission for their account!]
  2. 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

Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated