Placeholders for the Subscription entity

The following placeholders are used for the Subscription entity.

PlaceholderDescription
subscription.idThe subscription ID

subscription.name

The subscription name
subscription.statusThe subscription status
subscription.start_dateThe activation date of a subscription
subscription.expiration_dateThe expiration date of a subscription
subscription.auto_renewalBoolean; the Auto-renew option of a subscription is activated (see Auto-renewing a subscription)
subscription.auto_renewal_disabledBoolean; the Disable the Auto-renew option option of a subscription is activated
subscription.plan_auto_renewal_disabledBoolean; the Disable the Auto-renew option option of the linked plan is activated
subscription.days_left

The number of days until the expiration date of a subscription

subscription.days_passed

The number of days passed since the expiration date of a subscription

subscription.trialBoolean; a subscription is trial
subscription.accountThe name of an account ordered a subscription
subscription.plan_classThe name of the linked service term (see Managing service terms)
subscription.plan

General information about the linked plan: ID, name, description, status, service term ID (data will be separated by ";")

subscription.plan_period

General information about the linked plan period: duration, trial, setup fee, recurring fee/month, transfer fee, renewal fee, etc. (data will be separated by ";")

subscription.resourcesDetailed information about every resource of a subscription. See Placeholders for the Subscription Resource entity
subscription.billing_typeThe billing type of a subscription
subscription.billing_dayThe day of the month set as the billing day for a subscription
subscription.billing_day_dateThe date of the nearest billing day of a subscription (dd/mm/yyyy)
subscription.billing_day_chargeThe total amount of charges in the Open status that will be closed or blocked on the billing day caused the notification event to occur. Only subscriptions with Auto-renew point (days) = 0 are counted. Applied to monthly billing types
subscription.payment_model

The payment model: prepay or postpay.

To display information about a subscription with the specified payment model:

  • If subscription.payment_model == 'postpay', displays information about a postpaid subscription only.
  • If subscription.payment_model == 'prepay', displays information about a prepaid subscription only.
'notification_settings'For subscription to Microsoft services, see an example in 'first_subscription'
subscription.renew_payment_amountThe numeric amount of funds required to renew a subscription
subscription.renew_payment_amount_currencyThe amount of funds with the currency units required to renew a subscription
subscription.renewal_amountThe amount of funds in the reseller currency required to renew a Subscription. The placeholder can be used to display the amount with the reseller currency units {{ subscription.renewal_amount | format_as_currency }}
subscription.renewal_amount_in_original_currencyThe amount of funds in the plan currency with the plan currency units required to renew a subscription. Does not require specifying format_as_currency
subscription.renewal_payment.receipt_url

A link to download the receipt. This link is used in a notification about the expiration of a subscription

'first_subscription'

A placeholder for an email template to determine whether it is the first subscription to Microsoft services for an account. If a Microsoft subscription is the first one, all necessary data can be sent to a customer, for example, the login and password of the created Microsoft account. Otherwise, any alternative information can be sent using the {% else %} instruction (see possible examples below). Subscriptions based on the Office365 and MicrosoftCspProducts plugins are counted for an account together.

A fragment of the notification template for a subscription based on the Office365 plugin:

<strong>Login</strong>: {{subscription['notification_settings']['office365']['login']}}<br/>
{% if subscription['notification_settings']['office365']['first_subscription'] %}
<strong>Password</strong>: {{subscription['notification_settings']['office365']['password']}}
{% else %}
<strong>Password</strong>: current password for your Microsoft account.
{% endif %}


A fragment of the notification template for a subscription based on the MicrosoftCspProducts plugin:

{% if subscription['notification_settings']['microsoft_csp_products']['first_subscription'] %}
<strong>Your login</strong>: {{subscription['notification_settings']['microsoft_csp_products']['login']}}<br/>
<strong>Temporary password</strong>: {{subscription['notification_settings']['microsoft_csp_products']['password']}}<br/>
{% else %}
Use your current login and password for the Microsoft account.<br/>
{% endif %}

For more information about the notifications configuration for subscriptions to Microsoft services, see Services. Operator Guide.

subscription.cspAn array of the account subscriptions within the Microsoft CSP program
subscriptionsAn array of the account subscriptions
subscriptions[].billing_typeThe billing type of a subscription from an array
subscriptions[].billing_dayThe day of the month set as the billing day for a subscription from an array
subscriptions[].billing_day_dateThe date of the nearest billing day of a subscription from an array (dd/mm/yyyy)
subscriptions[].billing_day_chargeThe total amount of charges in the Open status that will be closed or blocked on the billing day caused the notification event to occur. Only subscriptions from an array with Auto-renew point (days) = 0 are counted. Applied to monthly billing types
subscriptions[].payment_model

An array of the account subscriptions with the specified payment model:

  • If subscriptions[].payment_model = "postpay", the array includes postpaid subscriptions only.
  • If subscriptions[].payment_model = "prepay", the array includes prepaid subscriptions only.

subscription_postpay.credit_limit

subscription.credit_limit

The value of the subscription debt above which the postpaid subscription will be blocked

subscription_postpay.current_debt

subscription.current_debt

The current consumption for a subscription as the total amount of all blocked charges of a subscription for the current billing period
subscription.responsible_managers_by_product_id[PRODUCT_ID]['KEY_MANAGER_ROLE']['email']}The email of a responsible manager (см. Managing responsible managers) by the product ID and manager role key
subscription.responsible_managers_by_product_id[PRODUCT_ID]['KEY_MANAGER_ROLE']['name']The name of a responsible manager (см. Managing responsible managers) by the product ID and manager role key
subscription['resources'][RESOURCE_PRIORITY].included

The quantity of a resource with the RESOURCE_PRIORITY priority included in a subscription (for more information about the resource priority, see Plan Resources)

The quantity of the main resource of a subscription:

subscription['resources'][0].included | plus: subscription['resources'][0].additional

Inserting detailed information about every resource of a subscription: see Placeholders for the Subscription Resource entity

subscription['resources'][RESOURCE_PRIORITY].additional

The additional quantity of a resource with the RESOURCE_PRIORITY priority ordered for a subscription (for more information about the resource priority, see Plan Resources)

The quantity of the main resource of a subscription:

subscription['resources'][0].included | plus: subscription['resources'][0].additional

Inserting detailed information about every resource of a subscription: see Placeholders for the Subscription Resource entity

subscription.application_attributes.'plugin_slug'.'attribute_key'

The placeholder returns the value of an additional attribute by the given key (see Viewing details about an application instance) for a subscription based on the plugin defined by plugin_slug:

plugin_slugPlugin name
office365Office365
microsoft_csp_productsMicrosoftCspProducts
vendor_serviceVendor Service Plugin (VSP)
manual_provisioningManual Provisioning

PlaceholderDescription
subscription.application_attributes.office365.user_manualSubscription activation instruction

subscription.application_attributes.vendor_service.user_manual
subscription.application_attributes.microsoft_csp_products.user_manual
subscription.application_attributes.vendor_service.external_idSubscription External ID
subscription.last_billing_period_closed_charges_amountThe amount of charges in the Closed status for a subscription for the previous billing period. The amount is equal to the amount of charges for this subscription in an invoice for the previous billing period
subscription.budget_amount_with_currencyThe spending budget for a subscription, including the reseller currency sign (event handlers Spending budget for a period is approaching and Spending budget has been reached)
subscription.recipients.emailsThe recipients of a notification about the subscription consumption, regarding the spending budget and notification threshold (event handlers Spending budget for a period is approaching and Spending budget has been reached)


The following placeholders are available for subscriptions to the plans received from Vendor Portal (Event handlers VSP subscription created and VSP resources changed):

PlaceholderDescription
application.subscription_attribute_{attribute_key}

Returns the value of an additional attribute with the Subscription attribute type and {attribute_key} key, where {attribute_key} is the attribute key set in Vendor Portal.

For example, application.subscription_attribute_first_password is a placeholder for an additional attribute with the Subscription attribute type and first_password key.

application.distributor_attribute_{attribute_key}

Returns the value of an additional attribute with the Distributor attribute type and {attribute_key} key, where {attribute_key} is the attribute key set in Vendor Portal.

For example, application.distributor_attribute_base_url is a placeholder for an additional attribute with the Distributor attribute type and base_url key.