> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer Notifications and Email Templates

Subscribe can automatically issue customer notifications at predefined moments in the billing cycle, using customized templates. Templates can be defined to notify merchants' customers of billing events (imminent, in-process, successful, or failed), to submit invoices, to warn of a pending subscription expiration, to inform of an overdue balance, or to simply keep them informed of changes in their subscription plan. For more details, see [Customer Notifications chapter in the Programming Guide](https://docs.vindicia.com/bundle/SOAP-Programming-guide/page/topics/ProgGuide_CustomerNotifications.html).

For how to instructions of the email templates, see t[he Email Templates section of the How to guide](https://docs.vindicia.com/bundle/howTo/page/topics/r_usingSubscribeEmailTemplates.html)

Subscribe allows merchants to optionally send email notifications to customers prior to an upcoming automatic re-billing. Merchants configure how many days prior to the billing day these notifications should be sent by specifying the **prenotifyDays** attribute in SOAP or the **billing\_notification\_days** attribute in REST on the billing plans object they create.

Thus until CashBox release 3.6.0, merchants could choose variable pre-notification periods based on billing plans only. Although most merchants who offer shorter (monthly, quarterly) billing cycles do not pre-notify their customers, merchants whose billing cycles are annual or longer are typically required by law to pre-notify their customers prior to upcoming billing.

Some US states have also mandated that these pre-notifications be sent to customers at least a specific number of days ahead of the billing day. For example, the US state of Illinois requires that merchants pre-notify their customers at least 30 days prior to the billing day.

To support such variable pre-billing notification requirements across various geographical regions Vindicia supports a feature whereby merchants can override the number of pre-notification days configured on a billing plan by individual customer address. For more details, see [Specify Pre-Billing Notification Period Based on Customer Address in how-to guide](https://docs.vindicia.com/bundle/howTo/page/topics/r_specifyPreBillingNotificationPeriod.html).

This feature requires a special merchant configuration called CASHBOX\_PRENOTIFY\_ADDRESS (see table below), set to a value to either shipping or billing based on which address the merchant wants this override to work against. Add name value pairs to indicate which country and/or state Subscribe should override the pre-notification days configured on the billing plan and instead use the days as specified in the value of the pair.

For example: If for the state (Address.district) of Illinois (IL) in the (Address.country) US, the pre-notification should be sent 30 days prior to billing, then the name-value pair should be: CashBox:prenotifyDays:US:IL = 30

If for the entire country of France (FR) the pre-notification should be sent 45 days prior to billing, then the name-value pair should be: CashBox:prenotifyDays:FR = 45

If for the state (Address.district) of New Mexico (NM) in the (Address.country) US, the pre-notification should be sent 35 days prior to billing, then the name-value pair should be:CashBox:prenotifyDays:US:NM = 35

**Note:** the shipping address used here should be configured on the Account object.

The billing address considered here comes from the PaymentMethod object associated with the AutoBill.

| Field | Required/Optional | Description | Valid values |
| - | - | - | - |
| cashbox\_prenotify\_days | | The number of days before billing that the email notification will be sent to the customer. This value is used only when the Billing Plan does not specify the number. This is valid for both PUSH messages and emails | null (default) or number |
| cashbox\_prenotify\_address | Optional | The type of address to be used in conjunction with the name value pairs, to enable a specific setting of pre-notification days based on the customer address . THIS is relevant only for mail notifications \<Currently not in use> | shipping,billing |
| email\_on\_soft\_err\_init\_attempt | Optional | Defines whether Subscribe will issue an email notification to the customer for the first Soft Fail of their payment method. **Note:** requires a defined email template | NULL or 0 : No email notifications will be issued for the first Soft Fail. 1: Email notifications will be issued to customers for the first Soft Fail. ; |
| email\_prenotify\_before\_cancel | | This feature acts as a filter. If the merchant is configured to send cancellation emails, then turning this feature on (setting it to 1) will add a filter so that the cancellation email will only be sent if the customer previously received a pre-billing email notification.; **Note:** requires a defined email template | null (default ) , 0 or 1 |
| credit\_card\_expiration\_warning | Optional | How many month ahead of credit card expiration Subscribe will send an email .**Note:** requires a defined email template | number |

## Name-Value Pairs for pre-notification settings:

| **Name** | **Description** | **Valid Value** |
| - | - | - |
| CashBox:prenotifyDays:\<Country>:\<City> | Country - will define the country we want to have a different setting then the billing plan; City - can specify the city that we want to use for for the setting | |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.