Article ID: 5744, created on Nov 14, 2008, last review on Nov 28, 2016

  • Applies to:
  • Operations Automation 5.5
  • Business Automation

Symptoms

As the Provider, I want to configure Parallels Business Automation (PBA) to send different notifications depending on the type of service the customer has purchased:

  • Different notifications for domain registration and domain transfer
  • Special notifications for orders on specific Service Plans
  • Special notifications for orders containing a specific resource

Resolution

PBA uses system events to send notifications to customers. The procedure described below uses the Order Placed event as an example. If required, a similar process can be followed for Renewal Order Placed or Cancellation Order Placed event types.

By default, an Order Placed notification is sent for all new orders placed. It is determined by this default event handler:

PBA 5.4: Configuration Director > Event Manager Settings > Event Types > Order Placed > Event Handlers tab

PBA 5.5: System > Settings > Events > Order Placed > Event Handlers tab

Your text to link here...

The default settings are:

Your text to link here...

This means an "Order Placed" notification is sent out for all orders by default. It uses the Order Placed notification template (defined in the Signature setting). If you need to keep sending it for new orders and want to make an exception (send a different notification) for some specific cases, follow the steps outlined below.

  1. Create a new notification template, NEW TEMPLATE, in the PBA Provider Control Panel:

    PBA 5.4: Communication Director > Notification Manager > Notification Templates

    PBA 5.5: System > Settings > Notifications > Notification Templates

    The notification should be of the Order Notification type, should be active, and should be visible to resellers if applicable (note that reseller plan IDs are changed when delegated).

  2. Create a new event handler and assign a new template to it:

    PBA 5.4: Configuration Director > Event Manager Settings > Event Handlers

    PBA 5.5: System > Settings > Events > Event Handlers tab

    Add a new event handler to the Order Placed event type and specify the name of the created notification template in the Signature parameter:

    Event Type   - Order Placed
    Object       - MESSAGE
    Method       - OrderNotification
    Signature    - integer OrderID, string TemplateName=NEW TEMPLATE
    Max attempts - 1
    Synchronous  - No
    
  3. Set a proper condition for the notification template created in step one (above):

    PBA 5.4: Communication Director > Notification Manager > Notification Templates > NEW TEMPLATE

    PBA 5.5: System > Settings > Notifications > Notification Templates > NEW TEMPLATE

    The condition is based on POSIX basic regular expressions where available PBA placeholders can be used. Examples of the conditions can be found in the usage scenarios below.

Important! Input a contradictory condition (containing "!") to the default Order Placed notification template. This allows you to send the custom notification if the condition is satisfied and the default notification if the condition is not satisfied. Otherwise, PBA will not be able to understand which notification should be sent if the placed order does not satisfy the defined condition.

Conditions

General information about the conditions structure can be found in the documentation.

Below are some commonly used scenarios.

Scenario #1. Send specific notifications for orders on specific Service Plans.

Condition for notifications to be sent for the orders placed on Service Plans 2, 17, and 96 (put the condition into the custom notification template you created):

"##DetailList#_@@Detail_PlanID@_##/DetailList#"~="(_2_)|(_17_)|(_96_)"

Condition for notifications to be sent for all Service Plans except 2, 17, and 96:

"##DetailList#_@@Detail_PlanID@_##/DetailList#"!~"(_2_)|(_17_)|(_96_)"

Note: "2", "17", and "96" are just examples. There can be any number of plan IDs divided by "|" specified in the expression.

Important: Remember to put the contradictory condition into the default notification template. For example, if you create a condition to send notifications for Service Plans 2, 17, and 96 in the custom notification template, then put a condition to send a notification for all Service Plans except 2, 17, and 96 into the default notification template.

Note: If the price for the subscription period/resource is "0" for any reason (e.g., a promotion was applied or the price is set to "0") and the option Show Zero Prices is set to No in the service plan/promotion properties, then the order details will not be generated and, as a result, the condition will not work. Consider enabling the option Show Zero Prices to make the conditions work in the event of zero prices as well.

Scenario #2. Send specific notifications for orders containing a specific resource.

Condition for notifications to be sent for orders containing a specific resource RESOURCE_NAME:

"##DetailList#@@Detail_Comment@##/DetailList#"~="RESOURCE_NAME"

Replace "RESOURCE_NAME" with the name of the resource that must be ordered by the customer.

Note: If the price for the subscription period/resource is "0" for any reason (e.g., a promotion was applied or the price is set to "0") and the option Show Zero Prices is set to No in the service plan/promotion properties, then the order details will not be generated and, as a result, the condition will not work. Consider enabling the option Show Zero Prices to make the conditions work in the event of zero prices as well.

Scenario #3. Send different notifications for orders containing a domain registration or transfer.

Distinguish domain registrations from a domain transfer operation by adding corresponding words to the descriptions of the subscription periods in the Service Plans. For example, "Domain Registration Fee" or "Domain Transfer Fee."

The condition for the domain registration orders is as follows:

"##DetailList#@@Detail_Comment@##/DetailList#"~="(Registration)"

The condition above will be true if the word "Registration" is found in the order details.

"##DetailList#@@Detail_Comment@##/DetailList#"~="(Transfer)"

The condition above will be true if the word "Transfer" is found in the order details.

Scenario #4 Do not send the notification if the order total is zero.

The condition for the notifications not to be sent if the order total is 0:

"@@Total@"!="0.00"

You can put multiple conditions in the notification template using the logical operations "AND" and "OR":

  • Logical AND: condition1 && condition2, e.g

    "@@Total@" != "0.00" && "##DetailList#@@DetailPlanID@##/DetailList#"!~"(10_)"

    The notification with this condition will be sent when an order total is not zero and the service plan ID is not 10 (show zero price should be enabled for recurring fee on service plan 10 for the condition to work properly).

  • Logical OR: condition1 || condition2

Additional information

You may also find the recommendations from the PBA documentation useful.

Please note that is not possible to add a Gate-based placeholder.

Search Words

Notification is not working when a customer buy a subscription

invoice not sent

provider reseller pdf

how to send mass notification based on plan or template

order placed notifcation

condition on sending notifiation

Creating custom message handlers and failed task

account name

dummy products

set condition in notification template

notifications condition customer class

cancellation notification

notification info

Notification condition

198398b282069eaf2d94a6af87dcb3ff caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 5b048d9bddf8048a00aba7e0bdadef37 5356b422f65bdad1c3e9edca5d74a1ae 2554725ed606193dd9bbce21365bed4e

Email subscription for changes to this article
Save as PDF