Message templates

Messages templates can be defined to be used with Action Rules. Pilvi™ provides a default set of templates for you to get started with, but you can modify the templates to your liking or create new templates.

Variables

A variable is added in double-braces, e.g. {{company.name}}. See list of available variables below.

Note properties[].value needs to be wrapped in triple-braces so the HTML is properly rendered for all Property value types.

Variable availability varies between messsage template types. Available contexts define which variables are available.

Message Template Type Context
USER User
PROFILE User Profile
SERVICES_EXPIRING User Profile
SERVICE User Profile Service
SERVICE_CANCELED User Profile Service
SERVICE_EXPIRED_BECAUSE_UNPAID User Profile Service
SERVICE_EXPIRED_BECAUSE_CANCELED User Profile Service
CUSTOMER_ORDER_CONFIRMATION User Profile Order
SELLER_ORDER_CONFIRMATION User Profile Order
SERVICE_EMAIL_PROVISION Profile Service

All templates

Variable Name Description / Value source
company.name Preference: COMPANY_NAME
company.email Preference: COMPANY_EMAIL
company.address Preference: COMPANY_ADDRESS
company.zipcode Preference: COMPANY_ZIP_CODE
company.city Preference: COMPANY_CITY
company.country Preference: COMPANY_COUNTRY
company.phone Preference: COMPANY_PHONE
company.site.url Preference: COMPANY_SITE_URL
company.logo.url Preference: COMPANY_LOGO_URL
company.vat.id Preference: COMPANY_VAT_ID
message.title Title/Subject of the message template
site.name Site name. My Shop
site.console.url Site Console Root URL. ex. my-shop.saas.pilvi.com/console
site.console.profile.url Site Console Profile Page URL. ex. my-shop.saas.pilvi.com/console/profile
site.console.invoices.url Site Console Invoices Page URL. ex. my-shop.saas.pilvi.com/console/invoices
site.console.services.url Site Console Services Page URL. ex. my-shop.saas.pilvi.com/console/services
site.manager.url Site Manager URL. ex. my-shop.saas.pilvi.com/manager
site.domain Site's domain ex. my-shop.saas.pilvi.com
site.shop.url Site's shop url ex. my-shop.saas.pilvi.com
year Current year

Template specific

Message Template Type Variable Name Description / Value source
SERVICES_EXPIRING numberofdaysbeforeexpire Days before Service Expiration Date (prev. numberofdaysbeforeexpire)
SERVICES_EXPIRING expiringservices List of expiring services. Contains same variables as Service context

User context

Variable Name Description / Value source
user.id User Id
user.email User Email
user.name User Full Name
user.firstname User Firstname
user.lastname User Lastname

Profile context

Variable Name Description / Value source
profile.name Profile Name
profile.id Profile Id
profile.no Profile No
profile.balance Profile Balance
profile.debt Profile Debt
profile.address.delivery.street Profile Delivery Address Street
profile.address.delivery.city Profile Delivery City
profile.address.delivery.zipcode Profile Delivery Zip Code
profile.address.delivery.country Profile Delivery Country
profile.address.invoice.street Profile Invoice Address Street
profile.address.invoice.city Profile Invoice City
profile.address.invoice.zipcode Profile Invoice Zip Code
profile.address.invoice.country Profile Invoice Country
profile.services List of active Services on the Profile. Contains same variables as Service context

Service context

Variable Name Description / Value source
service.name Service Name
service.id Service Id
service.no Service No
service.url Service Page URL
service.expiredate Service Expiration Date
service.properties[].name Service Property Name
service.properties[].label Service Property Label
service.properties[].value Service Property Value
service.product The Product of the Service. Contains same variables as Product context

Order context

Variable Name Description / Value source
order.id Order ID
order.no Order Number
order.created Order creation time, localized
order.total Order Total
order.totalwithvat Order Total With VAT
order.vat.rate Order VAT Rate
order.vat.amount Order VAT Amount
order.paymentmethod Payment method
order.reference Customer reference
order.additionalinfo Order additional info
order.products List of Products in Order. Contains same variables as Product context

Contract context

Variable Name Description / Value source
contract.id Contract ID
contract.no Contract Number
contract.startdate Contract start date
contract.invoicedtill Contract invoiced till date
contract.paidtill Contract paid till date
contract.reference Contract customer referenced
contract.created Contract creation time, localized

Product context

Variable Name Description / Value source Format
product.name Product Name string
product.plan Product Plan string
product.id Product Id number
product.no Product Number number
product.image.url Product Image URL string
product.productgroup.name Product Group Name string
product.properties[].name Product Property Name string
product.properties[].label Product Property Label string
product.properties[].value Product Property Value string
product.billingperiod Product Billing Period 1 month
product.billingprice Product Billing Price (price * billingperiod) 0.00
product.billingpricewithvat Product Billing VAT Price (price * billingperiod) 0.00
product.trialperiod Product Trial Period 1 month
product.price Product Price (price in product price interval) 0.00
product.priceperiod Product Price Period 1 month
product.pricewithvat Product VAT Price 0.00