Author: Bryan Alsdorf
Created: 2004-09-07
The Customer API allows Eventum to interact with with your customer database. This document will cover what is needed to implement the class needed to interact with your customer database system.
To write your own Customer class create a file named "class.my_name.php" in /eventum/include/customer/.
In that file, create a class named "my_name_Customer_Backend" that extends "Abstract_Customer_Backend".
Now you can add methods to that class to handle specific events. You can copy the method signatures
from /eventum/include/customer/class.abstract_customer_backend.php to get started.
An example customer implementation is in /eventum/include/customer/class.example_customer.php. If you want
to use this example implemenation, follow the steps below to enable customer integration and run
/eventum/customer/example/create_customers.php.
Once you have your class created you must set your project to use it.
Please see /eventum/include/customer/class.abstract_customer_backend.php for the individual methods you can override.
While most customer information is stored outside Eventum, certain key information is kept in the Eventum database. Tables are listed without a prefix.
Per-Incident support allows for control of how many issues a customer opens. When a customer opens an issue, it is not counted as an incident because it could be a duplicate, a mistake or not meet whatever requirement you set for an issue to count. Once you decide to count an issue, you can "redeem" the incident by clicking the "Mark as Redeemed Incident" button. When this happens, the method Customer::flagIncident() is called.
Per-Incident support is not included in the example API.
Any templates that are customer related should be located in /eventum/templates/en/customer/my_name/. Any customer files that are not templates should be located in /eventum/customer/my_name/. The following is a list of files you need to implement to create a customer backend.
As Eventum is developed more methods will be added to the customer class and some methods will be changed. We will try to minimize any changes. If you have any feedback on this API please email the Eventum development list.