Registering Additional Services with Plesk Notifications

Hosting companies can add value to hosting plans and enhance the Plesk capabilities by adding third-party services to Plesk. In the terms of Plesk, such services are called additional. An additional service can be any resource available at a certain URL (like a Plesk extension, web app, and so on), even if it is completely independent from Plesk. It can be a spam filter, statistics analytic tool, helpdesk or other services.

The administrator and resellers associate these additional services with hosting plans when setting up a distribution strategy. For example, if you have a service that performs custom mail filtering, Plesk lets you offer this service with one particular plan, for example, the Silver hosting plan and do not offer with others.

To make Plesk aware of an additional service, you should add the service to Plesk. In the simplest case, when the service resides on a remote URL and does not require any notifications from Plesk, add it from the Plesk GUI, page Service Plans > Additional Services. From there, you can also associate the service with a custom button that is instantly added to the Websites & Domains page of each subscriber.

Another way to add a service is to make a programming call to Plesk. The benefit of this approach is that it lets your service to receive Plesk notifications about the object changes. For example, the mail filtering service we mentioned earlier must track account name changes to serve renamed accounts as well. Though you can make a call that adds a service and does not subscribe it to notifications, this operation does not make much sense as it is easier to add such services through the GUI. Thus, we consider that you will generally use programming means to both add services and register them with Plesk Notifications (PN).

The possible inconvenience of adding services by a call is that you are unable to edit details of the services through the Plesk GUI. Please consider it when designing service names and descriptions. Another peculiar feature of adding services by a call is that are not automatically visible to customers. We recommend that you use custom buttons or write an extension to display the service in the Control Panel.

PN sends notifications about subscriptions, sites, and email accounts related to the service. The relation subscription - service is derived from plans: A service is associated with plans, whereas subscriptions are plan instances. If a subscription has sites or email accounts, the changes of these supplementary objects are also tracked.

If you wish to register your service with the PN, do the following:

  1. Create a service-specific class that implements interface Plan_Item_Interface.

    By implementing this interface, you specify the service properties in Plesk and define what type of changes it should receive and how it should handle them. When a change happens, Plesk executes the change handling code from this class. This code runs in the Administrator context.

  2. Register this class by an appropriate call.

For details on interface Plan_Item_Interface and instructions on how to implement it, see section Preparing a Service for Registration.

To learn how to register a prepared class, see section Registering the Service.

Note: This section does not explain how to write third-party services, integrate them into the Plesk GUI, or get access to the Plesk resources. If you wish to make a registered service available to customers, create a custom button pointing to the service URL and place it on pages available to customers. This can be done through the command line interface (CLI) and will work only if your service receives enough information from PN. If your service requires access to other Plesk resources or you want to build your service into the Plesk GUI, consider writing an extension.

In this chapter:

Preparing a Service for Registration

Registering the Service

Code Samples

 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact Parallels support. Suggest new features for Plesk here. Discuss general questions on Parallels forum. All offtopic comments will be removed.