# Email Templates

The app will send out emails whenever there are new registrations or status changed etc

These emails can be customize using the template editor and different data are available for different templates

The data in the template is dynamic so it will have to be in the following form

```
{{ data }}
```

### Emails after form submission

Usually one email is sent to customer for confirmation and another is sent to admin for notification when a form is submitted

The ***\[registered-products]*** inside these email will be replaced by the actual registered products or form content

Here are extra data available for the email template

```
Timestamp when form submitted: {{ now }}
customer first name: {{ customer.firstName }}
customer surname: {{ customer.surname }}
customer email: {{ customer.email }}
customer address 1: {{ customer.address1 }}
customer address 2: {{ customer.address2 }}
customer city: {{ customer.city }}
customer state: {{ customer.state }}
customer country: {{ customer.country }}
customer post code: {{ customer.postCode }}
customer phone: {{ customer.phone }}
ids of the registration: {{ ids }}
```

Note:  {{ ids }} will output all the ids if the form is able to add multiple products, if it's a one-page form, then it will simply output the id of the entry

### Emails for status change

By default when a status change it will not send out any email **unless there are contents inside status's email template**

The follow data are available for the email template&#x20;

#### Status related

```
Note: {{ note }}
Status: {{ status }}
```

#### Generic data that related to the registration for the status change

```
Customer name: {{ reg.customerName }}
Customer email: {{ reg.customerEmail }}
Product id: {{ reg.productId }}
Product name: {{ reg.productName }}
Purchase date: {{ reg.purchaseDate }}
Serial Numbers: {{ reg.serialNumbers }}
Source : {{ reg.source }}
Order id: {{ reg.orderId }}
Order number: {{ reg.orderNumber }}
Warranty: {{ reg.warranty }}
Warranty start date: {{ reg.warrantyStartDate }}
Warranty end date: {{ reg.warrantyEndDate }}
Last service date: {{ reg.lastServiceDate }}
Created at: {{ reg.createdAt }}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.productcares.com/admin/email-templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
