Creating an event handler

The following operations must be performed before creating an event handler, create a notification template for the required event (see Creating a notification template). For SMS notifications, also create an SMS gate (see Managing SMS gates). The newly created event handler is automatically delegated to all downstream resellers (see Delegating UI templates, notification templates, event handlers, and notification categories).

In this article:

Creating an event handler

To add an event handler:

  1. Go to Event Handlers (see Navigation). The list of event handlers is displayed (see Viewing the list of event handlers).
  2. Click Create. The New Notification Event Handlers page is displayed.



    Since the event handler is delegated to all downstream resellers, it must be unique. That means that the set of the event, notification template type, notification template, and query parameters must differ from any other event handler of the current reseller and all its downstream resellers.
  3. In the Event list, select the event for the notification. For the full list of events, see the table below.

  4. In the Notification template type list, select one of the following ways to send a notification message: SMS, Email, or Client Panel.
  5. In the Notification template list, select a template that will be used to create a notification message (see Creating a notification template). You can search a notification template in the list by part of its ID or name. 
  6. To configure sending messages at a certain time:
    1. Clear the checkbox. The 
    2. In the
  7. In the Query field, enter the request and condition of the event handler. Use placeholders if necessary (see Using placeholders for event handlers).

    The following operations with placeholders are available for the query:

    • >

    • <

    • >=

    • <=

    • =

    • !=

    • 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 certain entities (using an id, key, or name) from the massive of entities. For example, to exclude sending messages about the order creation for a plan with the id = 2000000, use the following rule: order.plans_ids exclude? 2000000)
    • and

    • or. For several or after and, use additional parentheses: order.type = "RenewalOrder" and order.renewal_is_positive = true and subscription.payment_model = "prepay" and ((order.plans_ids include? 293827) or (order.plans_ids include? 293824) or (order.plans_ids include? 294340))
    • % (for example, 30% of the financial blocking threshold: account.financial_blocking_threshold % 30)

    You can use the Liquid language to create complicated notifications. For more information see https://shopify.github.io/liquid/basics/introduction/.

    This query is used for all active subscriptions that expire after 10 days:

    subscription.days_left = 10 AND subscription.status = "active" 
  8. Click Create. The new event handler will be created and displayed in the list of event handlers of the current reseller and all its downstream resellers (see Viewing the list of event handlers).

List of events

EventDescription
Account credit hold is coming

Occurs when the account balance becomes equal to or less than the defined part (1~99%) of the financial blocking threshold but not less than the financial blocking threshold. Requires the proper Query.

For example, the account credit hold is coming event will occur when the account balance becomes less than 35% of the financial blocking threshold:

account.financial_blocking_threshold % 35 < -account.balance

Account changedOccurs when an account is moved to the administrative or credit 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 credit hold (see Returning an account from administrative hold).
Account createdOccurs when a new account is created (see Creating an account), except for creating an account via the Reseller API (see Create account).
Financial blocking threshold was changedOccurs when the financial blocking threshold is set for a new account (see Creating an account) or changed in an account class (see Viewing and updating account class details) or at the account level (see Viewing and updating account's details). When an account gets another account class but the value of the financial blocking threshold is not changed, the event does not occur.
Account manager changedOccurs when a manager is set or changed for an existing account (see Viewing and updating account's details).
Before account's postpaid subscriptions expiration

Occurs daily for accounts with at least one postpaid subscription in the Active status with an expiration date that matches the Query. The customer receives one notification for all eligible subscriptions expiring in a specified number of days, as opposed to separate notifications Before subscription expiration for each subscription.

Requires the proper configuration of the Query field using before_subscriptions_expirations include?.

before_subscriptions_expirations include? 3 or before_subscriptions_expirations include? 1

The notification template supports displaying extended information about each account's subscription that expires in a specified number of days, including:

  • The subscription name.
  • The subscription expiration date.
  • The subscription auto-renewal status.
  • A preliminary renewal cost.
  • The quantity of the main resource.
  • A button to go to the subscription details page.
  • A button to go to the last renewal or switch plan order details page.
<table width="100%" bgcolor="#ffffff">
  <tr>
    <td height="30"></td>
  </tr>
  <tr>
    <td>
      <table width="660" cellpadding="0" cellspacing="0" align="center" bgcolor="#ffffff" style="">
        <!-- HEADER -->
        <tr>
          <td align="left" valign="top" colspan="3" style="padding: 24px;" bgcolor="#ffffff">
            <table cellpadding="0" cellspacing="0" width="580">
              <tr>
                <td align="center" valign="top">
                  <img src="https://example.com/logo.png" width="250" height="52" align="center" border="0" alt="" style="margin:0">
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <!--END HEADER -->
        <!-- BODY -->
        <tr>
          <td align="left" colspan="3" valign="top" width='580' style="padding: 0 30px;">
            <table>
              <tr>
                <td>
                  <p style="margin:10px 0px;padding:0;width:528px">
                    <font color="#333333" style="font-size: 16px; font-family: 'IBM Plex Sans', sans-serif;">
                      <br>Dear {{owner.first_name}} {{owner.last_name}},
                    </font><br><br>
                    <font color="#333333" style="font-size: 16px; font-family: 'IBM Plex Sans', sans-serif;">
                      We're reaching out regarding your {{account.name}} company. Some of company subscriptions are expiring.
                    </font><br><br>
                  </p>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <!--BUTTONS-->
        <tr>
          <td align="left" width='580' style="padding: 0 30px; ">
            <table>
              <tr>
                <td>
                  {% for subscription in subscriptions %}
                  {% if subscription.days_left == 1 %}
                  {% if subscription.last_renew_or_switch_order.status == 'waiting_for_provisioning' %}
                  <table width="528" height="195" style="padding: 20px; border: 2px solid; border-color:#DADADA; border-radius: 12px; border-spacing: 12px; border-collapse: separate; margin-bottom: 25px;">
                    <!-- 1 row ><-->
                    <tr>
                      <td align="left" colspan="3" width="528">
                        <font color="#333333" style="font-size: 18px; font-family: 'IBM Plex Sans', sans-serif; word-break: break-word;">
                          <strong>#{{subscription.id}} {{subscription.name}}</strong>
                        </font>
                      </td>
                    </tr>
                    <!-- 2 row ><-->
                    <tr>
                      <td align="left" style="margin: 0px;" colspan="3">
                        <div style="display: flex; align-items: center;">
                          <svg xmlns="http://www.w3.org/2000/svg" width="21" height="20" viewBox="0 0 21 20" fill="none" style="margin-right: 5px;">
                            <path d="M10.5 18.3125C5.90913 18.3125 2.1875 14.5909 2.1875 10C2.1875 5.40913 5.90913 1.6875 10.5 1.6875C15.0909 1.6875 18.8125 5.40913 18.8125 10C18.8125 14.5909 15.0909 18.3125 10.5 18.3125ZM10.5 19.5C15.7467 19.5 20 15.2467 20 10C20 4.75329 15.7467 0.5 10.5 0.5C5.25329 0.5 1 4.75329 1 10C1 15.2467 5.25329 19.5 10.5 19.5Z" fill="#0DC143" />
                            <path d="M14.0265 6.40148C14.0181 6.40988 14.0102 6.41878 14.0029 6.42812L9.87941 11.6824L7.39335 9.19633C7.04554 8.84852 6.48163 8.84852 6.13382 9.19633C5.78601 9.54414 5.78601 10.1081 6.13382 10.4559L9.27648 13.5985C9.62429 13.9463 10.1882 13.9463 10.536 13.5985C10.5438 13.5908 10.5511 13.5826 10.5579 13.5741L15.2986 7.64812C15.6338 7.29941 15.6296 6.74503 15.286 6.40148C14.9382 6.05367 14.3743 6.05367 14.0265 6.40148Z" fill="#0DC143" />
                            <path d="M10.5 18.3125C5.90913 18.3125 2.1875 14.5909 2.1875 10C2.1875 5.40913 5.90913 1.6875 10.5 1.6875C15.0909 1.6875 18.8125 5.40913 18.8125 10C18.8125 14.5909 15.0909 18.3125 10.5 18.3125ZM10.5 19.5C15.7467 19.5 20 15.2467 20 10C20 4.75329 15.7467 0.5 10.5 0.5C5.25329 0.5 1 4.75329 1 10C1 15.2467 5.25329 19.5 10.5 19.5Z" stroke="#0DC143" stroke-linecap="round" stroke-linejoin="round" />
                            <path d="M14.0265 6.40148C14.0181 6.40988 14.0102 6.41878 14.0029 6.42812L9.87941 11.6824L7.39335 9.19633C7.04554 8.84852 6.48163 8.84852 6.13382 9.19633C5.78601 9.54414 5.78601 10.1081 6.13382 10.4559L9.27648 13.5985C9.62429 13.9463 10.1882 13.9463 10.536 13.5985C10.5438 13.5908 10.5511 13.5826 10.5579 13.5741L15.2986 7.64812C15.6338 7.29941 15.6296 6.74503 15.286 6.40148C14.9382 6.05367 14.3743 6.05367 14.0265 6.40148Z" stroke="#0DC143" stroke-linecap="round" stroke-linejoin="round" />
                          </svg>
                          <font color="#9D9D9D" style="font-size: 16px; font-family: 'IBM Plex Sans', sans-serif;">
                            Order created<br>
                          </font>
                          <span style="margin-left: 5px;"></span>
                          <svg xmlns="http://www.w3.org/2000/svg" width="21" height="20" viewBox="0 0 21 20" fill="none" style="margin-right: 5px;">
                            <path d="M10.5 18.3125C5.90913 18.3125 2.1875 14.5909 2.1875 10C2.1875 5.40913 5.90913 1.6875 10.5 1.6875C15.0909 1.6875 18.8125 5.40913 18.8125 10C18.8125 14.5909 15.0909 18.3125 10.5 18.3125ZM10.5 19.5C15.7467 19.5 20 15.2467 20 10C20 4.75329 15.7467 0.5 10.5 0.5C5.25329 0.5 1 4.75329 1 10C1 15.2467 5.25329 19.5 10.5 19.5Z" fill="#0DC143" />
                            <path d="M14.0265 6.40148C14.0181 6.40988 14.0102 6.41878 14.0029 6.42812L9.87941 11.6824L7.39335 9.19633C7.04554 8.84852 6.48163 8.84852 6.13382 9.19633C5.78601 9.54414 5.78601 10.1081 6.13382 10.4559L9.27648 13.5985C9.62429 13.9463 10.1882 13.9463 10.536 13.5985C10.5438 13.5908 10.5511 13.5826 10.5579 13.5741L15.2986 7.64812C15.6338 7.29941 15.6296 6.74503 15.286 6.40148C14.9382 6.05367 14.3743 6.05367 14.0265 6.40148Z" fill="#0DC143" />
                            <path d="M10.5 18.3125C5.90913 18.3125 2.1875 14.5909 2.1875 10C2.1875 5.40913 5.90913 1.6875 10.5 1.6875C15.0909 1.6875 18.8125 5.40913 18.8125 10C18.8125 14.5909 15.0909 18.3125 10.5 18.3125ZM10.5 19.5C15.7467 19.5 20 15.2467 20 10C20 4.75329 15.7467 0.5 10.5 0.5C5.25329 0.5 1 4.75329 1 10C1 15.2467 5.25329 19.5 10.5 19.5Z" stroke="#0DC143" stroke-linecap="round" stroke-linejoin="round" />
                            <path d="M14.0265 6.40148C14.0181 6.40988 14.0102 6.41878 14.0029 6.42812L9.87941 11.6824L7.39335 9.19633C7.04554 8.84852 6.48163 8.84852 6.13382 9.19633C5.78601 9.54414 5.78601 10.1081 6.13382 10.4559L9.27648 13.5985C9.62429 13.9463 10.1882 13.9463 10.536 13.5985C10.5438 13.5908 10.5511 13.5826 10.5579 13.5741L15.2986 7.64812C15.6338 7.29941 15.6296 6.74503 15.286 6.40148C14.9382 6.05367 14.3743 6.05367 14.0265 6.40148Z" stroke="#0DC143" stroke-linecap="round" stroke-linejoin="round" />
                          </svg>
                          <font color="#9D9D9D" style="font-size: 16px; font-family: 'IBM Plex Sans', sans-serif;">
                            Will be renewed {{subscription.expiration_date | format_as_date}}
                          </font>
                        </div>
                      </td>
                    </tr>
                    <!-- 3 row ><-->
                    <tr>
                      <td width="195">
                        <table width="183" height="60" bgcolor="#0DC143" style="padding: 12px 16px; border-color:#f0f0f0; border-radius: 8px;">
                          <tr>
                            <td align="center" valign="center">
                              <font color="#ffffff" style="font-size: 16px; font-family: 'IBM Plex Sans', sans-serif;">
                                <a style="color:#ffffff; text-decoration: none; justify-content: center;" href="https://{{ reseller.custom_attributes['vendor_ccp'] }}/client/billing/sections/orders?filter[document_id][like]={{subscription.last_renew_or_switch_order.number}}&account_id={{subscription.account.id}}" target="_top">See Renew Order</a>
                              </font>
                            </td>
                          </tr>
                        </table>
                      </td>
                      <td>
                        <font color="#9D9D9D" style="font-size: 14px; font-family: 'IBM Plex Sans', sans-serif;">Preliminary renewal price*<br></font>
                        <font color="#222" style="font-size: 18px; font-family: 'IBM Plex Sans', sans-serif;"><strong>{{subscription.renewal_amount_in_original_currency}}</strong></font><br>
                        <font color="#9D9D9D" style="font-size: 14px; font-family: 'IBM Plex Sans', sans-serif;"> for {{ subscription.resources[0].additional | round }} licenses</font>
                      </td>
                    </tr>
                  </table>
                  {% endif %}
                  {% if subscription.last_renew_or_switch_order.status != 'waiting_for_provisioning' and subscription.auto_renewal == false %}
                  <table width="528" height="195" style="padding: 20px; border: 2px solid; border-color:#DADADA; border-radius: 12px; border-spacing: 12px; border-collapse: separate; margin-bottom: 25px;">
                    <!-- 1 row ><-->
                    <tr>
                      <td align="left" colspan="3" width="528">
                        <font color="#333333" style="font-size: 18px; font-family: 'IBM Plex Sans', sans-serif; word-break: break-word;">
                          <strong>#{{subscription.id}} {{subscription.name}}</strong>
                        </font>
                      </td>
                    </tr>
                    <!-- 2 row ><-->
                    <tr>
                      <td align="left" style="margin: 0px;" colspan="3">
                        <div style="display: flex; align-items: center;">
                          <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" style="margin-right: 5px;">
                            <path d="M15.71 8.29002C15.6171 8.19629 15.5065 8.1219 15.3846 8.07113C15.2627 8.02036 15.132 7.99422 15 7.99422C14.868 7.99422 14.7373 8.02036 14.6154 8.07113C14.4936 8.1219 14.383 8.19629 14.29 8.29002L12 10.59L9.71002 8.29002C9.52171 8.10171 9.26632 7.99593 9.00002 7.99593C8.73372 7.99593 8.47832 8.10171 8.29002 8.29002C8.10171 8.47832 7.99593 8.73372 7.99593 9.00002C7.99593 9.26632 8.10171 9.52171 8.29002 9.71002L10.59 12L8.29002 14.29C8.19629 14.383 8.1219 14.4936 8.07113 14.6154C8.02036 14.7373 7.99422 14.868 7.99422 15C7.99422 15.132 8.02036 15.2627 8.07113 15.3846C8.1219 15.5065 8.19629 15.6171 8.29002 15.71C8.38298 15.8037 8.49358 15.8781 8.61544 15.9289C8.7373 15.9797 8.86801 16.0058 9.00002 16.0058C9.13203 16.0058 9.26274 15.9797 9.38459 15.9289C9.50645 15.8781 9.61705 15.8037 9.71002 15.71L12 13.41L14.29 15.71C14.383 15.8037 14.4936 15.8781 14.6154 15.9289C14.7373 15.9797 14.868 16.0058 15 16.0058C15.132 16.0058 15.2627 15.9797 15.3846 15.9289C15.5065 15.8781 15.6171 15.8037 15.71 15.71C15.8037 15.6171 15.8781 15.5065 15.9289 15.3846C15.9797 15.2627 16.0058 15.132 16.0058 15C16.0058 14.868 15.9797 14.7373 15.9289 14.6154C15.8781 14.4936 15.8037 14.383 15.71 14.29L13.41 12L15.71 9.71002C15.8037 9.61705 15.8781 9.50645 15.9289 9.38459C15.9797 9.26274 16.0058 9.13203 16.0058 9.00002C16.0058 8.86801 15.9797 8.7373 15.9289 8.61544C15.8781 8.49358 15.8037 8.38298 15.71 8.29002ZM19.07 4.93002C18.1476 3.97492 17.0441 3.21309 15.8241 2.689C14.604 2.16491 13.2918 1.88905 11.964 1.87751C10.6362 1.86598 9.31944 2.11899 8.09048 2.6218C6.86151 3.12461 5.745 3.86714 4.80607 4.80607C3.86714 5.745 3.12461 6.86151 2.6218 8.09048C2.11899 9.31944 1.86598 10.6362 1.87751 11.964C1.88905 13.2918 2.16491 14.604 2.689 15.8241C3.21309 17.0441 3.97492 18.1476 4.93002 19.07C5.85249 20.0251 6.95593 20.7869 8.17597 21.311C9.39601 21.8351 10.7082 22.111 12.036 22.1225C13.3638 22.1341 14.6806 21.881 15.9096 21.3782C17.1385 20.8754 18.255 20.1329 19.194 19.194C20.1329 18.255 20.8754 17.1385 21.3782 15.9096C21.881 14.6806 22.1341 13.3638 22.1225 12.036C22.111 10.7082 21.8351 9.39601 21.311 8.17597C20.7869 6.95593 20.0251 5.85249 19.07 4.93002ZM17.66 17.66C16.3521 18.9694 14.6306 19.7848 12.7888 19.9673C10.9471 20.1498 9.09902 19.6881 7.55954 18.6608C6.02006 17.6335 4.88438 16.1042 4.34599 14.3335C3.80761 12.5628 3.89982 10.6602 4.60693 8.9498C5.31404 7.23945 6.59229 5.82717 8.22391 4.95358C9.85553 4.07999 11.7396 3.79915 13.555 4.15889C15.3705 4.51863 17.0051 5.49671 18.1803 6.92648C19.3555 8.35625 19.9986 10.1493 20 12C20.0036 13.0513 19.7986 14.0929 19.3969 15.0644C18.9953 16.0359 18.4049 16.9182 17.66 17.66Z" fill="#FF2E2E" />
                          </svg>
                          <font color="#9D9D9D" style="font-size: 16px; font-family: 'IBM Plex Sans', sans-serif;">
                            Auto-renewal disabled <br>
                          </font>
                          <span style="margin-left: 5px;"></span>
                          <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" style="margin-right: 5px;">
                            <path d="M15.098 12.634L13 11.423V7C13 6.73478 12.8946 6.48043 12.7071 6.29289C12.5196 6.10536 12.2652 6 12 6C11.7348 6 11.4804 6.10536 11.2929 6.29289C11.1054 6.48043 11 6.73478 11 7V12C11 12.1755 11.0462 12.348 11.134 12.5C11.2218 12.652 11.348 12.7782 11.5 12.866L14.098 14.366C14.2118 14.4327 14.3376 14.4762 14.4683 14.4941C14.5989 14.512 14.7319 14.5038 14.8594 14.4701C14.9869 14.4364 15.1064 14.3778 15.2112 14.2977C15.3159 14.2176 15.4038 14.1175 15.4698 14.0033C15.5357 13.8891 15.5784 13.763 15.5954 13.6322C15.6124 13.5014 15.6034 13.3686 15.5688 13.2413C15.5343 13.114 15.4749 12.9949 15.3941 12.8906C15.3133 12.7864 15.2127 12.6992 15.098 12.634ZM12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C21.9971 9.34873 20.9426 6.80688 19.0679 4.93215C17.1931 3.05742 14.6513 2.00291 12 2ZM12 20C10.4178 20 8.87104 19.5308 7.55544 18.6518C6.23985 17.7727 5.21447 16.5233 4.60897 15.0615C4.00347 13.5997 3.84504 11.9911 4.15372 10.4393C4.4624 8.88743 5.22433 7.46197 6.34315 6.34315C7.46197 5.22433 8.88743 4.4624 10.4393 4.15372C11.9911 3.84504 13.5997 4.00346 15.0615 4.60896C16.5233 5.21447 17.7727 6.23984 18.6518 7.55544C19.5308 8.87103 20 10.4177 20 12C19.9974 14.1209 19.1537 16.1542 17.6539 17.6539C16.1542 19.1536 14.1209 19.9974 12 20Z" fill="#FF2E2E" />
                          </svg>
                          <font color="#9D9D9D" style="font-size: 16px; font-family: 'IBM Plex Sans', sans-serif;">
                            Expires {{subscription.expiration_date | format_as_date}}
                          </font>
                        </div>
                      </td>
                    </tr>
                    <!-- 3 row ><-->
                    <tr>
                      <td width="195">
                        <table width="183" height="60" bgcolor="#0B408B" style="padding: 12px 16px; border-color:#f0f0f0; border-radius: 8px;">
                          <tr>
                            <td align="center" valign="center">
                              <font color="#ffffff" style="font-size: 16px; font-family: 'IBM Plex Sans', sans-serif;">
                                <a style="color:#ffffff; text-decoration: none; justify-content: center;" href="https://{{ reseller.custom_attributes['vendor_ccp'] }}/client/subscriptions/{{subscription.id}}/management?account_id={{subscription.account.id}}" target="_top">Set up renewal</a>
                              </font>
                            </td>
                          </tr>
                        </table>
                      </td>
                      <td>
                        <font color="#9D9D9D" style="font-size: 14px; font-family: 'IBM Plex Sans', sans-serif;">Preliminary renewal price*<br></font>
                        <font color="#222" style="font-size: 18px; font-family: 'IBM Plex Sans', sans-serif;"><strong>{{subscription.renewal_amount_in_original_currency}}</strong></font><br>
                        <font color="#9D9D9D" style="font-size: 14px; font-family: 'IBM Plex Sans', sans-serif;"> for {{ subscription.resources[0].additional | round }} licenses</font>
                      </td>
                    </tr>
                  </table>
                  {% endif %}
                  {% if subscription.last_renew_or_switch_order.status != 'waiting_for_provisioning' and subscription.auto_renewal == true %}
                  <table width="528" height="195" style="padding: 20px; border: 2px solid; border-color:#DADADA; border-radius: 12px; border-spacing: 12px; border-collapse: separate; margin-bottom: 25px;">
                    <!-- 1 row ><-->
                    <tr>
                      <td align="left" colspan="3" width="528">
                        <font color="#333333" style="font-size: 18px; font-family: 'IBM Plex Sans', sans-serif; word-break: break-word;">
                          <strong>#{{subscription.id}} {{subscription.name}}</strong>
                        </font>
                      </td>
                    </tr>
                    <!-- 2 row ><-->
                    <tr>
                      <td align="left" style="margin: 0px;" colspan="3">
                        <div style="display: flex; align-items: center;">
                          <svg xmlns="http://www.w3.org/2000/svg" width="21" height="20" viewBox="0 0 21 20" fill="none" style="margin-right: 5px;">
                            <path d="M10.5 18.3125C5.90913 18.3125 2.1875 14.5909 2.1875 10C2.1875 5.40913 5.90913 1.6875 10.5 1.6875C15.0909 1.6875 18.8125 5.40913 18.8125 10C18.8125 14.5909 15.0909 18.3125 10.5 18.3125ZM10.5 19.5C15.7467 19.5 20 15.2467 20 10C20 4.75329 15.7467 0.5 10.5 0.5C5.25329 0.5 1 4.75329 1 10C1 15.2467 5.25329 19.5 10.5 19.5Z" fill="#0DC143" />
                            <path d="M14.0265 6.40148C14.0181 6.40988 14.0102 6.41878 14.0029 6.42812L9.87941 11.6824L7.39335 9.19633C7.04554 8.84852 6.48163 8.84852 6.13382 9.19633C5.78601 9.54414 5.78601 10.1081 6.13382 10.4559L9.27648 13.5985C9.62429 13.9463 10.1882 13.9463 10.536 13.5985C10.5438 13.5908 10.5511 13.5826 10.5579 13.5741L15.2986 7.64812C15.6338 7.29941 15.6296 6.74503 15.286 6.40148C14.9382 6.05367 14.3743 6.05367 14.0265 6.40148Z" fill="#0DC143" />
                            <path d="M10.5 18.3125C5.90913 18.3125 2.1875 14.5909 2.1875 10C2.1875 5.40913 5.90913 1.6875 10.5 1.6875C15.0909 1.6875 18.8125 5.40913 18.8125 10C18.8125 14.5909 15.0909 18.3125 10.5 18.3125ZM10.5 19.5C15.7467 19.5 20 15.2467 20 10C20 4.75329 15.7467 0.5 10.5 0.5C5.25329 0.5 1 4.75329 1 10C1 15.2467 5.25329 19.5 10.5 19.5Z" stroke="#0DC143" stroke-linecap="round" stroke-linejoin="round" />
                            <path d="M14.0265 6.40148C14.0181 6.40988 14.0102 6.41878 14.0029 6.42812L9.87941 11.6824L7.39335 9.19633C7.04554 8.84852 6.48163 8.84852 6.13382 9.19633C5.78601 9.54414 5.78601 10.1081 6.13382 10.4559L9.27648 13.5985C9.62429 13.9463 10.1882 13.9463 10.536 13.5985C10.5438 13.5908 10.5511 13.5826 10.5579 13.5741L15.2986 7.64812C15.6338 7.29941 15.6296 6.74503 15.286 6.40148C14.9382 6.05367 14.3743 6.05367 14.0265 6.40148Z" stroke="#0DC143" stroke-linecap="round" stroke-linejoin="round" />
                          </svg>
                          <font color="#9D9D9D" style="font-size: 16px; font-family: 'IBM Plex Sans', sans-serif;">
                            Auto-renewal enabled<br>
                          </font>
                          <span style="margin-left: 5px;"></span>
                          <svg xmlns="http://www.w3.org/2000/svg" width="21" height="20" viewBox="0 0 21 20" fill="none" style="margin-right: 5px;">
                            <path d="M10.5 18.3125C5.90913 18.3125 2.1875 14.5909 2.1875 10C2.1875 5.40913 5.90913 1.6875 10.5 1.6875C15.0909 1.6875 18.8125 5.40913 18.8125 10C18.8125 14.5909 15.0909 18.3125 10.5 18.3125ZM10.5 19.5C15.7467 19.5 20 15.2467 20 10C20 4.75329 15.7467 0.5 10.5 0.5C5.25329 0.5 1 4.75329 1 10C1 15.2467 5.25329 19.5 10.5 19.5Z" fill="#0DC143" />
                            <path d="M14.0265 6.40148C14.0181 6.40988 14.0102 6.41878 14.0029 6.42812L9.87941 11.6824L7.39335 9.19633C7.04554 8.84852 6.48163 8.84852 6.13382 9.19633C5.78601 9.54414 5.78601 10.1081 6.13382 10.4559L9.27648 13.5985C9.62429 13.9463 10.1882 13.9463 10.536 13.5985C10.5438 13.5908 10.5511 13.5826 10.5579 13.5741L15.2986 7.64812C15.6338 7.29941 15.6296 6.74503 15.286 6.40148C14.9382 6.05367 14.3743 6.05367 14.0265 6.40148Z" fill="#0DC143" />
                            <path d="M10.5 18.3125C5.90913 18.3125 2.1875 14.5909 2.1875 10C2.1875 5.40913 5.90913 1.6875 10.5 1.6875C15.0909 1.6875 18.8125 5.40913 18.8125 10C18.8125 14.5909 15.0909 18.3125 10.5 18.3125ZM10.5 19.5C15.7467 19.5 20 15.2467 20 10C20 4.75329 15.7467 0.5 10.5 0.5C5.25329 0.5 1 4.75329 1 10C1 15.2467 5.25329 19.5 10.5 19.5Z" stroke="#0DC143" stroke-linecap="round" stroke-linejoin="round" />
                            <path d="M14.0265 6.40148C14.0181 6.40988 14.0102 6.41878 14.0029 6.42812L9.87941 11.6824L7.39335 9.19633C7.04554 8.84852 6.48163 8.84852 6.13382 9.19633C5.78601 9.54414 5.78601 10.1081 6.13382 10.4559L9.27648 13.5985C9.62429 13.9463 10.1882 13.9463 10.536 13.5985C10.5438 13.5908 10.5511 13.5826 10.5579 13.5741L15.2986 7.64812C15.6338 7.29941 15.6296 6.74503 15.286 6.40148C14.9382 6.05367 14.3743 6.05367 14.0265 6.40148Z" stroke="#0DC143" stroke-linecap="round" stroke-linejoin="round" />
                          </svg>
                          <font color="#9D9D9D" style="font-size: 16px; font-family: 'IBM Plex Sans', sans-serif;">
                            Will be renewed {{subscription.expiration_date | format_as_date}}
                          </font>
                        </div>
                      </td>
                    </tr>
                    <!-- 3 row ><-->
                    <tr>
                      <td width="195">
                        <table width="183" height="60" bgcolor="#0DC143" style="padding: 12px 16px; border-color:#f0f0f0; border-radius: 8px;">
                          <tr>
                            <td align="center" valign="center">
                              <font color="#ffffff" style="font-size: 16px; font-family: 'IBM Plex Sans', sans-serif;">
                                <a style="color:#ffffff; text-decoration: none; justify-content: center;" href="https://{{ reseller.custom_attributes['vendor_ccp'] }}/client/subscriptions/{{subscription.id}}/management?account_id={{subscription.account.id}}" target="_top">Change Configuration</a>
                              </font>
                            </td>
                          </tr>
                        </table>
                      </td>
                      <td>
                        <font color="#9D9D9D" style="font-size: 14px; font-family: 'IBM Plex Sans', sans-serif;">Preliminary renewal price*<br></font>
                        <font color="#222" style="font-size: 18px; font-family: 'IBM Plex Sans', sans-serif;"><strong>{{subscription.renewal_amount_in_original_currency}}</strong></font><br>
                        <font color="#9D9D9D" style="font-size: 14px; font-family: 'IBM Plex Sans', sans-serif;"> for {{ subscription.resources[0].additional | round }} licenses</font>
                      </td>
                    </tr>
                  </table>
                  {% endif%}
                  {% endif%}
                  {% endfor%}
              <tr>
 
                <td>
                  <p style="margin:0;padding:0;width:480px">
                    <font color="#797979" style="font-size: 14px; font-family: 'IBM Plex Sans', sans-serif;">*Renewal prices are preliminary in local currency, at the time of purchase the exchange rate may vary.<br></font>
                  </p>
                </td>
              </tr>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <!--How to renew><-->
  <tr>
    <td align="left" colspan="3" valign="top" width='580' style="padding: 0 30px;">
      <table>
        <tr>
          <td height="40"></td>
        </tr>
        <tr>
          <td>
            <font color="#222" style="font-size: 22px; font-family: 'IBM Plex Sans', sans-serif;">
              <strong>How to renew</strong><br /><br />
            </font>
          </td>
        </tr>
        <tr>
          <td>
            <table height="330" style="background-color: #F5F5F5; padding: 20px; padding-bottom: 100px;">
              <tr>
                <td width='264' height='46'>
                  <font color="#222" style="font-size: 18px; font-family: 'IBM Plex Sans', sans-serif;"><strong>To renew your subscription without changes</strong></font>
                </td>
              </tr>
              <tr>
                <td>
                  <div style="display: flex; align-items: center;">
                    <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none" style="margin-right: 10px;">
                      <circle cx="20" cy="20" r="20" fill="#0B408B" fill-opacity="0.1" />
                      <text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-size="16" font-family="IBM Plex Sans" fill="#333333">1</text>
                    </svg>
                    <font color="#222" style="font-size: 16px; font-family: 'IBM Plex Sans', sans-serif;">Log in <a style="color:#0B408B; text-decoration: none; text-align: right;" href="https://{{ reseller.custom_attributes['vendor_ccp'] }}/client/home?account_id={{subscription.account.id}}" target="_top"> to the Customer Panel</a></font>
                  </div>
                </td>
              </tr>
              <tr>
                <td style="padding-left: 20px">
                  <div style="width: 1px; height: 32px; background: #D6D6D6;;"></div>
                </td>
              </tr>
              <tr>
                <td>
                  <div style="display: flex; align-items: center;">
                    <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none" style="margin-right: 10px;">
                      <circle cx="20" cy="20" r="20" fill="#0B408B" fill-opacity="0.1" />
                      <text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-size="16" font-family="IBM Plex Sans" fill="#333333">2</text>
                    </svg>
                    <font color="#222" style="font-size: 16px; font-family: 'IBM Plex Sans', sans-serif;">Find the subscription</font>
                  </div>
                </td>
              </tr>
              <tr>
                <td style="padding-left: 20px">
                  <div style="width: 1px; height: 32px; background: #D6D6D6;"></div>
                </td>
              </tr>
              <tr>
                <td>
                  <div style="display: flex;">
                    <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none" style="margin-right: 10px;">
                      <circle cx="20" cy="20" r="20" fill="#0B408B" fill-opacity="0.1" />
                      <text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-size="16" font-family="IBM Plex Sans" fill="#333333">3</text>
                    </svg>
                    <font color="#222" style="font-size: 16px; width: 179px; font-family: 'IBM Plex Sans', sans-serif;">Make sure that auto-renewal is switched on</font>
                  </div>
                </td>
              </tr>
            </table>
          </td>
          <!--PART2><-->
          <td>
            <table height="330" style="padding: 20px; padding-bottom: 100px;">
              <tr>
                <td width='255' height='46'>
                  <font color="#222" style="font-size: 18px; font-family: 'IBM Plex Sans', sans-serif;"><strong>To renew your subscription with some changes</strong></font>
                </td>
              </tr>
              <tr>
                <td>
                  <div style="display: flex; align-items: center;">
                    <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none" style="margin-right: 10px;">
                      <circle cx="20" cy="20" r="20" fill="#0B408B" fill-opacity="0.1" />
                      <text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-size="16" font-family="IBM Plex Sans" fill="#333333">1</text>
                    </svg>
                    <font color="#222" style="font-size: 16px; font-family: 'IBM Plex Sans', sans-serif;">Log in <a style="color:#0B408B; text-decoration: none; text-align: right;" href="https://{{ reseller.custom_attributes['vendor_ccp'] }}/client/home?account_id={{subscription.account.id}}" target="_top"> to the Customer Panel</a></font>
                  </div>
                </td>
              </tr>
              <tr>
                <td style="padding-left: 20px">
                  <div style="width: 1px; height: 32px; background: #D6D6D6;;"></div>
                </td>
              </tr>
              <tr>
                <td>
                  <div style="display: flex; align-items: center;">
                    <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none" style="margin-right: 10px;">
                      <circle cx="20" cy="20" r="20" fill="#0B408B" fill-opacity="0.1" />
                      <text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-size="16" font-family="IBM Plex Sans" fill="#333333">2</text>
                    </svg>
                    <font color="#222" style="font-size: 16px; font-family: 'IBM Plex Sans', sans-serif;">Find the subscription</font>
                  </div>
                </td>
              </tr>
              <tr>
                <td style="padding-left: 20px">
                  <div style="width: 1px; height: 32px; background: #D6D6D6;"></div>
                </td>
              </tr>
              <tr>
                <td>
                  <div style="display: flex;">
                    <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none" style="margin-right: 10px;">
                      <circle cx="20" cy="20" r="20" fill="#0B408B" fill-opacity="0.1" />
                      <text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-size="16" font-family="IBM Plex Sans" fill="#333333">3</text>
                    </svg>
                    <font color="#222" style="font-size: 16px; width: 172px; height: 40px; font-family: 'IBM Plex Sans', sans-serif;">Click on the "Renew" button. Create an order by selecting a new tariff or by setting the desired number of licences</font>
                  </div>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td align="center" colspan="3" valign="top" width='580' style="padding: 0 30px;">
      <table>
        <tr>
          <td height="50"></td>
        </tr>
        <tr>
          <td>
            <table width="520" height="160" style="padding: 20px; border: 2px solid; border-color:#DADADA; border-radius: 24px; border-collapse: separate">
              <tr>
                <td align="center">
                  <p style="font-family: 'IBM Plex Sans', sans-serif; font-size: 16px;">Changed your mind?</p>
                  <p style="font-family: 'IBM Plex Sans', sans-serif; font-size: 16px; color: #9D9D9D;">You can always cancel any of your subscriptions</p>
                  <p style="margin-top: 25px"><a style="padding: 7px 25px; border-radius: 8px; text-decoration: none; background-color:#f5f5f5; font-family: 'IBM Plex Sans', sans-serif; font-size: 16px; color:#0B408B" href="https://{{ reseller.custom_attributes['vendor_ccp'] }}/client/subscriptions/all?account_id={{subscription.account.id}}">Manage my subscriptions</a></p>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td align="left" colspan="3" valign="top" width='580' style="padding: 0 30px;">
      <table>
        <tr>
          <td height="50"></td>
        </tr>
        <tr>
          <td align="left">
            <p style="font: 30px IBM Plex Sans, sans-serif; font-color: #000000; line-height: 22px; margin: 0 0 0px 0;">
              <strong>Support</strong><br /><br />
            </p>
            <p style="font-family: 'IBM Plex Sans', sans-serif; font-size: 16px; font-color: #333333; line-height: 22px; margin: 0 0 0px 0;">
              <!-- <p style="font-family: 'IBM Plex Sans', sans-serif; font-size: 16px;">Changed your mind?</p> -->
              To work with the your Subscriptions, please use the instructions:<br>
              <a style="font-family: 'IBM Plex Sans', sans-serif; line-height: 22px;" href="https://docs.example.com/my-en/subscriptions/amount-of-resources">Changing the number licenses</a><br />
              <a style="font-family: 'IBM Plex Sans', sans-serif; line-height: 22px;" href="https://docs.example.com/my-en/subscriptions/purchase">Purchasing a new subscription</a><br />
              <a style="font-family: 'IBM Plex Sans', sans-serif; line-height: 22px;" href="https://docs.example.com/my-en/subscriptions/analytics">Viewing resource consumption statistics</a><br />
            </p>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td align="left" colspan="3" valign="top" width='580' style="padding: 0 30px;">
      <table>
        <tr>
          <td height="12"></td>
        </tr>
        <tr>
          <td>
            <div style="display: flex; margin-bottom: 20px;">
              <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" style="background-color: #007EC61A; padding: 20px; border-radius: 12px; margin-right: 25px;">
                <path d="M12 2C9.43639 2.00731 6.97349 2.99891 5.12 4.77V3C5.12 2.73478 5.01464 2.48043 4.82711 2.29289C4.63957 2.10536 4.38522 2 4.12 2C3.85478 2 3.60043 2.10536 3.41289 2.29289C3.22536 2.48043 3.12 2.73478 3.12 3V7.5C3.12 7.76522 3.22536 8.01957 3.41289 8.20711C3.60043 8.39464 3.85478 8.5 4.12 8.5H8.62C8.88522 8.5 9.13957 8.39464 9.32711 8.20711C9.51464 8.01957 9.62 7.76522 9.62 7.5C9.62 7.23478 9.51464 6.98043 9.32711 6.79289C9.13957 6.60536 8.88522 6.5 8.62 6.5H6.22C7.50578 5.15636 9.21951 4.30265 11.0665 4.08567C12.9136 3.86868 14.7785 4.30198 16.3407 5.31104C17.9028 6.32011 19.0646 7.84191 19.6263 9.61479C20.188 11.3877 20.1145 13.3009 19.4184 15.0254C18.7223 16.7499 17.4472 18.1781 15.8122 19.0643C14.1772 19.9505 12.2845 20.2394 10.4596 19.8813C8.63463 19.5232 6.99147 18.5405 5.81259 17.1022C4.63372 15.6638 3.99279 13.8597 4 12C4 11.7348 3.89464 11.4804 3.70711 11.2929C3.51957 11.1054 3.26522 11 3 11C2.73478 11 2.48043 11.1054 2.29289 11.2929C2.10536 11.4804 2 11.7348 2 12C2 13.9778 2.58649 15.9112 3.6853 17.5557C4.78412 19.2002 6.3459 20.4819 8.17317 21.2388C10.0004 21.9957 12.0111 22.1937 13.9509 21.8079C15.8907 21.422 17.6725 20.4696 19.0711 19.0711C20.4696 17.6725 21.422 15.8907 21.8079 13.9509C22.1937 12.0111 21.9957 10.0004 21.2388 8.17317C20.4819 6.3459 19.2002 4.78412 17.5557 3.6853C15.9112 2.58649 13.9778 2 12 2Z" fill="#0B408B" />
              </svg>
              <font style="font: 15px IBM Plex Sans, sans-serif; font-color: #333333; line-height: 2px; margin: 0 0 0px 0;">
              </font>
              <font style="font-family: 'IBM Plex Sans', sans-serif; line-height: 22px; font-size: 18px;"><strong>Support for your Subscriptions</strong> <br>
                <span style="font-family: 'IBM Plex Sans', sans-serif; line-height: 22px; font-size: 16px;">
                              Personal account functionality,
                              payment for services,<br> subscription management,
                              changing the number of <br>licenses:<br><br>
                              <a href="mailto:{{reseller.custom_attributes['vendor_email']}}" style="color:#0B408B;">
                              {{reseller.custom_attributes['vendor_email']}}</a><br>
                              <span style="color:#0B408B;">{{reseller.custom_attributes['vendor_phone']}}<span>
                              </span>
              </font>
            </div>
          </td>
        </tr>
        <tr>
          <td>
            <div style="display: flex;">
              <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" style="background-color: #007EC61A; padding: 20px; border-radius: 12px; margin-right: 25px;">
                <path d="M12 3C10.6868 3 9.38642 3.25866 8.17317 3.7612C6.95991 4.26375 5.85752 5.00035 4.92893 5.92893C3.05357 7.8043 2 10.3478 2 13V20C2 20.2652 2.10536 20.5196 2.29289 20.7071C2.48043 20.8946 2.73478 21 3 21H6C6.79565 21 7.55871 20.6839 8.12132 20.1213C8.68393 19.5587 9 18.7956 9 18V16C9 15.2044 8.68393 14.4413 8.12132 13.8787C7.55871 13.3161 6.79565 13 6 13H4C4 10.8783 4.84285 8.84344 6.34315 7.34315C7.84344 5.84285 9.87827 5 12 5C14.1217 5 16.1566 5.84285 17.6569 7.34315C19.1571 8.84344 20 10.8783 20 13H18C17.2044 13 16.4413 13.3161 15.8787 13.8787C15.3161 14.4413 15 15.2044 15 16V18C15 18.7956 15.3161 19.5587 15.8787 20.1213C16.4413 20.6839 17.2044 21 18 21H21C21.2652 21 21.5196 20.8946 21.7071 20.7071C21.8946 20.5196 22 20.2652 22 20V13C22 10.3478 20.9464 7.8043 19.0711 5.92893C17.1957 4.05357 14.6522 3 12 3ZM6 15C6.26522 15 6.51957 15.1054 6.70711 15.2929C6.89464 15.4804 7 15.7348 7 16V18C7 18.2652 6.89464 18.5196 6.70711 18.7071C6.51957 18.8946 6.26522 19 6 19H4V15H6ZM20 19H18C17.7348 19 17.4804 18.8946 17.2929 18.7071C17.1054 18.5196 17 18.2652 17 18V16C17 15.7348 17.1054 15.4804 17.2929 15.2929C17.4804 15.1054 17.7348 15 18 15H20V19Z" fill="#0B408B" />
              </svg>
              <font style="font: 15px IBM Plex Sans, sans-serif; font-color: #333333; line-height: 2px; margin: 0 0 0px 0;">
              </font>
              <font style="font-family: 'IBM Plex Sans', sans-serif; line-height: 22px; font-size: 18px;"><strong>Product support</strong> <br>
                <span style="font-family: 'IBM Plex Sans', sans-serif; line-height: 22px; font-size: 16px;">
                              Configuration, installation, product errors:<br><br>
                              <a href="mailto:{{reseller.custom_attributes['vendor_email']}}" style="color:#0B408B;">
                              {{reseller.custom_attributes['vendor_email']}}</a>
                              </span>
              </font>
            </div>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td align="left" colspan="3" valign="top" width='580' style="padding: 0 30px;">
      <table>
        <tr>
          <td height="12"></td>
        </tr>
        <tr>
          <td height="12" />
        </tr>
        <tr>
          <td>
            <p style="font-family: 'IBM Plex Sans', sans-serif; font-size: 30px; font-color: #000000; line-height: 22px; margin: 0 0 0px 0;">
              <strong>Our benefits</strong><br /><br />
            </p>
          </td>
        </tr>
        <!-- START -->
        <tr>
          <td align="left" colspan="3" valign="top" width='580' style="padding: 0 0px;">
            <table>
              <!-- 1 -->
              <tr>
                <td>
                <td align="left" valign="top" width="30" height="30">
                  <div style="line-height:1px;">
                    <img src="https://example.com/time.png" style="border:0; margin:0;" align="right" height="29" width="29" />
                  </div>
                </td>
          </td>
 
          <td>
          <td align="left" valign="center" width='550'>
            <p style="font: 13px IBM Plex Sans, sans-serif; font-color: #333333; line-height: 22px; margin: 0 0 0px 0;">
              24/7 access to subscription management and an ability to activate new services.
            </p>
          </td>
    </td>
  </tr>
  <!-- 2 -->
  <tr>
    <td>
    <td align="left" valign="top" width="30" height="30">
      <div style="line-height:1px;">
        <img src="https://example.com/hand.png" style="border:0; margin:0;" align="right" height="29" width="29" />
      </div>
    </td>
    </td>
    <td>
    <td align="left" valign="center" width='550'>
      <p style="font: 13px IBM Plex Sans, sans-serif; font-color: #333333; line-height: 22px; margin: 0 0 0px 0;">
        Free Trial Licenses.
      </p>
    </td>
    </td>
  </tr>
  <!-- 3 -->
  <tr>
    <td>
    <td align="left" valign="top" width="30" height="30">
      <div style="line-height:1px;">
        <img src="https://example.com/grow.png" style="border:0; margin:0;" align="right" height="29" width="29" />
      </div>
    </td>
    </td>
    <td>
    <td align="left" valign="center" width='550'>
      <p style="font: 13px IBM Plex Sans, sans-serif; font-color: #333333; line-height: 22px; margin: 0 0 0px 0;">
        An hourly / daily consumption-based pricing (depends on the service).
      </p>
    </td>
    </td>
  </tr>
  <!-- 4 -->
  <tr>
    <td>
    <td align="left" valign="top" width="30" height="30">
      <div style="line-height:1px;">
        <img src="https://example.com/box.png" style="border:0; margin:0;" align="right" height="29" width="29" />
      </div>
    </td>
    </td>
    <td>
    <td align="left" valign="center" width='550'>
      <p style="font: 13px IBM Plex Sans, sans-serif; font-color: #333333; line-height: 22px; margin: 0 0 0px 0;">
        Expense analytics and drill down reports.
      </p>
    </td>
    </td>
  </tr>
  <!-- 5 -->
  <tr>
    <td>
    <td align="left" valign="top" width="30" height="30">
      <div style="line-height:1px;">
        <img src="https://example.com/letter.png" style="border:0; margin:0;" align="right" height="29" width="29" />
      </div>
    </td>
    </td>
    <td>
    <td align="left" valign="center" width='550'>
      <p style="font: 13px IBM Plex Sans, sans-serif; font-color: #333333; line-height: 22px; margin: 0 0 0px 0;">
        Automatic reminders and notifications of subscriptions’ statuses.
      </p>
    </td>
    </td>
  </tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
  <td colspan="3" align="center" valign="top" height="30"></td>
</tr>
 
<!-- END BODY -->
<tr>
  <td valign="top" align="left" colspan="3" style="padding: 16px 0;" bgcolor="#f1f1f1">
    <table cellspacing="0" cellpadding="0" width="640" style="">
      <tr>
        <td valign="top" align="left" width="30"></td>
        <td valign="top" align="left">
          <font size="2" color="#888888" style="font-family: 'IBM Plex Sans', sans-serif;font-size:12px;line-height:1.5">
            © {{ reseller.custom_attributes['vendor_short_name'] }}, {{ reseller.custom_attributes['vendor_full_name'] }}.<br>
            E-mail: <a href="mailto:{{ reseller.custom_attributes['vendor_email'] }}" target="_top">{{ reseller.custom_attributes['vendor_email'] }}</a>
            You have received this message as a service user of {{ reseller.custom_attributes['vendor_short_name'] }}.
          </font>
        </td>
        <td align="left" valign="top" width="16"></td>
      </tr>
    </table>
  </td>
</tr>
</table>
</td>
</tr>
</table>
The report with daily consumptions of pay-as-you-go subscriptions is ready

The event occurs when the consumption report generation is completed (successfully or with an error). To separate notifications for monthly and one-time reports, as well as by report status, use the Query. For more information about reports, see Reports in the Customer Control Panel Guide.

Correction approvedOccurs when a manager approves a correction via the Operator Control Panel (see Approving a correction) or API (see Update a Reseller's Correction status). Optionally, the manager ID can be specified as the Query. A notification is sent to the account Owner's email.
Invoice closedOccurs on the billing day, when an invoice is generated (see Managing invoices). It is also used for manual sending an invoice to an email (see Resending an invoice)
The Invoice was approvedIt is triggered by approving a postpaid invoice with external management (see Managing invoices for the Postpay model by a third-party ERP system). The invoice.has_attached placeholder is used to define whether a third-party invoice is attached to the linked payment.
The Invoice was revoked
It is triggered by revoking approval of a postpaid invoice with external management (see Revoking approval for an invoice managed by a third-party ERP system and Revoke invoice approval by ID). Requires no Query.
Low balanceOccurs when the account balance is negative.
Manager createdOccurs when a new manager is created via the Operator Control Panel (see Adding a manager) or API (see Create a Reseller's Manager). Used for sending the credentials to the manager (see Placeholders used in notification templates for specific event handlers). Requires no Query.
Manual operationOccurs when:
Payment due date has come

Occurs only for subscriptions within the Postpay model in the specified in the Query number of days after a payment gets the Expired status (see Using placeholders for event handlers). If no conditions are specified in Query, the event occurs on the day when a payment gets the Expired status.

An email notification includes an attachment:

  • If external management of invoices for the Postpay model is not used — a PDF receipt generated by the platform and linked to a payment. Only for accounts that have as the default payment method an active payment method based on the CheckCash plugin (see Viewing and updating account type's details).
  • If external management of invoices for the Postpay model is used (see Managing invoices for the Postpay model by a third-party ERP system) — the file of a third-party receipt linked to a payment. Use placeholders to display its amount and currency (External total).
Payment has been changed (previously — Payment has been received)

Occurs when a payment changes its status. An email notification includes an attachment:

  • Prepay: a PDF receipt generated by the platform and linked to a payment. Only for accounts that have as the default payment method an active payment method based on the CheckCash plugin (see Viewing and updating account type's details).
  • Postpay:
    • If external management of invoices for the Postpay model is not used — a PDF receipt generated by the platform and linked to a payment. Only for accounts that have as the default payment method an active payment method based on the CheckCash plugin (see Viewing and updating account type's details).
    • If external management of invoices for the Postpay model is used (see Managing invoices for the Postpay model by a third-party ERP system) — the file of a third-party receipt linked to a payment. Use placeholders to display its amount and currency (External total).
Payment due date is coming

Occurs only for subscriptions within the Postpay model. Depending on the conditions specified in the Query (see Using placeholders for event handlers), it occurs the specified number of days before the latest date for completing a payment (see Viewing details of the invoice for the Postpay charging model).

To send notifications several days before the payment due date, use the following condition in Query:

payment.days_left = N

where N is the number of days before the payment due date.

To send notifications on the latest date for completing a payment (the payment due date), use the following condition in Query:

payment.days_left = 0

If you leave Query empty, notifications will be sent every day.

An email notification includes an attachment:

  • If external management of invoices for the Postpay model is not used — a PDF receipt generated by the platform and linked to a payment. Only for accounts that have as the default payment method an active payment method based on the CheckCash plugin (see Viewing and updating account type's details).
  • If external management of invoices for the Postpay model is used (see Managing invoices for the Postpay model by a third-party ERP system) — the file of a third-party receipt linked to a payment. Use placeholders to display its amount and currency (External total).
Postpay payment createdOccurs on the day after the billing day, when the platform closes a postpaid Invoice and creates the related payment. An email notification includes an attached PDF receipt for the postpaid payment. The PDF receipt is generated for accounts that have as the default payment method an active payment method based on the CheckCash plugin only (see Viewing and updating account type's details). 
Password reset requestOccurs 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 requestOccurs when an email with instructions on how to reset the manager's password for the Operator Control Panel is requested (see Resetting a forgotten manager's password).
MFA status for your account has been changed

Occurs when the MFA status of a manager is changed (see Viewing and updating manager's information): a single MFA method is added or deleted (see Configuring manager's MFA methods).

On the New Notification Template page, in the Additional Settings group, in the To field, enter the {{manager.email}} placeholder to send a notification to the manager who changed their the MFA status.

Leave the Query field empty.

MFA setting has been changed on the Reseller's side

Occurs when the Mandatory use setting is changed in the MFA settings of the reseller (see Manager settings).

On the New Notification Template page, in the Additional Settings group, in the To field, enter the {{manager.email}} placeholder to send a notification to every manager of the reseller.

Leave the Query field empty.

Before subscription expirationOccurs daily for all the subscriptions that are not linked to renewal orders in the Waiting for provisioning or Provisioning statuses. Requires the proper configuration of the Query field.
After subscription expirationOccurs daily for all the subscriptions. Requires the configuration of the Query field.
After subscription switched from trial to no-trialOccurs when a subscription is switched from a trial to a paid period both within the Prepay and Postpay models.
Subscription changedOccurs when:
  • The subscription status is changed to:
    • Active.
    • Deleted, excluding the case of automatic or manual deletion of a subscription with Ordered status.
    • Stopped (excluding the case of the administrative hold of the account).
    • Delivered.
    • Graced.
    • Waiting for manual approve.
    • Stopping failed.
    • Installation failed.
    • Activation failed.
    • Renewing failed.
    • Updating failed.
  • A subscription is switched from a trial to a paid period.
  • An active subscription is renewed in the Operator Control Panel (see Manual renewing of a subscription) or in the Customer Control Panel (see Renewing a Subscription).
  • A subscription is auto-renewed (see Auto-renewing a subscription).
  • The quantity of additional resources is changed (see Upgrading or downgrading subscription resources).
Verify emailOccurs when a new user completes 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 Owner (see Inviting External Users).

Order changedOccurs when the order status changes to:

The receipt is not attached to a notification.

Order created

Occurs when a new order is created (Creating an order) including manual and automatic renewing of a subscription.

To avoid sending to customers invoices to pay for prolong orders created on the billing day for automatic paying from the account balance, see Prolonging a subscription), it is necessary to exclude subscriptions with Auto-renew point (days) = 0 from the Order created and Order changed events. To do that, for these events, in the Query field, use the following expression: order.type = "ProlongOrder" AND order.renewal_is_positive = true. As a result, the events will occur for subscriptions with Auto-renew point (days) > 0 only.

Guaranteed payment createdOccurs when:
Guaranteed payment changedOccurs when a guaranteed payment is revoked manually or automatically because of the balance top-up (see Manually revoking a guaranteed payment).
Guaranteed payment will expireOccurs in the specified number of days before the expiration date of a guaranteed payment.
Days left to payOccurs daily for all the subscriptions. Requires the configuration of the Query field.
Phone verificationOccurs after clicking the Receive a verification code button at the SMS Verification step during the full registration of an account (see Full registration).
Billing day is coming

Occurs on a daily basis for each unique billing day. This event is used to inform the account Owner by email about the sum that is required at the account balance on the billing day in order to prevent the subscriptions from stopping. If an account has a subscription with the Pay as you go billing type, the notification contains the information that the required sum may change (see Pay as you go. Charges generation). The email additionally contains the link to the Top-up Balance page (see Balance topping up). Managers authorized in the Operator Control Panel can also follow the link and log in to the Customer Control Panel within the same reseller if they do not have another session in their browser with authorization in the Customer Control Panel.

Subscriptions in the following statuses only (see Viewing the list of subscriptions) are taken into account by the event handler:

  • Active.

  • Graced.

  • Waiting for manual approve for stopping.

This event handler requires the setting of the Query.

If the query is not set, then the event handler is triggered in every possible situation.

For example, if an account has three subscriptions with any billing type with three different billing days, the account Owner will receive three email notifications a day.

To avoid this situation, it is strongly recommended to set the following parameters (see Using placeholders for event handlers):

  • Existence of the subscriptions with the determined payment model. You can set this parameter using the subscription.payment_model placeholder:

    • If subscription.payment_model = "postpay", the notification is sent for postpaid subscriptions only.
    • If subscription.payment_model = "prepay", the notification is sent for prepaid subscriptions only.
  • Existence of the subscriptions with the determined billing types. You can set this parameter using the monthly_billing placeholder. To send notifications only to the Owners of the accounts that have the subscriptions with monthly billing types (CSP monthly, Monthly Commitment), add the following expression in the Query field:

    monthly_billing = "true"
  • The number of days left to the billing day that caused the notification event to occur. You can set this parameter by using the billing_day_left placeholder. To send notifications a defined amount of days prior to each unique billing day, add the following expression in the Query field:

    billing_day_left = {amount of days prior to each unique billing day}

You can additionally set the following parameters:

  • The date of the billing day. You can set this parameter by using the billing_day placeholder.
  • The total amount of charges in the Open status that will be closed or blocked on the billing day that caused the notification event to occur. Only subscriptions with Auto-renew point (days) = 0 are included. If there are no open charges, preliminary generation of the charges for the next billing period is used for calculation. You can set this parameter by using the billing_day_open_charges_amount placeholder.
  • The IDs of the plans of the account active subscriptions. You can set this parameter by using the plan_ids placeholder.
  • The IDs of the products of the account active subscriptions. You can set this parameter by using the product_ids placeholder.
  • The account type key. You can set this parameter by using the account.type_key placeholder.
  • The account class key. You can set this parameter by using the account.class_key placeholder.
  • The available account balance. You can set this parameter by using the account.balance placeholder.
  • The financial blocking threshold. You can set this parameter by using the account.financial_blocking_threshold placeholder.

For example:

billing_day = 1 and billing_day_left = 28 and account.type_key = "personal" and account.class_key = "default" and account.financial_blocking_threshold = 0 and monthly_billing = true and (plan_ids include? 1420) and (product_ids include? 498)

If you want to add several conditions that should be fulfilled simultaneously, use the and operator: billing_day = 1 and billing_day_left = 28. In this case, a notification is sent 28 days prior to the billing day only for the subscriptions with the billing day set on the 1st day of each month. In total, one notification a month is sent to each unique account Owner.

If you want to add several conditions, only one of which should be fulfilled at a time, use the or operator: billing_day = 1 or billing_day = 5. In this example, one notification for each subscription with the unique billing day is sent each day of the billing period for subscriptions, if the billing day is set on the 1st or the 5th day of each month. In total, two notifications a day are sent to each unique account Owner.

Use parentheses () to group and to combine conditions: (billing_day = 1 or billing_day = 2) and (billing_day_left = 3 or billing_day_left = 4). In this case:

  • One notification is sent 23 days prior to the billing day for the subscriptions with the billing day set on 1st day of each month.
  • One notification is sent 24 days prior to the billing day for the subscriptions with the billing day set on 1st day of each month.
  • One notification is sent 23 days prior to the billing day for the subscriptions with the billing day set on 2nd day of each month.
  • One notification is sent 24 days prior to the billing day for the subscriptions with the billing day set on 2nd day of each month.

In total, 4 notifications a month are sent to each unique account Owner.

Also, you can use math operators + and -, comparison operators > <, or invert a placeholder and its value (1 = billing_day).

To make a table with subscriptions that are about to expire, use the following placeholders:

  • next_billing_period_start_day — the first day of the next billing period with reference to the billing day triggered the event.
  • next_billing_period_end_day — the last day of the next billing period with reference to the billing day triggered the event.
  • Placeholders for the subscription entity (see Placeholders for the Subscription entity).
Billing day for manager's subscriptions has come (former Billing day has come)

Occurs after running the billing process and closing charges for every manager in the following cases:

  1. A manager has at least one account with a subscription in any status except Deleted, and the subscription billing day is the day of running the billing process.
  2. The conditions specified in the Query field are satisfied.

On the New Notification Template page, in the Additional Settings group, in the To field, enter the {{manager.email}} placeholder to send a notification to the proper manager email.

Billing day for account's subscription has come

Occurs after running the billing process and closing charges for every account if all of the following conditions are satisfied:

  1. An account has at least one subscription with the billing day equal to the day of running the billing process.
  2. This subscription has charges in the Closed status for the previous billing period.
  3. The sum of all these charges is greater than 0.
  4. The conditions specified in the Query field are satisfied.

The event occurs independently for every subscription of an account.

On the New Notification Template page, in the Additional Settings group, in the To field, it is possible to use the {{owner.email}} placeholder to send a notification to the Owner of an account.

For the event, a particular preformatted notification template can be used: with data per resource category — for Microsoft Azure Plan and Microsoft Azure subscriptions, and with data per resource — for VMware vCloud Director subscriptions:

The notification template supports displaying the following information:

  1. Spend Dynamics:
    1. Costs for the last completed billing period (up to 11 digits) with the reseller currency units. Negative cost are displayed as 0.
    2. Year and month of the last completed billing period.
    3. Costs for the second-to-last completed billing period (up to 11 digits) with the reseller currency units. Negative cost are displayed as 0.
    4. Year and month of the second-to-last completed billing period.
    5. Percentage of the growth rate calculated as follows:

      ( (Last Billing period - Second-to-last Billing period) / Second-to-last Billing period ) × 100

      The red color is used for positive growth rate, green — for a negative one, grey — for zero growth rate.

    6. The growth rate for negative costs is set as follows:
      • -100% if only the last billing period has negative costs.
      • 100% if only the second-to-last billing period has negative costs.
      • 0% if both last and second-to-last billing periods have negative costs.
    7. The Spend Dynamics block is not displayed if there is no data for the last or second-to-last completed billing periods.
  2. Cost structure in the past billing period:
    1. Line chart:
      1. Every part of the chart represents a resource (resource category) consumed in the last completed billing period.
      2. Every part of the chart has its color.
      3. The chart parts are sorted from most to least, including negative costs.
      4. The maximum number of the parts is 5. Other resources (resource categories) are grouped and displayed as others.
    2. Legend:
      1. The legend displays the part names and their percentage. Negative costs are displayed as 0%.
      2. The maximum number of the parts is 3.
      3. The part names are sorted from most to least.
      4. Next to the part names, their colors used in the chart are displayed.
    3. Table:
      1. The table includes the following columns:
        1. The part colors used in the chart.
        2. Resource (resource category).
        3. Cost, <the reseller currency units> — the quantity of the resource (resource category) consumed in the last completed billing period.
      2. The rows are sorted by cost, from most to least, including negative costs.
  3. Last month weekly cost dynamic — bar chart:
    1. Every part of a bar represents a resource (resource category) consumed in the last completed billing period.
    2. The maximum number of the parts is 5. Other resources (resource categories) are grouped and displayed as others.
    3. The part colors match the line chart.
    4. Hight of a bar represents the amount of the resource (resource category) consumed weekly in the last completed billing period, including negative costs.
  4. Explore more analytics — link to the Analytics page in the Customer Control Panel (see -Subscription analytics) for a subscription triggered the event, with the predefined filters:
    1. Granularity — daily or monthly.
    2. Period — depending on the granularity:
      • Daily — current or previous billing period.
      • Monthly — 3, 6, or 12 billing periods.

All costs are displayed in accordance with the reseller currency settings (see Viewing the list of currencies). The names of months are displayed in the default language of the Operator Control Panel (see Managing language settings), and the rest of the text is specified manually.

Example viewExample code
<!-- CHART_COLORS = %w(#5c4aa7 #d4e689 #94db99 #bd8c75 #9fc5e8 #db577d) -->
<!-- SHOULD BE MAPPED IN CORE FOR SORTED BY 'percent_usage' for last_billing_period -->
<table width="100%" bgcolor="#ffffff">
<tr>
  <td height="30"></td>
</tr>
<tr>
  <td>
    <table width="640" cellpadding="0" cellspacing="0" align="center" bgcolor="#ffffff" style="">
    <!-- HEADER -->
<tr>
  <td align="left" valign="top" colspan="3" style="padding: 24px 30px;" bgcolor="#ffffff">
    <table cellpadding="0" cellspacing="0" width="580">
      <tr>
        <td align="left" valign="top">
          <a href="{{ reseller.custom_attributes['vendor_site_url'] }}" title="Vendor" style="text-decoration:none" target="_blank"><img src="https://example.com/logo.png" width="151" height="54" align="left" border="0" alt="" style="margin:0"></a>
        </td>
        <td align="right" valign="top"> <font color="#333333" face="Arial" style="font-size: 13px;">
          <a href="https://example.com/catalog/" title="Vendor Market" target="_blank">Buy a subscription to a new service<br>or try free</a>
          </font>
          <br>
          <br> <font color="#333333" face="Arial, sans-serif" style="font-size: 14px;">
          <b><a href="tel:+1-234-555-67-89" target="_blank" style="color:#333333;text-decoration: none;">+1(234)555-67-89</a></b>
          </font>
        </td>
      </tr>
    </table>
  </td>
</tr>
<!--END HEADER -->
<!-- GRAY -->
<tr>
  <td align="left" valign="top" colspan="3" style="padding: 1px 30px;" bgcolor="#f0f0f0"> </td>
</tr>
<!--END GRAY -->
<!-- BODY -->
<tr>
  <td align="left" colspan="3" valign="top" width='580' style="padding: 0 30px;">
    <table>
      <tr>
        <td>
          <p style="margin:0;padding:0;"> <font color="#333333" face="Arial, sans-serif" style="font-size: 20px;">
            <br>Hello, {{owner.first_name}} {{owner.last_name}}!
            </font>
            <br>
            <br> <font color="#333333" face="Arial, sans-serif" style="font-size: 14px;">
            The expenses of the company <strong> # {{account.id}} "{{account.name}}" </strong> for the subscription <strong> # {{subscription.id}} "{{subscription.name}}" </strong>
            in the past billing period (from {{subscription.last_billing_period_start_day}} to {{subscription.last_billing_period_end_day}}) were
            <strong>{{ subscription.last_billing_period_amount_with_currency }}</strong>
            </font>
          </p>
        </td>
      </tr>
    </table>
  </td>
</tr>
<tr>
  <td height="24"></td>
</tr>

<tr>
  <td align="left" colspan="3" valign="center" width='580' style="padding: 0 30px;">
    <table>
      <tr>
        <td height="12"></td>
      </tr>
      <tr>
        <td>
          <p style="font: 16px Arial, sans-serif; color: #333333; line-height: 22px; margin: 0 0 0px 0;"> <strong>Spend Dynamics</strong>
            <br />
            <br />
          </p>
        </td>
      </tr>
      <tr>
        <td align="center" valign="center" width='190' style='border-right: 2px solid; border-right-color: #f1f1f1;'>
          <p style="font: 16px Arial, sans-serif; color: #333333; line-height: 2px; margin: 0 0 0px 0; font-weight: bold;">
            {% if subscription.pre_last_billing_period_amount < 0 %}
              <br>0.00 {{reseller.currency}} 
              <br />
            {% else %}
              <br>{{ subscription.pre_last_billing_period_amount_with_currency }}
              <br />
            {% endif %}
          </p>
          <p style="font: 14px Arial, sans-serif; color: #808080; line-height: 22px; margin: 0 0 0px 0;">
            <br>{{subscription.pre_last_billing_period_month}} {{subscription.pre_last_billing_period_year}}
            <br>
          </p>
        </td>
        <td align="center" valign="center" width='190' style='border-right: 2px solid; border-right-color: #f1f1f1;'>
          <p style="font: 16px Arial, sans-serif; color: #333333; line-height: 2px; margin: 0 0 0px 0; font-weight: bold;">
            {% if subscription.last_billing_period_amount < 0 %}
              <br>0.00 {{reseller.currency}}
              <br />
            {% else %}
              <br>{{ subscription.last_billing_period_amount_with_currency }}
              <br />
            {% endif %}
          </p>
          <p style="font: 14px Arial, sans-serif; color: #808080; line-height: 22px; margin: 0 0 0px 0;">
            <br>{{subscription.last_billing_period_month}} {{subscription.last_billing_period_year}}
            <br>
          </p>
        </td>
        <td align="center" valign="center" width='190'>
        {% if subscription.pre_last_billing_period_amount < 0 %}
          <p style="font: 16px Arial, sans-serif; color: red; line-height: 2px; margin: 0 0 0px 0; font-weight: bold;">
          <br>+100%
          <br>
        {% elsif subscription.change_in_periods > 0 %}
          <p style="font: 16px Arial, sans-serif; color: red; line-height: 2px; margin: 0 0 0px 0; font-weight: bold;">
          <br>+{{subscription.change_in_periods}}%
          <br>
        {% elsif subscription.change_in_periods < 0 %}  
          <p style="font: 16px Arial, sans-serif; color: green; line-height: 2px; margin: 0 0 0px 0; font-weight: bold;">
          <br>{{subscription.change_in_periods}}%
        {% else %}
          <p style="font: 16px Arial, sans-serif; color: grey; line-height: 2px; margin: 0 0 0px 0; font-weight: bold;">
          <br>{{subscription.change_in_periods}}%
        {% endif %}
          </p>
          <p style="font: 14px Arial, sans-serif; color: #808080; line-height: 22px; margin: 0 0 0px 0;">
            <br><br>
          </p>
        </td>
      </tr>
    </table>
  </td>
</tr>
<tr>
  <td align="left" valign="top" width='580' style="padding: 0 30px;">
    <table>
      <tr>
        <td height="12"></td>
      </tr>
      <tr>
        <td>
          <p style="font: 16px Arial, sans-serif; color: #333333; line-height: 22px; margin: 0 0 0px 0;">
            <br><strong>Cost Structure in {{subscription.last_billing_period_month}} by resource category</strong>
            <br />
            <br />
          </p>
        </td>
      </tr>
      <tr>
        <td align="left" valign="top" width='640'>
          <table>
            <tr>
            {% assign counter = 0 %}
            {% for item in subscription.resource_categories %}
              {% if counter < 3 %}
                {% assign counter = counter | plus:1 %}
                <td align="left" valign="center" width='15' height='15' style="background-color: {{item['chart_color']}}; border-radius: 1px;"> </td>
                <td>  </td>
                <td align="left" valign="center" height='15'>
                    <p style="font: 12px Arial, sans-serif; color: #555555; line-height: 15px; margin: 0;"> {{ item['name'] }} {{ item['percent_usage'] }}% </p>
                </td>
                <td>  </td>
              {% endif %}
            {% endfor %}
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td height="12"></td>
      </tr>
      <tr>
        <td align="left" valign="top" width='640'>
          <table>
            <tr>
              {% for item in subscription.resource_categories %}
              
              <td align="center" valign="center" width="{{ item['percent_usage'] | times: 630 | divided_by: 100 }}" height='25' style="background-color: {{item['chart_color']}}; border-radius: 1px;"> </td>
              
              {% endfor %}
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td align="center" colspan="6" valign="center" width='640'>
          <table>
            <tr>
              <td height="24"></td>
            </tr>
            <tr>
              <td width='20' height='20' style='background-color: none;'> </td>
              <td valign="center" width='300' style='padding-left: 20px;'>
                <p style="font: 16px Arial, sans-serif; color: #808080; line-height: 2px;">
                  <br>RESOURCE CATEGORY
                  <br />
                </p>
              </td>
              <td valign="center" width='300'>
                <p style="font: 16px Arial, sans-serif; color: #808080; line-height: 2px;">
                  <br>COST, {{reseller.currency}}
                  <br />
                  <br>
                </p>
              </td>
              <br>
            </tr>
            <br>
            <tr><td><br></td></tr>

            {% for item in subscription.resource_categories %}
            <tr>
              <td align="left" valign="center" width='15' height='15' style="background-color: {{item['chart_color']}}; border-radius: 1px;"> </td>
              <td valign="center" width='300' style='padding-left: 20px;'>
                <p style="font: 14px Arial, sans-serif; color: #333333; line-height: 2px;">
                  <br>{{ item['name'] }}
                  <br />
                </p>
              </td>
              <td valign="center" width='300'>
                <p style="font: 14px Arial, sans-serif; color: #333333; line-height: 2px;">
                  <br>{{ item['total_for_current_billing_period'] }}
                  <br />
                </p>
              </td>
            </tr>
            <tr>
              <td height="8"></td>
            </tr>
            {% endfor %}
          </table>
        </td>
      </tr>
      <tr> </tr>
    </table>
  </td>
</tr>
<tr>
  <td align="left" valign="top" width='580' style="padding: 0 30px;">
    <table>
      <tr>
        <td height="12"></td>
      </tr>
      <tr>
        <td>
          <p style="font: 16px Arial, sans-serif; color: #333333; line-height: 22px; margin: 0 0 0px 0;">
            <br><strong>Last month weekly cost dynamic</strong>
            <br />
            <br />
          </p>
        </td>
      </tr>
      <!--
        max_totals_sum_weekly
        decorated_steps ['200K', '190K', '180K' .. '20K', '10K'] (max and first el == decorated max_totals_sum_weekly), size == 10
        resources_total_by_weeks [['3 Feb. - 9 Feb.', [[46000, '#5c4aa7'], [15000,'#d4e689'], ... ]], ...]] -->

        <!-- maybe refactor this.... -->
      <tr>
        <td align="center" colspan="7" valign="center" width='640' height='280'>
          <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
            <tr>
              <td style="vertical-align:bottom; border-right: 2px solid #ebebeb;">
                <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border: none; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; width:20px;">
                  {% for step in subscription.decorated_steps['positive_result'] %}
                  <tr>
                    <td style="height: 28; font: 12px Arial, sans-serif; color: #808080;" align="center">{{step}}</td>
                  </tr>
                  {% endfor %}
                </table>
              </td>
              {% for item in subscription.resources_total_by_weeks %}
              <td style="padding: 0 16px; vertical-align:bottom;">
                <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border: none; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; width:80px;">
                    {% for totals in item['totals'] %}
                      {% if totals['total'] > 0 %}
                        <tr> 
                          <td><div style="height: {{ totals['total'] | times: 140 | divided_by: subscription.max_totals_sum_weekly }}px; background-color: {{totals['chart_color']}};"></div></td>
                        </tr> 
                      {% endif %}
                    {% endfor %}
                </table>
              </td>
              {% endfor %}
            </tr>
            <tr style='border-top: 2px solid #ebebeb;'>
              <td style="vertical-align:bottom; border-right: 2px solid #ebebeb;">
                <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border: none; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; width:20px;">
                  {% for step in subscription.decorated_steps['negative_result'] %}
                    {% if step == '0' %}
                      <tr>
                        <td style="height: 28; font: 12px Arial, sans-serif; color: #808080;" align="center"><br></td>
                      </tr>
                    {% else %}
                      <tr>
                        <td style="height: 28; font: 12px Arial, sans-serif; color: #808080;" align="center">{{step}}</td>
                      </tr>
                    {% endif %}
                  {% endfor %}
                </table>
              </td>
              {% for item in subscription.resources_total_by_weeks %}
              <td style="padding: 0 16px; vertical-align:top;">
                <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border: none; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; width:80px;">
                    {% assign reverse_total = item['totals'] | reverse %}
                    {% for totals in reverse_total %}
                      {% if totals['total'] < 0 %}
                        <tr> 
                          <td><div style="height: {{ totals['total'] | times: 140 | divided_by: subscription.min_totals_sum_weekly }}px; background-color: {{totals['chart_color']}};"></div></td>
                        </tr> 
                
                      {% endif %}                
                    {% endfor %}
                </table>
              </td>
              {% endfor %}
            </tr>
            <tr>
              <td align="center" valign="center"> </td>
              {% for item in subscription.resources_total_by_weeks %}
              <td align="center" valign="center">
                <p style="font: 12px Arial, sans-serif; color: #808080; line-height: 14px;">
                  <br>{{ item['week'] }}
                  <br />
                </p>
              </td>
              {% endfor %}
            </tr>
          </table>
        </td>
      </tr>
      <tr> </tr>
    </table>
  </td>
</tr>
<tr>
  <td height="24"></td>
</tr>
<td>
  <table>
    <tr>
      <p style="font: 14px Arial, sans-serif; font-color: #333333; line-height: 22px; margin: 12px 0; text-align: center;">
        <a style="display: inline-block;" href="https://ap-07.test.activeplatform.com/client/analytics"> <span style="display: inline-block; color: #ffffff; background-color: rgb(22, 155, 213); padding: 12px 60px; border-radius: 5px;">
        EXPLORE MORE ANALYTICS
        </span> </a>
      </p>
    </tr>
  </table>
</td>
</tr>
<tr>
  <td colspan="3" align="center" valign="top" height="30"></td>
</tr>
<!-- END BODY -->
<tr>
  <td valign="top" align="left" colspan="3" style="padding: 16px 0;" bgcolor="#f1f1f1">
    <table cellspacing="0" cellpadding="0" width="640" style="">
      <tr>
        <td valign="top" align="left" width="30"></td>
        <td valign="top" align="left"> <font size="2" face="Arial, sans-serif" color="#888888" style="font-family:Arial,sans-serif;font-size:12px;line-height:1.5">
          © {{ reseller.custom_attributes['vendor_short_name'] }}, {{ reseller.custom_attributes['vendor_full_name'] }}.<br>
          Phone:
          <a href="tel:{{ reseller.custom_attributes['vendor_phone_escaped'] }}" value="{{ reseller.custom_attributes['vendor_phone'] }}">
          <font color="#888888">{{ reseller.custom_attributes['vendor_phone'] }}</font> </a> , E-mail: <a href="mailto:{{ reseller.custom_attributes['vendor_email'] }}" target="_top">{{ reseller.custom_attributes['vendor_email'] }}</a>, <a href="{{ reseller.custom_attributes['vendor_site_url'] }}">contact information</a>.
          <br> You have received this message as service user of {{ reseller.custom_attributes['vendor_short_name'] }}. If you believe that this message was sent by mistake, please, <a href="mailto:{{ reseller.custom_attributes['vendor_email'] }}?Subject=Email was sent by mistake">let us know</a> about that. </font>
        </td>
        <td align="left" valign="top" width="16"></td>
      </tr>
    </table>
  </td>
</tr>
<table width="100%" bgcolor="#ffffff">
  <tr>
    <td>
      <table width="640" cellpadding="0" cellspacing="0" align="center" bgcolor="#ffffff" style="">
        <!-- BODY LINE 1 -->
        <tr>
          <td align="left" colspan="3" valign="top" width='580' style="padding: 0 30px;">
            <table>
              <tr>
                <td>
                  <p style="margin:0;padding:0;">
                    <font color="#333333" face="Arial, sans-serif" style="font-size: 20px;">
                      <br>Hello, {{owner.first_name}} {{owner.last_name}}!
                    </font>
                    <br>
                    <br>
                    <font color="#333333" face="Arial, sans-serif" style="font-size: 14px;"> The expenses of the company <strong> # {{account.id}} "{{account.name}} </strong> for the subscription <strong> # {{subscription.id}} "{{subscription.name}}" </strong>in the past billing period (from {{subscription.last_billing_period_start_day | date: "%d.%m.%Y" }} to {{subscription.last_billing_period_end_day | date: "%s" | minus : 86400 | date: "%d.%m.%Y" }}) were <strong>{{ subscription.last_billing_period_amount_with_currency }}</strong>
                    </font>
                  </p>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td height="24"></td>
        </tr> {% if subscription.last_billing_period_amount > 0 and subscription.pre_last_billing_period_amount > 0 %} <tr>
          <td align="left" colspan="3" valign="center" width='580' style="padding: 0 30px;">
            <table>
              <tr>
                <td height="12"></td>
              </tr>
              <tr>
                <td>
                  <p style="font: 16px Arial, sans-serif; color: #333333; line-height: 22px; margin: 0 0 0px 0;">
                    <strong>Spend Dynamics</strong>
                    <br />
                    <br />
                  </p>
                </td>
              </tr>
              <tr>
                <td align="center" valign="center" width='190' style='border-right: 2px solid; border-right-color: #f1f1f1;'>
                  <p style="font: 16px Arial, sans-serif; color: #333333; line-height: 2px; margin: 0 0 0px 0; font-weight: bold;">
                    <br>{{ subscription.pre_last_billing_period_amount_with_currency }}
                    <br />
                  </p>
                  <p style="font: 14px Arial, sans-serif; color: #808080; line-height: 22px; margin: 0 0 0px 0;">
                    <br>{{subscription.pre_last_billing_period_month}} {{subscription.pre_last_billing_period_year}}
                    <br>
                  </p>
                </td>
                <td align="center" valign="center" width='190' style='border-right: 2px solid; border-right-color: #f1f1f1;'>
                  <p style="font: 16px Arial, sans-serif; color: #333333; line-height: 2px; margin: 0 0 0px 0; font-weight: bold;">
                    <br>{{ subscription.last_billing_period_amount_with_currency }}
                    <br />
                  </p>
                  <p style="font: 14px Arial, sans-serif; color: #808080; line-height: 22px; margin: 0 0 0px 0;">
                    <br>{{subscription.last_billing_period_month}} {{subscription.last_billing_period_year}}
                    <br>
                  </p>
                </td>
                <td align="center" valign="center" width='190'> {% if subscription.change_in_periods > 0  %} <p style="font: 16px Arial, sans-serif; color: red; line-height: 2px; margin: 0 0 0px 0; font-weight: bold;">
                    <br>+{{subscription.change_in_periods}}% <br> {% elsif subscription.change_in_periods < 0 %}
                  <p style="font: 16px Arial, sans-serif; color: green; line-height: 2px; margin: 0 0 0px 0; font-weight: bold;">
                    <br>{{subscription.change_in_periods}}% {% else %}
                  <p style="font: 16px Arial, sans-serif; color: grey; line-height: 2px; margin: 0 0 0px 0; font-weight: bold;">
                    <br>{{subscription.change_in_periods}}% {% endif %}
                  </p>
                  <p style="font: 14px Arial, sans-serif; color: #808080; line-height: 22px; margin: 0 0 0px 0;">
                    <br>
                    <br>
                  </p>
                </td>
              </tr>
            </table>
          </td>
        </tr> {% endif %} <tr>
          <td align="left" valign="top" width='580' style="padding: 0 30px;">
            <table>
              <tr>
                <td height="12"></td>
              </tr>
              <tr>
                <td>
                  <p style="font: 16px Arial, sans-serif; color: #333333; line-height: 22px; margin: 0 0 0px 0;">
                    <br>
                    <strong>Cost Structure in {{subscription.last_billing_period_month}} by resource</strong>
                    <br />
                    <br />
                  </p>
                </td>
              </tr>
              <tr>
                <td align="left" valign="top" width='640'>
                  <table>
                    <tr> {% assign counter = 0 %} {% for item in subscription.resource_names %} {% if counter < 3 %} {% assign counter = counter | plus:1 %} <td align="left" valign="center" width='15' height='15' style="background-color: {{item['chart_color']}}; border-radius: 1px;"></td>
                      <td>  </td>
                      <td align="left" valign="center" height='15'>
                        <p style="font: 12px Arial, sans-serif; color: #555555; line-height: 15px; margin: 0;"> {{ item['name'] }} {{ item['percent_usage'] }}% </p>
                      </td>
                      <td>  </td> {% endif %} {% endfor %}
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td height="12"></td>
              </tr>
              <tr>
                <td align="left" valign="top" width='640'>
                  <table>
                    <tr> {% for item in subscription.resource_names %} <td align="center" valign="center" width="{{ item['percent_usage'] | times: 630 | divided_by: 100 }}" height='25' style="background-color: {{item['chart_color']}}; border-radius: 1px;"> </td> {% endfor %} </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td align="center" colspan="6" valign="center" width='640'>
                  <table>
                    <tr>
                      <td height="24"></td>
                    </tr>
                    <tr>
                      <td width='20' height='20' style='background-color: none;'></td>
                      <td valign="top" width='300' style='padding-left: 20px;'>
                        <p style="font: 16px Arial, sans-serif; color: #808080; line-height: 2px;">
                          <br>RESOURCE <br />
                        </p>
                      </td>
                      <td valign="center" width='300'>
                        <p style="font: 16px Arial, sans-serif; color: #808080; line-height: 2px;">
                          <br>COST, {{reseller.currency}}
                          <br />
                        </p>
                      </td>
                      <br>
                    </tr>
                    <br>
                    <tr>
                      <td>
                        <br>
                      </td>
                    </tr> {% for item in subscription.resource_names %} <tr>
                      <td align="left" valign="center" width='15' height='15' style="background-color: {{item['chart_color']}}; border-radius: 1px;"></td>
                      <td valign="center" width='300' style='padding-left: 20px;'>
                        <p style="font: 14px Arial, sans-serif; color: #333333; line-height: 2px;">
                          <br>{{ item['name'] }}
                          <br />
                        </p>
                      </td>
                      <td valign="center" width='300'>
                        <p style="font: 14px Arial, sans-serif; color: #333333; line-height: 2px;">
                          <br>{{ item['total_for_current_billing_period'] }}
                          <br />
                        </p>
                      </td>
                    </tr>
                    <tr>
                      <td height="8"></td>
                    </tr> {% endfor %}
                  </table>
                </td>
              </tr>
              <tr></tr>
            </table>
          </td>
        </tr>
        <tr>
          <td align="left" valign="top" width='580' style="padding: 0 30px;">
            <table>
              <tr>
                <td height="12"></td>
              </tr>
              <tr>
                <td>
                  <p style="font: 16px Arial, sans-serif; color: #333333; line-height: 22px; margin: 0 0 0px 0;">
                    <br>
                    <strong>Last month weekly cost dynamic</strong>
                    <br />
                    <br />
                  </p>
                </td>
              </tr>
              <!--
         max_totals_sum_weekly_by_resource_name
         decorated_steps_by_resource_name ['200K', '190K', '180K' .. '20K', '10K'] (max and first el == decorated max_totals_sum_weekly_by_resource_name), size == 10
         resources_total_by_weeks_and_resource_name [['3 Feb. - 9 Feb.', [[46000, '#5c4aa7'], [15000,'#d4e689'], ... ]], ...]] -->
              <!-- maybe refactor this.... -->
              <tr>
                <td align="center" colspan="7" valign="center" width='640' height='280'>
                  <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
                    <tr>
                      <td style="vertical-align:bottom; border-right: 2px solid #ebebeb;">
                        <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border: none; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; width:20px;"> {% for step in subscription.decorated_steps_by_resource_name['positive_result'] %} <tr>
                            <td style="height: 28; font: 12px Arial, sans-serif; color: #808080;" align="center">{{step}}</td>
                          </tr> {% endfor %} </table>
                      </td> {% for item in subscription.resources_total_by_weeks_and_resource_name %} <td style="padding: 0 16px; vertical-align:bottom;">
                        <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border: none; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; width:80px;"> {% for totals in item['totals'] %} {% if totals['total'] > 0 %} <tr>
                            <td>
                              <div style="height: {{ totals['total'] | times: 140 | divided_by: subscription.max_totals_sum_weekly_by_resource_name }}px; background-color: {{totals['chart_color']}};"></div>
                            </td>
                          </tr> {% endif %} {% endfor %} </table>
                      </td> {% endfor %}
                    </tr>
                    <tr style='border-top: 2px solid #ebebeb;'>
                      <td style="vertical-align:bottom; border-right: 2px solid #ebebeb;">
                        <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border: none; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; width:20px;"> {% for step in subscription.decorated_steps_by_resource_name['negative_result'] %} {% if step == '0' %} <tr>
                            <td style="height: 28; font: 12px Arial, sans-serif; color: #808080;" align="center">
                              <br>
                            </td>
                          </tr> {% else %} <tr>
                            <td style="height: 28; font: 12px Arial, sans-serif; color: #808080;" align="center">{{step}}</td>
                          </tr> {% endif %} {% endfor %} </table>
                      </td> {% for item in subscription.resources_total_by_weeks_and_resource_name %} <td style="padding: 0 16px; vertical-align:top;">
                        <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border: none; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; width:80px;"> {% assign reverse_total = item['totals'] | reverse %} {% for totals in reverse_total %} {% if totals['total'] < 0 %} <tr>
                            <td>
                              <div style="height: {{ totals['total'] | times: 140 | divided_by: subscription.min_totals_sum_weekly_by_resource_name }}px; background-color: {{totals['chart_color']}};"></div>
                            </td>
                          </tr> {% endif %} {% endfor %} </table>
                      </td> {% endfor %}
                    </tr>
                    <tr>
                      <td align="center" valign="center"></td> {% for item in subscription.resources_total_by_weeks_and_resource_name %} <td align="center" valign="center">
                        <p style="font: 12px Arial, sans-serif; color: #808080; line-height: 14px;">
                          <br>{{ item['week'] }}
                          <br />
                        </p>
                      </td> {% endfor %}
                    </tr>
                  </table>
                </td>
              </tr>
              <tr></tr>
            </table>
          </td>
        </tr>
        <tr>
          <td height="24"></td>
        </tr>
        <td>
          <table>
            <tr>
              <p style="font: 14px Arial, sans-serif; font-color: #333333; line-height: 22px; margin: 12px 0; text-align: center;">
                <a style="display: inline-block;" href="https://{{ reseller.custom_attributes['vendor_ccp'] }}/client/analytics/overview?filter[details]=daily&filter[billing-period]=previous&account_id={{account.id}}&filter[subscription_id]={{subscription.id}}&filter[is_payg]=true&filter[expenses]=actual">
                  <span style="display: inline-block; color: #ffffff; background-color: rgb(22, 155, 213); padding: 12px 60px; border-radius: 5px;"> EXPLORE MORE ANALYTICS </span>
                </a>
              </p>
            </tr>
          </table>
        </td>
  </tr>
</table>


By default, a link to the Analytics section in the Customer Control Panel https://{domain}/client/analytics displays monthly consumption data for all account subscriptions for the last 3 periods.

Other filtering of consumption data is performed using the filter query parameters and the following template:

Query parameter

Required/Optional

Target

Description

filter[details]

Required

Granularity

Possible values:

  • monthly.
  • daily.
filter[billing-period]

Required

Period type

Possible values:

  • For monthly granularity: 3-period, 6-period, 12-period, custom-billing, custom-calendar.
  • For actual daily expenses of a PAYG subscription: current, previous, custom-billing, custom-calendar.
  • For upcoming daily expenses of a PAYG subscription: current, previous, current_and_previous.
filter[period][gteq] and filter[period][lteq]

Optional

Period from and to

Format: YYYY-MM, and for custom-calendar — YYYY-MM-DD.

If the values are not specified or only one parameter and its value are specified, the period is determined automatically by the values of filter[billing-period] and filter[details], as well as the current server time.

filter[subscription_id]

Optional

Subscription

Subscription ID.

If the parameter is missing, the subscription filter is not set.

filter[expenses]

Deprecated

Type of PAYG subscription daily expenses

This parameter is no longer supported.

Previously, it was used to switch between preliminary and final consumption data

For example, daily expenses for a subscription with ID 1234 for the current periodhttps://{domain}/client/analytics?filter[details]=daily&filter[billing-period]=current&filter[subscription_id]=1234

Net cost has been changed

Occurs when the net cost has been changed at the current reseller level (see Viewing the price list).

Leave the Query field empty when creating this event handler.

The platform collects information about net cost changing once per 24 hours at night. Only the plans, for which the net cost has been changed from 00:00:00 to 23:59:59 on the previous day, are included. For example, if the information is collected at 2:00 a.m. on July, 30, only the plans for which the net cost has been changed from 00:00:00 to 23:59:59 on July, 29, are included.

Credit limit for postpaid subscription was changed

Occurs for accounts with postpaid subscriptions that are not deleted in the following cases:

The event occurs for changes via API and the Operator Control Panel.

Credit limit for postpaid subscription is approaching

Occurs when the current debt becomes greater than the defined part (1~99%) of the subscription credit limit, regardless of the subscription status. Requires the proper Query. Occurs only once.

For example, the Credit limit for a postpaid subscription is approaching event will occur when the current debt for a postpaid subscription becomes greater than 70% of the subscription credit limit:

subscription_postpay.credit_limit % 70 < subscription_postpay.current_debt

Closing documents generatedIt is triggered by an API method (see Send notifications on Closing documents). The event is used for sending notifications to accounts of a reseller on closing documents for the selected period. The closing documents are available for downloading via the link in the notification and viewing in the Customer Control Panel (see Managing Closing documents). The Closing documents section of the Customer Control Panel is displayed for an account if the corresponding system settings are applied (see General system settings). Notifications are sent on closing documents in the New status only. After notifications are set, the closing documents get the Sent status.
Joined payment createdOccurs when payments have been joined automatically or manually to the joined payment (see Joining payments for the Prepay model).
Resend the orderOccurs in the specified number of days after the day when the order was created for orders in the Waiting for payment status and payments linked to one order only (the payments are not joined, see Joining payments for the Prepay model).
Resend the joined paymentOccurs in the specified number of days after the day when the joined payment was created. For payments in the Waiting for payment status only.
Spending budget for a period is approaching

If an account set the spending budget notification threshold for a subscription with the Pay as you go billing type, the event occurs when the subscription consumption (the total amount of charges in the Blocked status) for the selected period reached or exceeded the threshold, but remains less than the budget. The query for an event handler is not required.

Spending budget has been reached

If an account set the spending budget for a subscription with the Pay as you go billing type, the event occurs when the subscription consumption (the total amount of charges in the Blocked status) for the selected period reached or exceeded the budget. The query for an event handler is not required.

Unexpected consumption increase detection

Occurs when the consumption change in day-to-day comparison for a subscription with the Pay as you go billing type reaches or exceeds a threshold. If two thresholds are set, the event occurs when the consumption change equals or exceeds both. The thresholds are set in the system settings and applied to all subscriptions (see Monitoring consumption anomalies for PAYG subscriptions in General system settings).

By default, a link to the Analytics section in the Customer Control Panel https://{domain}/client/analytics displays monthly consumption data for all account subscriptions for the last 3 periods.

Other filtering of consumption data is performed using the filter query parameters and the following template:

Query parameter

Required/Optional

Target

Description

filter[details]

Required

Granularity

Possible values:

  • monthly.
  • daily.
filter[billing-period]

Required

Period type

Possible values:

  • For monthly granularity: 3-period, 6-period, 12-period, custom-billing, custom-calendar.
  • For actual daily expenses of a PAYG subscription: current, previous, custom-billing, custom-calendar.
  • For upcoming daily expenses of a PAYG subscription: current, previous, current_and_previous.
filter[period][gteq] and filter[period][lteq]

Optional

Period from and to

Format: YYYY-MM, and for custom-calendar — YYYY-MM-DD.

If the values are not specified or only one parameter and its value are specified, the period is determined automatically by the values of filter[billing-period] and filter[details], as well as the current server time.

filter[subscription_id]

Optional

Subscription

Subscription ID.

If the parameter is missing, the subscription filter is not set.

filter[expenses]

Deprecated

Type of PAYG subscription daily expenses

This parameter is no longer supported.

Previously, it was used to switch between preliminary and final consumption data

For example, daily expenses for a subscription with ID 1234 for the current periodhttps://{domain}/client/analytics?filter[details]=daily&filter[billing-period]=current&filter[subscription_id]=1234

Paid amount has been received from external system
Occurs when an API method is called to complete a payment by its document_id number (see Complete payment by document ID) if the conditions specified in the Query field are met. In particular, by comparing the paid amount and the payment amount in the platform, the previous and current payment statuses in the platform, you can set up notifications for managers about overpayment, partial or repeat payment because, in these cases, a correction is created and must be manually confirmed.
Request to reset the password after the user creationOccurs 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).
Update CSP net costsOccurs daily for all the subscriptions. Requires the configuration of the Query field.
Upload CSP net costsOccurs when:
Request for creating bill was sentOccurs if the manual operation for receipt generating was created.
Bill on balance replenishment is readyOccurs if the receipt for balance top-up was created manually.
The accounting period was closedOccurs when 1C sends a request to ActivePlatform to reconcile the account balance in 1C and ActivePlatform to close the accounting period.
Create instanceOccurs when a new CloudServer server is created (see Создание Сервера).
Reset instance passwordWhen a password for a CloudServer server is reset. Password reset is possible only using the user interface of the CloudServer control panel.
Data processing for Azure Plan subscriptions completedOccurs for the Microsoft CSP Products plugin on the level of the reseller with the Office365 plugin integration settings and application template. Occurs after processing the detailed resource consumption data for all Microsoft Azure Plan subscriptions of a reseller in two days after closing the invoices. The Query for an event handler should not be specified. As the recipient, only an existing email of a manager can be specified without any placeholders. See also Configuring notifications for the Microsoft Azure Plan service.
AppSource Activation Link GeneratedA new subscription to the Microsoft AppSource service gets the Installing status and is waiting for activation on the vendor side. To activate it, a customer needs to follow a link from a notification (see Microsoft AppSource. Operator Guide).

Microsoft pending PO document

Occurs when an order on the Microsoft side for a subscription based the Microsoft CSP Products plugin gets the Pending PO Upload status. The account manager who received a notification needs to upload a Purchase Order to Microsoft Partner Center and provide additional information about the deal. The order in the platform remains in the Provisioning status. See an example in Ordering a subscription to the Microsoft NCE service via the Operator Control Panel in ActivePlatform. Services. Operator documentation.

Microsoft rejected PO document

Occurs when an order on the Microsoft side for a subscription based the Microsoft CSP Products plugin gets the PO Upload Rejected status. It means that Microsoft did not approve the order. The order in the platform remains in the Provisioning status. See an example in Ordering a subscription to the Microsoft NCE service via the Operator Control Panel in ActivePlatform. Services. Operator documentation.

VSP resources changed

Occurs when a subscription to a plan based on the Vendor Service Plugin (VSP) a changes its status from Updating to Active, after the quantity of subscription resources was changed.

VSP subscription createdOccurs when a subscription to a plan based on the Vendor Service Plugin (VSP) changes its status from Installing to Active.