Creating an Event Handler
The following operations must be performed before creating an Event Handler:
- Creating an SMS gate for the SMS notification (see Managing SMS Gates);
- Adding a Notification Template for the required Event (see Creating a Notification Template).
To add an Event Handler:
- Sign in to the Operator Control Panel.
- On the Navigation Bar, click Settings > Notification > Event Handlers. The Workspace displays the List of Event Handlers (see Viewing the List of Event Handlers).
- Click the Create button on the Toolbar.
- In the Event list of the New Event Handlers page, select the type of event, for which the notification will be sent. The List of Event Handlers includes the following Events:
- Account created occurs when a new Account was created (see Creating an Account);
- Account changed occurs when an Account is moved to the Administrative or Financial hold (see Moving an Account to the Administrative hold and Moving an Account to the Credit hold) or when an Account is returned from the Administrative or Financial hold (see Returning an Account from Administrative hold);
- Account manager changed occurs when an Account Manager was set or changed (see Viewing and updating an Account's details);
- Invoice closed occurs on the Billing day, when an Invoice is generated (see Managing Invoices);
- Low balance occurs when the Account Balance is negative;
- Manual operation occurs when:
- a Manual operation is generated (see Viewing the List of Manual Operations and Creating an Account Class);
- a Manual operation is approved or declined (see Managing Manual Operations).
- Payment has been received occurs when the Payment changes its status:
- to Cancelled (see Approving or cancelling a Payment);
- from Waiting for payment to Completed;
- from Waiting for payment to Invoice creation;
- from Invoice creation to Receipt sent;
- from Receipt sent to Completed.
- Password reset request occurs when an email with instructions on how to reset the User's password for the Customer Control Panel is requested (see Resetting the password to the Customer Control Panel);
- Manager password reset request occurs when an email with instructions on how to reset the Manager's password for the Operator Control Panel is requested (see Reset the password for the Operator Control Panel);
- Before subscription expiration occurs daily for all the Subscriptions. Requires the configuration of the Query field;
- After subscription expiration occurs daily for all the Subscriptions. Requires the configuration of the Query field;
- After subscription switched from trial to no-trial occurs when a Subscription is switched from trial to paid period;
- Subscription changed occurs when:
- the Subscription status changes to:
- Active;
- Deleted, excluding the case of automatic or manual deletion of a Subscription with Waiting for payment status;
- Stopped (excluding the case of the Administrative hold of the Account);
- Graced;
- Waiting for manual approve.
- a Subscriptions is switched from trial to paid period;
- an active Subscription is renewed in the Operator Control Panel (see Manually Renewing a Subscription) or in the Customer Control Panel (see Renewing a Subscription);
- a Subscription is auto-renewed (see Auto-Renewing a Subscription);
- the number of additional Resources is changed (see Changing a number of Additional Resources).
- the Subscription status changes to:
- Verify email occurs when a new User finishes the registration process in the Customer Control Panel by clicking the Sign Up button (see Short registration);
- User invitation occurs when an external user is invited by the Account Administrator or Account Owner (see Inviting External Users);
- Order changed occurs when the Order status changes to:
- Cancelled (in the case of manual cancelling of the Order and manual cancelling of the Payment of the Order in the Operator Control Panel and Customer Control Panel, see Operator Control Panel. Cancel a Payment of the Order, Customer Control Panel. Viewing the List of Orders);
- Provisioning;
- Completed (see Viewing the List of Orders).
- Order created occurs when a new Order is created (Creating an Order);
- Guaranteed payment created occurs when
- a Guaranteed Payment is created manually in the Operator Control Panel or Customer Control Panel (see Operator Control Panel. Creating a Guaranteed Payment and Customer Control Panel. Creating a Guaranteed Payment);
- a Guaranteed Payment is created automatically with the status Provided because of top up (see Viewing List of Guaranteed Payments).
- Guaranteed payment changed occurs when a Guaranteed Payment is revoked manually or automatically because of balance top up (see Manually Revoking a Guaranteed Payment);
- Days left to pay occurs daily for all the Subscriptions. Requires the configuration of the Query field;
- Phone verification occurs after pressing the Receive a verification code button at the SMS Verification step during the Full Registration of an Account (see Full registration);
- Create instance occurs when a new CloudServer server is created (see Создание Сервера);
- Reset instance password when a password for a CloudServer server is reset. Password reset is possible only using the user interface of the CloudServer control panel;
- Update CSP price occurs daily for all the Subscriptions. Requires the configuration of the Query field;
- Upload CSP price occurs when:
- a new file with prices has been downloaded (see Updating of the Resource prices);
- after a new file with prices has been approved, when the file with prices changes its status from Approval required to Current or Future;
- when the file with prices changes its status from Future to Current.
- Request for creating bill was sent occurs if the manual operation for receipt generating was created.
- Bill on balance replenishment is ready occurs if the receipt for balance top-up was created manually.
- The accounting period was closed occurs if the current financial period ended.
- Request to reset the password after the user creation occurs when the User's password has been reset, in the case when the User was created in the Operator Control Panel (see Creating a User);
- Payment method selected when the Payment Method property of a Payment is changed (payment.payment_method Placeholder, see Placeholders for the Payment and Guaranteed Payment entities) and the Payment does not get the Completed status. For example, when the Check / Cash — manual Payment Method is selected, a new Payment changes its status from Waiting for payment to Invoice creation, and Payment Method property of the Payment is set to Check/Cash manual.
- In the Notification template type list, choose one of the following ways to send a notification message: SMS, Email or Client Panel.
- In the Notification template list, select a template that will be used to create a notification message (see Creating a Notification Template).
- In order to configure sending messages in the certain time:
- Clear the checkbox. The
- In the
In the Query field, type a request and condition of the handler. Use Placeholders if necessary (see Using Placeholders for Event Handlers).
The following operation with Placeholders are possible during the query creation:
>
<
>=
<=
=
!=
include? (for example, order.type = "SalesOrder" and (order.plans_ids include? 2000030)) - the Event Handler works if the Plan with id =2000030 is included in the Order)
- exclude? (to exclude the certain entities (using an id, key or name) from the massive of entities. For example, in order to exclude sending messages about an order creation, which includes the Plan with the id = 2000000, use the following rule: order.plans_ids exclude? 2000000)
and
- or
You can use the Liquid language, which allows creating more complicated Notification. For more information see https://shopify.github.io/liquid/basics/introduction/.
subscription.days_left = 10 AND subscription.status = "active" This query is used for all active Subscriptions that expire after 10 days.
- Click Create. New Event Handler will be created and displayed on the List of Event Handler (see Viewing the List of Event Handlers).