How to Configure Email Notifications
This page explains how to set up email notifications in xAssets. Email notifications are implemented as transformations that send emails based on data conditions, and they can be triggered manually, on a schedule, or automatically when records change.
Prerequisites
- You must have Configuration-level access or transformation editing permissions.
- The xAssets server must be configured with SMTP settings for outgoing email.
- Users who will receive notifications must have a valid email address on their Custodian record.
Step 1: Verify SMTP Settings
Before creating email notifications, confirm that the server can send email:
- Navigate to Admin > Settings.
- Check the email-related settings:
- SMTPSERVER -- the SMTP server hostname or IP address.
- SMTPPORT -- the SMTP port (typically 25 or 587).
- SMTPFROM -- the "From" email address for outgoing messages.
- SMTPUSER and SMTPPASSWORD -- SMTP authentication credentials if required.
- If these settings are not configured, set them before proceeding.
Step 2: Create a Notification Transformation
Email notifications are built as transformations. The transformation selects the data that triggers the notification and sends an email to the appropriate recipients.
- Navigate to Admin > Transformations.
- Click New to create a new transformation, or clone an existing notification transformation.
- Name the transformation descriptively (e.g., "Warranty Expiry Notification").
Step 3: Configure the Data Source
The data source selects the records that should trigger a notification.
- Open the Data Source tab.
- Choose a source type:
- SQL Select Statement -- write a SQL query that returns the records and recipient email addresses. For example, select assets where the warranty expires within 30 days.
- Query -- use an existing xAssets query as the data source.
- AMSX Script -- use an AMSX script for complex logic that determines when and to whom notifications should be sent.
- Ensure the data source returns the email addresses of the intended recipients.
Step 4: Configure the Email Destination
- Open the Data Destination tab.
- Set the destination type to Email or configure the AMSX script to send emails using the
SendMailcommand. - Configure the email template:
- To -- the recipient email address field from the data source.
- Subject -- the email subject line. You can include data field placeholders.
- Body -- the email body text or HTML. Use field placeholders to personalise the content per recipient.
Step 5: Test the Notification
- Save the transformation.
- Run it manually from the Transformation Editor.
- Check that the email was received by the intended recipients.
- Review the batch job status at Admin > Batch > Batch Jobs for any errors.
- Verify the email content, formatting, and personalisation are correct.
Step 6: Schedule the Notification (Optional)
For recurring notifications:
- Open the Schedule tab in the Transformation Editor.
- Enable the schedule and set the frequency (Daily, Weekly, or Monthly).
- Set the time of day and day of week/month as appropriate.
- Save. See How to Set Up a Scheduled Batch Job for details.
Step 7: Create a Menu Item (Optional)
If users should be able to send the notification on demand:
- Open the Menus tab in the Transformation Editor.
- Create a menu item that runs this transformation.
- Configure user group menu access to control who can trigger the notification.
Common Notification Scenarios
| Notification | Data Source | Schedule |
|---|---|---|
| Warranty expiry warning | Assets where warranty expires within 30 days | Weekly |
| Contract renewal reminder | Contracts where renewal date is within 60 days | Monthly |
| Asset assignment notification | Triggered when asset custodian changes | On record save (trigger) |
| Compliance exception alert | Assets failing compliance checks | Daily |
| Overdue task notification | Tasks past their due date | Daily |
Tips
- Test notifications with a small dataset and your own email address before deploying to all users.
- Use email merge features to send personalised content to each recipient rather than one email to all.
- For notifications triggered by record changes (rather than scheduled), configure the transformation as a database trigger.
- Ensure all target users have valid email addresses on their Custodian records, or the notification will silently skip them.
Related Articles
- Transformations Overview — how transformations work
- Creating a Transformation — creating new transformations
- Scheduled Transformations — scheduling recurring tasks
- Settings — SMTP and other system settings