If you want to add additional variables into the notification template, proceed as follows:

The WHMCS params array and the product type (addon or product) is passed as an argument. Based on the content of these arguments, you can fetch values from the database, or build any template variable.

Example

return array ('additionalParam1' => 'value123', 'nameAsYouWant' => '123value');

In your notification template, you can insert "$nameAsYouWant" and it will send the notification with the value "123value".