Skip to end of banner
Go to start of banner

Birthday notification

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

Summary

This notification task sends an email to all active employees with congratulations on their Birthday.

Keywords

Birthday

Description

This notification task sends an email to all active employees with congratulations on their Birthday.

Sample setup

SQL Statement

SELECT 
	p01.PIN #Pin,
	p01.firstname #Firstname,
	p01.lastname #Lastname,
	email.TELENO as #Email
FROM pw001p01 p01
	LEFT JOIN PW001P0T email
ON email.PIN = p01.PIN 
	AND email.TELETYPE = 6 
	AND email.TELEPRIORITY IS NOT NULL 
	AND NOT EXISTS (
					SELECT 1
						FROM PW001P0T t
					WHERE t.PIN = email.PIN
							AND t.TELETYPE = email.TELETYPE
							AND t.TELEPRIORITY IS NOT NULL
							AND (
								t.TELEPRIORITY < email.TELEPRIORITY
								OR t.TELEPRIORITY = email.TELEPRIORITY
								AND t.SEQUENCENO < email.SEQUENCENO
								)
					)
WHERE
DATEPART(dd, p01.BIRTHDATE) = DATEPART(dd, GETDATE()) AND DATEPART(mm, p01.BIRTHDATE) = DATEPART(mm, GETDATE())
AND NULLIF(email.TELENO, '') IS NOT NULL
AND (p01.Employmentenddate='' or p01.Employmentenddate is NULL)

Sample Email

Hi [#Firstname],

Happy Birthday!

Wishing you a memorable day and that your life is filled with love, harmony and good health during the coming year. Enjoy the adventure and stay amazing!

Yours sincerely

 

 

  • No labels