Jump to content

Extended Support Service Without Kayako


Recommended Posts

Just though I would share this simple mod.

 

I will be looking to sell an extended 12 month email support as a service.

 

Obviously you can use Kayako to do this but this is a nice clean way to see if a client has the support when they submit a ticket.

 

First add a extrafiled to Custom Clients Fields. I named mine as Email Support and made it a tick box.

 

Then you will need to add a product and call it Email Support or whatever and set your pricing.

 

You will need to be able to view your database for the ID's of these fields. Or if you do not feel you can do that you can get the ID's from the URL's in the admin area. I can show you how if you want, just request.

 

I use ezsql class for my queries here but it will be easy to convert into any sql.

 

I have then created a new php files which I will run a Cron Jo Daily to update this tick box on the extrafield.

 

Here is the code.

 

## Database Class ##
include_once "../ezsql/ez_sql_core.php";
include_once "../ezsql/ez_sql_mysql.php";
// Initialise database object and establish a connection
$db = new ezSQL_mysql('db_user','db_pass','db_name','localhost');
/**********************************************************************/

/*** Cron to Update Email Support For Clients ***/
/*** First Delete the tick boxes to remove all support ***/
$db->query("DELETE FROM tblcustomfieldsvalues WHERE fieldid = 12");  // fieldid is the extra field from the tblcustomfields table.

/*** Second loop all of the clients ***/ 
$clients = $db->get_results("SELECT id FROM tblclients WHERE status = 'Active'"); // Make sure client is active.
foreach ( $clients as $client )
 {
  	// Loop the clients hostings packages and make sure the package is Active //
if ($hostings = $db->get_results("SELECT userid, packageid FROM tblhosting WHERE userid = ".$client->id." AND domainstatus = 'Active' "))
  {
    foreach ($hostings as $hosting)
	  {
	    if($hosting->packageid == 7): // If they have package id 7 (email support. Add to the extrafields //
			$db->query("INSERT INTO tblcustomfieldsvalues (fieldid, relid, value) VALUES (12,".$hosting->userid.",'on')");
		endif;
	  }
  }
  else
  {
  // No results
  }
 }

 

So ok what has happened here. Basically if a client has purchased the package and it is active the cron job will tick the box in the clients extra fields for email support. So when a client submits a ticket you will be able to quickly view there profile to see if they are still entitled to support.

 

I know this is nothing close to Kayako but it saves me having to integrate the 2 packages.

 

Let me know what you think goor or bad all feedback is good.

Link to comment
Share on other sites

Ok. Though this might be a little confusing to understand.

 

This only applies if you want a paid support package so here goes.

 

If you set up a package for support. This system once setup will control a tick box within the client profile. So if someone submits a support ticket by a quick check of there profile you can see if they are entilted to that support.

 

To me it wil just be a simple way to check if a client has paid for the support. If not a chance to sell them your extra services.

 

Hope that makes sense !!

Link to comment
Share on other sites

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