[ Index ]

PHP Cross Reference of Eventum

title

Body

[close]

/docs/ -> Customer_API.html (source)

   1  <html>
   2  <head>
   3  <title>Eventum - Customer API</title>
   4  </head>
   5  <body>
   6  <h1>Customer API</h1>
   7  <p>
   8      Author: <i><a href="mailto:bryan@mysql.com">Bryan Alsdorf</a></i><br />
   9      Created: <i>2004-09-07</i>
  10  </p>
  11  <p>
  12  The Customer API allows Eventum to interact with with your customer database. This document
  13  will cover what is needed to implement the class needed to interact with your customer database system.
  14  </p>
  15  <h2>Getting Started</h2>
  16  <p>To write your own Customer class create a file named "class.my_name.php" in <i>/eventum/include/customer/</i>.
  17  In that file, create a class named "my_name_Customer_Backend" that extends "Abstract_Customer_Backend".
  18  Now you can add methods to that class to handle specific events. You can copy the method signatures
  19  from <i>/eventum/include/customer/class.abstract_customer_backend.php</i> to get started. <br />
  20  An example customer implementation is in <i>/eventum/include/customer/class.example_customer.php</i>. If you want
  21  to use this example implemenation, follow the steps below to enable customer integration and run
  22  <i>/eventum/customer/example/create_customers.php</i>.
  23  </p>
  24  <p>
  25  Once you have your class created you must set your project to use it.
  26  <ul>
  27      <li>Login to eventum with your administrative account.</li>
  28      <li>Go to &quot;Administration&quot; and click the the name of the project you want to
  29          use the customer class.</li>
  30      <li>Select &quot;my_name&quot; from the dropdown list next to &quot;Customer Integration Backend&quot;</li>
  31      <li>Click &quot;Update Project&quot;</li>
  32  </ul>
  33  Your project should now be using your customer class.
  34  </p>
  35  <h2>Individual methods</h2>
  36  <p>
  37  Please see <i>/eventum/include/customer/class.abstract_customer_backend.php</i> for the
  38  individual methods you can override.
  39  </p>
  40  <h2>Database Structure</h2>
  41  <p>While most customer information is stored outside Eventum, certain key information is kept in the Eventum database.
  42  Tables are listed without a prefix.
  43  <ul>
  44      <li>user</li>
  45      <ul>
  46          <li>usr_customer_id - The ID of the customer (company) in your customer database</li>
  47          <li>usr_customer_contract_id - The ID of the contact (person) in your customer database. Multiple contacts
  48                  can belong to the same company.</li>
  49      </ul>
  50      <li>issue</li>
  51      <ul>
  52          <li>iss_customer_id - The ID of the customer that this issue is for</li>
  53          <li>iss_customer_contract_id - The ID of the contact who this issue is for.</li>
  54      </ul>
  55      <li>customer_account_manager - This table is used to store who the account manager for a customer is.</li>
  56      <li>customer_note - This table stores customer specific notes.</li>
  57  </ul>
  58  </p>
  59  <h2>Per-Incident Support</h2>
  60  <p>Per-Incident support allows for control of how many issues a customer opens. When a customer opens an issue,
  61  it is not counted as an incident because it could be a duplicate, a mistake or not meet whatever requirement you set
  62  for an issue to count. Once you decide to count an issue, you can &quot;redeem&quot; the incident by clicking the
  63  &quot;Mark as Redeemed Incident&quot; button. When this happens, the method <i>Customer::flagIncident()</i> is called.
  64  </p>
  65  <p>
  66  Per-Incident support is not included in the example API.
  67  <h2>File Structure</h2>
  68  <p>Any templates that are customer related should be located in <i>/eventum/templates/en/customer/<b>my_name</b>/</i>. Any
  69  customer files that are not templates should be located in <i>/eventum/customer/<b>my_name</b>/</i>. The following is a list
  70  of files you need to implement to create a customer backend.
  71  <ul>
  72      <li>Templates</li>
  73      <ul>
  74          <li>customer_report.tpl.html - Displays customer information to customer on main page when they login.</li>
  75          <li>report_form_fields.tpl.html - Display on the create issue form to customers.</li>
  76          <li>customer_info.tpl.html - Displays customer information on the issue page.</li>
  77      </ul>
  78  </ul>
  79  <h2>Future Direction</h2>
  80  <p>
  81  As Eventum is developed more methods will be added to the customer class and some methods will be changed. We will try to
  82  minimize any changes. If you have any feedback on this API please email the 
  83  <a href="mailto:eventum-devel@lists.mysql.com">Eventum development list</a>.
  84  </p>
  85  </body>
  86  </html>


Generated: Wed Dec 19 21:21:33 2007 Cross-referenced by PHPXref 0.7