Question

It is required to send a notification when the subscription service status changes. How to achieve the desired result?

Answer

Notifications on the subscription service status change can be configured via proper event handlers. There is a number of event types available such as Stop Service, Start Service and others, which can be found at:

PBA 5.4: Home > Configuration Director > Event Manager Settings > Event Types
PBA 5.5: Home > System > Settings > Events > Event Types

Each event type has a corresponding event handler that executes the task. For example, event type Stop Service has an event handler that executes BM method StopSubscription. It is possible to add an additional handler to the event type.

Note that service change may occur within different event types. For example, the service may be stopped by one of the events below:

  • Subscription passed Shutdown Date;
  • Stop Service (stopping for the resource overuse or stopping the running expired subscription);
  • Cancellation Order Placed (on placing a cancellation order the subscription is stopped);
  • Subscription Put On Hold;
  • Stop And Delete Service (the subscription is not only stopped, but also deleted).

The subscription can be started by one of the events below:

  • Cancellation Order Cancelled;
  • Start Service;
  • Subscription Taken From Hold.

Configuration

The following steps should be taken in order to configure notifications when the service status changes:

1) In PBA Provider Control Panel navigate to:

PBA 5.4: Home > Communication Director > Notification Manager > Notification Templates
PBA 5.5: Home > Settings > Notifications > Notification Templates

and create a notification template you are going to use (the notification type shall be of type Subscription Notification)

2) Add condition to it if required, as it is described in the article https://kb.cloudblue.com/en/5744.

3) Create the Event Handler for sending notifications on a required event. To do it, find this event in:

PBA 5.4: Home > Configuration Director > Event Manager Settings > Event Types
PBA 5.5: Home > System > Settings > Events > Event Types

Switch to Event Handlers tab and add a new handler.

The event handler configuration shall be like described below:

Object          MESSAGE
Method          SubscriptionNotification
Condition       
Signature       integer SubscrID, string TemplateName=<Name_of_Template_from_step_1>

Note that for some of the events different kind of notifications may be already setup - for example on placing a cancellation order there may be an "Order Placed" notification configured for sending.

Also keep in mind that configuration with event handlers is system-global and affects all the customers, including the customer of the resellers.

Internal content