Overwrite Suspend/Termination
The extension allows you to set a date for Suspend and Termination the service.
Description
PUQ Customization module WHMCS
Order now | Download | FAQ
Overwrite Suspend/Termination
This is a unique extension that allows overriding the suspension and termination days for services in case of non-payment. The extension extends the automation options for suspending and terminating services in WHMCS global settings. It provides the flexibility to set custom overrides for specific products or product groups, enabling efficient management of client service suspensions and terminations.
Configuration:
- Overwrite type: Specifies whether the overrides apply to individual products or product groups.
- Cron: Determines the cron job to process the tasks, either running on every cron or daily.
- Send Suspension Email: Enables sending suspension notification emails upon successful suspension.
Parameter Rules: To set a parameter, enable the "Overwrite Suspension" and/or "Overwrite Termination" checkbox. The "Overwrite Suspension" parameter cannot exceed the "Suspend Days" value from the global configuration (if enabled). In such cases, the override setting will not take effect due to the global configuration. The "Overwrite Termination" parameter cannot exceed the "Termination Days" value from the global configuration (if enabled). In such cases, the override setting will not take effect due to the global configuration. The "Overwrite Suspension" parameter must always be less than the "Overwrite Termination" parameter (if enabled). The "Overwrite Termination" parameter must always be greater than the "Overwrite Suspension" parameter (if enabled). If the global parameters (Enable Suspension, Suspend Days, Enable Termination, Termination Days) are modified, the parameters (Overwrite Suspension, Suspend Days, Overwrite Termination, Termination Days) will not be adjusted accordingly.
Behavior for Product-Based Processing: If the configuration is set to process overrides based on individual products:
- If a product is moved from one group to another, its override settings will remain unchanged.
Behavior for Group-Based Processing: If the configuration is set to process overrides based on product groups:
- The product's parameters will depend on the group to which it belongs.
Suspension Process:
- Suspend action is triggered.
- If the "Overwrite Suspension" checkbox is enabled for the product or its group.
- The product is an active service for the client.
- The service has an "Active" status.
- The sum of the "Next Due Date" for the service and the "Overwrite Suspension" parameter is less than or equal to the cron execution date.
- The suspend command of the corresponding module is executed. If the module returns a "Suspended" error, the system waits for the next cron execution and repeats the process (the behavior depends on the handling defined in the module).
- If the module is not present on the service, the service's status is changed to "Suspended".
Termination Process:
- Termination action is triggered.
- If the "Overwrite Termination" checkbox is enabled for the product or its group.
- The product is a suspended service for the client.
- The service has a "Suspended" status.
- The sum of the "Next Due Date" for the service and the "Overwrite Termination" parameter is less than or equal to the cron execution date.
- The termination command of the corresponding module is executed. If the module returns a "Terminated" error, the system waits for the next cron execution and repeats the process (the behavior depends on the handling defined in the module).
- If the module is not present on the service, the service's status is changed to "Terminated".
Invoice Handling:
- If an invoice contains only one position that transitions to the "Terminated" status, the invoice is changed to "Cancelled".
- If an invoice contains multiple positions, a new invoice (excluding the ID) is created with the status "Cancelled". The position that transitions to the "Terminated" status is added to the new invoice, while it is removed from the previous invoice.
All configuration and Suspend/Termination actions are logged for diagnostic purposes.
Purpose of this Functionality: Suppose you sell virtual machines, and a client fails to make the payment. On the same day, the extension can suspend the virtual machine service. However, if another client has purchased a more lucrative dedicated server and also missed the payment, you may want to inform them about the overdue invoice instead of immediately suspending their service. Since dedicated server services are more valuable and prestigious, this extension allows you to differentiate the suspension and termination priorities based on the services.
The extension is designed for convenience and better management of service suspensions and terminations, while allowing prioritization and flexibility in handling different types of services.
Configuration
PUQ Customization module WHMCS
Order now | Download | FAQ
Enabled - Enabling or disabling all custom functions of this extension affects the automation and visibility of its features in the client area. When extension disabled, the automation capabilities and related features provided by the extension will not be active or visible to clients. However, as an administrator, you will still have access to configure and utilize the extension's functionalities through the administration interface. This gives you the flexibility to control the visibility and automation aspects of the extension based on your specific needs and preferences.
Overwrite type - This option determines the scope of the override, whether it applies to individual products or product groups. In this case, the configuration is set to "By products," meaning overrides will be applied on a per-product basis.
Cron - This option specifies which cron job will handle the execution of the tasks. The configuration is set to "Each Cron," indicating that the tasks will be processed during each cron run.
Send Suspension Email - When enabled (set to "YES"), this option triggers the sending of a suspension notification email to the client when a service is successfully suspended.
Overwrite
PUQ Customization module WHMCS
Order now | Download | FAQ
Screenshot of Overwrite Suspend/Termination configuration view by product
Screenshot of Overwrite Suspend/Termination Configuration View by Group
On the "Overwrite" page, there will be a list of products or groups to set the "Overwrite Suspension" and "Overwrite Termination" parameters.
Here is a detailed description of the rules for setting these parameters:
-
Overwrite Suspension:
- For a product: If you want to set personalized suspension parameters for a specific product, locate it in the product list on the "Overwrite" page. Check the "Overwrite Suspension" checkbox next to the corresponding product.
- For a group: If you want to apply personalized suspension parameters to all products within a specific group, find the corresponding group in the group list on the "Overwrite" page. Check the "Overwrite Suspension" checkbox next to it.
-
Overwrite Termination:
- For a product: If you want to set personalized termination parameters for a specific product, locate it in the product list on the "Overwrite" page. Check the "Overwrite Termination" checkbox next to the corresponding product.
- For a group: If you want to apply personalized termination parameters to all products within a specific group, find the corresponding group in the group list on the "Overwrite" page. Check the "Overwrite Termination" checkbox next to it.
Setting the parameters involves selecting the appropriate checkbox for each product or group on which you want to apply the overwrite for suspension or termination. You can choose products, groups, or both simultaneously.
It is important to follow these rules:
- The value of the "Overwrite Suspension" parameter should not exceed the value of the "Suspend Days" from the global configuration (if it is active).
- The value of the "Overwrite Termination" parameter should not exceed the value of the "Termination Days" from the global configuration (if it is active).
- The value of the "Overwrite Suspension" parameter should always be less than the value of the "Overwrite Termination" parameter if both parameters are active.
Note that if there are changes in the global parameters (enabling suspension, suspension duration, enabling termination, termination duration), the overwritten parameters (Overwrite Suspension, Suspend Days, Overwrite Termination, Termination Days) will not be automatically adjusted.
In the case of configuration by products, if a product is moved from one group to another, its parameters will not change. If configuration by groups is used, the product's parameters will depend on the group it belongs to.
Safe test
PUQ Customization module WHMCS
Order now | Download | FAQ
The extension also includes a page called "Safe Test." On this page, the services that are queued for suspension and termination, based on the extension's configuration, are displayed. This feature provides a convenient way to perform a safe test and see which services will be suspended or terminated. You have the option to enable or disable the extension and manually initiate the suspension or termination process by clicking the corresponding buttons: "Run the suspend process" and "Run the termination process."
The table on the "Safe Test" page contains the following fields for each service:
- ID: The unique identifier of the service.
- Product Name: The name of the product or service.
- Client: The client associated with the service.
- Billing Cycle: The billing cycle of the service (e.g., monthly, quarterly, annually).
- Amount: The amount due for the service.
- Next Due Date: The date when the next payment is due for the service.
- Status: The current status of the service (active, suspended, terminated).
This page provides an overview of the services that are in the queue for suspension or termination based on the extension's configuration. It allows you to manually trigger the suspension or termination process for testing purposes, ensuring that you can see which services will be affected without actually executing the action.