How Can I Distinguish Between a Work and Home Email in the PERSON_CONTACT_EMAIL_ADDRESS Table?
Question
How can I distinguish between an employee's work and home email addresses in the PERSON_CONTACT_EMAIL_ADDRESS table?
Environment
Connector: Workday HCM
Answer
To determine whether an employee's email address is a work or home email, join the COMMUNICATION_USAGE_DATA table to the PERSON_CONTACT_EMAIL_ADDRESS table. The usage_type column in COMMUNICATION_USAGE_DATA identifies the email as HOME or WORK.
For example:
SELECT cud.person_contact_id, cud.usage_type, pcea.email_address FROM workday_hcm.COMMUNICATION_USAGE_DATA cud JOIN workday_hcm.PERSON_CONTACT_EMAIL_ADDRESS pcea ON cud.person_contact_id = pcea.id;