Inbound Email Actions: Condition to use case identifier
Hello,
For those who're using the CSM, this post is for you.
This week I came across an issue where the system have different notifications according to the type of users: Guest (or non logged user) and Logged Users. For logged users, it's quite easy to get them and filter the type notifications according to their needs. For the Guest user is where the challenge comes in. The question is: if a user is not on a system, how can we track them?
Imagine the following scenario: a "guest" is not able to access the system and he does not have any account in the system. How can we proceed? We two fields: "Guest Contact Name" and "Guest Contact Email" which are populated through a form available in a public UI page.
The most hard notifications are those were classified as Reply email and processed by a "Reply" inbound email action.
Inbound Email Action: "Update Case as Guest"
For the condition, we have created a function in CSEMailUtil where the args are the "Email" and "Sys ID". Using this two arguement we are able to query the glide record case and verify if email is in field Guest Contact Email. If sucess, return true. If fail, return false.
((new CSEMailUtil).getGuestAddressFromEmail (email.from,current.sys_id))
https://www.servicenow.com/community/csm-articles/inbound-email-actions-condition-to-use-case-identifier/ta-p/2299048