Email Template Examples
The following sections provide information on the email templates that can be adapted for use.
Sample Template
The sample template provides you with the basic contents of an email template. Use the information in the folders as follows:
- Example Folder
The example folder contains a plain, simple formatted email. Do NOT use the template.html file. An email can only be sent if there is an API call for a unique email_template_id, which is not included in this template.html file. Below is an email example of this template.html file:
- Password_Reset Folder
The template in this folder enables you to respond to a Password Reset request (as shown below). When modifying this template, you can create a separate text file for your email's subject line. You no longer have to add the subject line to web or mobile app as an API parameter.
You can you add appropriate values in each of the double brackets “[[ ]]”. Fields that can be added include:
- [[logo_image]]
- [[user_name]]
- [[user_password_reset_token]]
- [[ios_app_link_image]]
- [[android_app_link_image]]
- Resource_Share Folder
The template in this folder enables you to send out a shared link.
You can you add appropriate values in each of the double brackets “[[ ]]”. Fields that can be added include:
- [[logo_image]]
- [[share_target_user_name]]
- [[share_owner_user_name]]
- [[share_operation]]
- [[share_resource_name]]
- [[share_resource_id]]
- [[ios_app_link_image]]
- [[android_app_link_image]]
- Signup_Confirmation Folder
The template in this folder enables you to send a Sign-up Confirmation link. When modifying this template, you can create a separate text file for your email's subject line. You no longer have to add the subject line to web or mobile app as an API parameter.
You can you add appropriate values in each of the double brackets “[[ ]]”. Fields that can be added include:
- [[logo_image]]
- [[user_name]]
- [[user_confirmation_token]]
- [[ios_app_link_image]]
- [[android_app_link_image]]
- Trigger_App Folder
The trigger app email sample is used when you want the app to send an email when a specific datapoint property value becomes TRUE. The template contains this layout, which can be modified, as needed:
In the template.html file, locate this tag: [[trigger_app_email_body]]. Create the following fields to be included in the POST to the Ayla Device Service (ADS):
- email_template_id - unique ID of the template assigned to the email template when it was created.
- email_subject - custom email subject line.
- email_body_html - HTML coding with tags specific to this trigger app.
These fields are designed to help you customize your trigger app email for the device and device property that will trigger this email.
As with the other email templates, you can you add appropriate values in each of the double brackets “[[ ]]”. Fields that can be added include:
- [[logo_image]]
- [[trigger_app_email_body]]
- [[ios_app_link_image]]
- [[android_app_link_image]]
User Sign-Up Example
To use a custom template for user sign-ups, the Ayla user service POST URL should include:
- email_template_id (required) - the unique ID of the template assigned to the email template when it was created.
- email_subject (optional) - the custom email subject line.
- email_body_html (optional) - the HTML coding with tags specific to this resend request app.
NOTE |
For more information, refer to the Sign-Up API in the Ayla Service API Specification Guide (AY006USA3) on Ayla Connections, and the curl JSON example for this API in the Ayla API Browser on Ayla's Developer Portal. |
User Resend Sign-Up Confirmation Email Example
To use a custom template to resend the sign-up confirmation, the Ayla user service POST URL should include:
- email_template_id (required) - the unique ID of the template assigned to the email template when it was created.
- email_subject (optional) - the custom email subject line.
- email_body_html (optional) - HTML coding with tags specific to this resend request app.
NOTE |
For more information, refer to the Resend Confirmation Token API in the Ayla Service API Specification Guide (AY006USA3) on Ayla Connections, and the JSON example for this API in the Ayla API Browser on Ayla's Developer Portal. |
User Password Reset Email Example
To use a custom template for user password resets, the Ayla user service POST URL should include:
- email_template_id (required) - unique ID of the template assigned to the email template when it was created.
- email_subject (optional) - custom email subject line.
- email_body_html (optional) - HTML coding with tags specific to this resend request app.
NOTE |
For more information, refer to the Reset Password Instructions in the Ayla Service API Specification Guide (AY006USA3) on Ayla Connections, and the JSON example for this API in the Ayla API Browser on Ayla's Developer Portal. |
Please click here to let us know how we're doing. Thank you.