Table of Contents
Action Rules are used to define and alter the behaviour of Pilvi™ Platform.
Action Rules allow you to define Actions that will be performed when certain conditions are met.
Action Rules are Site specific Rules that a Site Admin can set.
Action Rules cannot alter critical system processes, such as Service life times.
Example use cases for Action Rules:
- Sending email to Customers when some event occurs
- Sending a message to some 3rd party service when some event occurs
Pilvi Platform provides a set of default Action Rules that give you fully working message workflow for your Customer. You can of course alter it as you see fit.
Default Action Rule Preset
| Action Rule name | Description |
|---|---|
| Send email "Customer order confirmation" | Send Order confirmation message for new Orders. |
| Send email "Service canceled" | Notify the Customer when a Service is canceled. |
| Send email "Services expiring soon" | Notify the Customer of expiring Services 10 days before expiration. |
| Send email "Service expired because no payment" | Notify the Customer when a Service is expired, because no payment was received. |
| Send email "Service expired because canceled" | Notify the Customer when a Service is expired, as was requested by the Customer. |
| Send email "Invoice payment successful" | Notify the Customer when the Service has been paid with saved recurring payment method in off-session. |
| Send email "Invoice payment failed" | Notify the Customer when the payment couldn't be completed. |
| Send email "Invoice created" | Notify the Customer when an Invoice is created |
| Send email "Invoice reminder" | Notify the Customer when the Invoice is unpaid and the Invoice due date is approaching |
| Send email "Invoice overdue" | Notify the Customer when the Invoice is overdue |
Conditions
Primary conditions
| Name | Triggers | Additional parameters |
|---|---|---|
| LOGIN_FROM_NEW_IP | Immediately | |
| USER_CREATED | Immediately | |
| ORDER_CREATED | Immediately | |
| ORDER_ACTIVATED | Immediately | |
| PROFILE_SCHEDULED | Scheduled | Day of Month |
| SERVICE_EXPIRED | Immediately | |
| SERVICE_CANCELED | Immediately | |
| SERVICE_CREATED | Immediately | |
| SERVICE_ACTIVATED | Immediately | |
| SERVICE_DISCONTINUED | Immediately | |
| SERVICE_EXPIRES_IN | Scheduled (once a day) | NUMBER |
| SERVICE_HAS_BEEN_EXPIRED_FOR | Scheduled (once a day) | NUMBER |
| X_TIME_UNITS_FROM_SERVICE_CREATION | Scheduled | NUMBER |
| X_TIME_UNITS_FROM_SERVICE_TRIAL_END | Scheduled | |
| X_TIME_UNITS_FROM_SERVICE_TRIAL_START | Scheduled | NUMBER |
| X_TIME_UNITS_TILL_SERVICE_TRIAL_END | Scheduled | NUMBER |
| X_TIME_UNITS_SINCE_USERS_LAST_LOGIN_TO_PILVI_PLATFORM | Scheduled | NUMBER |
| INVOICE_RECURRING_PAYMENT_SUCCESS | Immediately | |
| INVOICE_RECURRING_PAYMENT_FAILURE | Immediately | |
| INVOICE_CREATED | Immediately | |
| INVOICE_DUE_IN | Scheduled | NUMBER |
| INVOICE_DUE_FOR | Scheduled | NUMBER |
Secondary conditions
May only be used with Primary conditions
| Name | Additional options |
|---|---|
| SERVICE_IS_CANCELED | |
| SERVICE_IS_NOT_CANCELED | |
| RECURRING_PAYMENT_INFORMATION_IS_FILLED | |
| RECURRING_PAYMENT_INFORMATION_IS_NOT_FILLED | |
| INVOICE_SUM_TOTAL_IS_NOT_ZERO | |
| INVOICE_SUM_OPEN_IS_NOT_ZERO | |
| INVOICE_DELIVERY_METHOD_IS_NONE | |
| INVOICE_DELIVERY_METHOD_IS_NOT_NONE | |
| INVOICE_DELIVERY_METHOD_IS_EXTERNAL_MAIL | |
| INVOICE_DELIVERY_METHOD_IS_NOT_EXTERNAL_MAIL | |
| INVOICE_DELIVERY_METHOD_IS_EXTERNAL_EMAIL | |
| INVOICE_DELIVERY_METHOD_IS_NOT_EXTERNAL_EMAIL | |
| INVOICE_DELIVERY_METHOD_IS_EXTERNAL_EINVOICE | |
| INVOICE_DELIVERY_METHOD_IS_NOT_EXTERNAL_EINVOICE | |
| SERVICE_PRODUCT_FIELD_NO | |
| ORDER_PRODUCT_FIELD_NO | |
| PROFILE_SERVICE_PRODUCT_FIELD_NO | |
| INVOICE_ITEM_SERVICE_PRODUCT_FIELD_NO |
Functions
| Name | Additional parameters | Required contexts |
|---|---|---|
| SEND_EMAIL_TO_ADDRESS | None | |
| SEND_EMAIL_TO_USER | User |
|
| SEND_EMAIL_TO_PROFILE_ADMINS | Profile or Service |
|
| SEND_WEBHOOK_CALL | ENDPOINT | None |