Description

This package contains an Email template called “Reagent expiration warning email” which sends emails regularly according to the Scheduled Job “Automatic email for expiring reagents.” The scheduled job is built with a CRON expression. In this example, the email is sent once a week on Mondays at 8 am to all of the defined users’ email addresses when reagent(s) are about to expire within the configured period of time (in the next 7 days), or have already become expired in SLIMS. The “Reagent” content type and the “Expiry date” custom field are provided along with this email example.

How to use the package

The template can be used in SLIMS to send emails according to the CRON expression containing a list of reagents (or other contents) which are about to expire in a defined period of time, or that already expired, to a list of email addresses defined by a list of Roles and/or Users.

If no reagent(s) are about to expire in the specified period of time or have expired, no email will be sent.

Pre-requisite

  • A working “Email templates SMTP URI” should be set in the Lab Settings module.
  • The Expiration date field of the Content Type that should be reported with the email should be set (the corresponding “Expiry date” custom field is provided in this package).
  • SLIMS GATE must be running.
  • The “Automatic email for expiring reagents” scheduled job should be activated.
  • The users that should receive an email need to have their email address configured in the Users module (E-mail field) so SLIMS knows where to send the email.

Configuration

The first section of the email template can be configured to the customer’s specific needs:

  • The list of Content Types for which the expiry date should be verified (both variables will be combined to get all the content types that SLIMS will consider when reporting the expirations):
    • setContentCategoriesNames: List of categories (i.e. all content types of this category will be considered)
    • setContentTypesNames: List of content types (i.e. any specific content types outside of the above category/s that should be included)
  • The list of Roles and/or the list of Users that should receive the email (both will be combined to get a list of users to sent the email to):
    • setRolesNames: List of roles (i.e. all the users with this role will receive the email)
    • setUsersNames: List of users (i.e. all the individual users which will receive the email)
  • The list of content statuses that should not trigger an email:
    • setStatusesToIngoreNames: List of additional content statuses that should not trigger an email. Any statuses which are defined as “Content is removed” already do not trigger an email.
  • The number of days from the current day until expiration:
    • numberOfDaysUntilExpiration
  • The email address from which the emails will be sent:
    • sender

Where to Look Next

These references have further information on how to configure or use the package contents after the initial installation and integration.

SLIMS Administration Manual:

  • Miscellaneous > Lab setting > SLIMS
  • Miscellaneous > Notification Setup > Email Templates Module
  • Miscellaneous > Notification Setup > Scheduled Jobs Module