Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/27/2022 08:44 AM
Hi Team,
Is there an easier way to analyse if an email template is used in analytics, global configurations, workflows, endpoint email templates, rules or any other places email templates can be assigned?
I'm just looking to clean up the unused templates as an house keeping activity.
Appreciate the insights!
-Siva
06/27/2022 12:34 PM - edited 06/27/2022 01:07 PM
This is very tough as below can be location where email templates can be configured
Other than workflow you can write SQL query n find out
select 'Analytics' module,EMAILTEMPLATE from analyticsconfig where length(EMAILTEMPLATE) > 0 union
select 'ESAnalytics' module,EMAILTEMPLATE from analyticsconfiges where length(EMAILTEMPLATE) > 0 union
select 'emailhistory' module,EMAILTEMPLATE from emailhistory where length(EMAILTEMPLATE) > 0 union
select 'emailhistoryprocess' module,EMAILTEMPLATE from emailhistoryprocess where length(EMAILTEMPLATE) > 0 union
select concat('GlobalConfig-',name) as module, CONFIGDATA as EMAILTEMPLATE from configuration where description like '%email template%' and length(CONFIGDATA) > 1 union
select concat('Rule-ID-',hanarule) as module ,objectvalue as EMAILTEMPLATE from hanaruleattribute where objectname=4 and conditionoraction='ACTN' union
select concat('Endpoint-',endpointname)as module,substring_index(substring_index(TASKEMAILTEMPLATES,'emailTemplate":"',-1),'"',1) as EMAILTEMPLATE from endpoints where length(TASKEMAILTEMPLATES) > 1