Verint | Telligent Community
Verint | Telligent Community
  • Site
  • User
  • Site
  • Search
  • User
Marketplace
Marketplace
Listings Unanswered Threads Email Notification
  • Listings
  • More
  • Cancel
  • New
Marketplace requires membership for participation - click to join
Details
  • $attribute.Name Version: 12 , 11.1 , 11
  • $attribute.Name Type: Automation
  • $attribute.Name Price: Free
  • $attribute.Name URL: Free
  • $attribute.Name Author: Verint
  • $attribute.Name Support: Free to use as-is. Additional support can be purchased from the Verint Professional Services team.
You may also like:

Unanswered Threads Email Notification

This automation will send an email to a configured email address or Role with a list of Forum Thread URLs that are unanswered in the Community after x number of hours.

Download for version 11: 

Fullscreen UnansweredThreads-Automation-v11.xml Download
<automations>
	<automations>
		<automation name="Unaswered Threads Notifications" version="11.1.8.16788" description="This sends an email with a list of thread urls that have not been answered after x number of hours." id="f624be8c283d479096e806444e857bb4" executeAsServiceUser="true" isSingleton="false" trigger="Job" schedule="5m" lastModified="2022-01-13 20:50:46Z">
			<executionScript language="JavaScript"><![CDATA[var pageIndex = 0;
var done = false;
var unanswered = [];

var hours = core_v2_widget.GetStringValue('hours', '18');
var subject = core_v2_widget.GetStringValue('subject', core_v2_language.GetResource('Subject_Default'));
var fromEmail = core_v2_widget.GetStringValue('fromEmail', 'notset@local.com');
var toEmails = core_v2_widget.GetStringValue('toEmails', '');
var toRoleIds = core_v2_widget.GetStringValue('toRoleIds', '');
var group = core_v2_widget.GetStringValue('forumGroup', '');

//core_v2_eventLog.Write("UnansweredThread: Group: " + group, { Category: "Unanswered Threads", EventId: 18789, EventType: "Warning" });

if(group.substring(6) !== "1"){
    // Get Threads
    while(!done){
        var threads = core_v2_forumThread.List(
            { 
                ForumThreadQueryType: 'Unanswered',
                IncludeSubGroups: true,
                IncludeDiscussions: false,
                PageIndex: pageIndex, 
                PageSize: 100, 
                SortBy: 'Date', 
                SortOrder: 'Descending',
                GroupId: core_v2_utility.ParseInt(group.substring(6))
            });
          
        for(var t = 0; t < threads.Count; t++){
            var hoursDiff = (Math.round(((new Date()) - threads[t].Date) / (60*60*1000))).toString();
    
            if(hoursDiff > hours){
                unanswered.push(threads[t].Url);
            }
        }
        
//        core_v2_eventLog.Write("UnansweredThread: Threads: " + unanswered.length, { Category: "Unanswered Threads", EventId: 18789, EventType: "Warning" });
        
        
        if(threads.TotalCount <= 100 * (pageIndex + 1)){
            done = true;
        }
          
        pageIndex++;
    }
    
    var hourText = '';
    
    if(hours > 1){
        hourText = core_v2_language.GetResource('Hours_Text');
    }
    else{
        hourText = core_v2_language.GetResource('Hour_Text');
    }
    
    var body = '<b>Unanswered Threads after ' + hourText + '</b><br/>';
    for(var u = 0; u < unanswered.length; u++){
        body += '<a href="' + unanswered[u] + '">' + unanswered[u] + '</a><br/>';
    }
    
//    core_v2_eventLog.Write("UnansweredThread: RoleIds: " + toRoleIds, { Category: "Unanswered Threads", EventId: 18789, EventType: "Warning" });
    
    // Get emails to send to
    var splitEmails = toEmails.split(',');
    var splitRoles = toRoleIds.split('&');
    var allEmails = [];
    
//    core_v2_eventLog.Write("UnansweredThread: SplitRoles Count: " + splitRoles.length, { Category: "Unanswered Threads", EventId: 18789, EventType: "Warning" });
    
    for(var i = 0; i < splitRoles.length; i++){
        var roleUsersDone = false;
        var roleUsersPageIndex = 0;
        var roleIdSub = splitRoles[i].substring(5);
        
        core_v2_eventLog.Write("UnansweredThread: RoleIdSub: " + roleIdSub, { Category: "Unanswered Threads", EventId: 18789, EventType: "Warning" });
        
        var roleId = core_v2_utility.ParseInt(roleIdSub);
        var role = core_v2_role.Get(roleId);
        
        core_v2_eventLog.Write("UnansweredThread: RoleId: " + roleId, { Category: "Unanswered Threads", EventId: 18789, EventType: "Warning" });
        core_v2_eventLog.Write("UnansweredThread: RoleName: " + role.Name, { Category: "Unanswered Threads", EventId: 18789, EventType: "Warning" });
        
        if(role.Name === "Everyone" || role.Name === "Registered Users"){
            core_v2_eventLog.Write("UnansweredThread: This role is not allowed: " + role.Name, { Category: "Unanswered Threads", EventId: 18789, EventType: "Warning" });
        }
        else{
            while(!roleUsersDone){
                var roleUsers = core_v2_user.List(
                    { 
                        PageIndex: roleUsersPageIndex, 
                        PageSize: 100, 
                        RoleId: roleId 
                    }
                ); 
                
                if(roleUsers.Count > 0){
                    for(var r = 0; r < roleUsers.Count; r++){
                        allEmails.push(roleUsers[r].PrivateEmail);
                    }
                }
                
                if(roleUsers.TotalCount <= 100 * (roleUsersPageIndex + 1)){
                    roleUsersDone = true;
                }
                
                roleUsersPageIndex++;
            }   
        }
    }
    
    if(splitEmails.length > 0){
        for(var e = 0; e < splitEmails.length; e++){
            allEmails.push(splitEmails[e]);
        }   
    }
    
    if(allEmails.length > 0 && unanswered.length > 0){
        for(var te = 0; te < allEmails.length; te++){
            core_v2_eventLog.Write("RoleUserEmailSent: " + allEmails[te], { Category: "Unanswered Threads", EventId: 18789, EventType: "Warning" });
            core_v2_email.Send(subject, body, { FromEmail: fromEmail, ToEmail: allEmails[te] });    
        }
    }
}
else{
    core_v2_eventLog.Write("UnansweredThread: Configured Group set to the site root, automation stopping.", { Category: "Unanswered Threads", EventId: 18789, EventType: "Warning" });
}]]></executionScript>
			<configuration><![CDATA[<propertyGroup id="options" labelResourceName="Options">
    <property id="hours" labelResourceName="Hours_Label" descriptionResourceName="Hours_Desc">
        <propertyRule name="minmax" min="0" />
    </property>
    <property id="subject" labelResourceName="Subject_Label" descriptionResourceName="Subject_Desc"></property>
    <property id="fromEmail" labelResourceName="FromEmail_Label" descriptionResourceName="FromEmail_Desc"></property>
    <property id="toEmails" labelResourceName="ToEmail_Label" descriptionResourceName="ToEmail_Desc"></property>
    <property id="toRoleIds" labelResourceName="ToRoles_Label" descriptionResourceName="ToRoles_Desc" dataType="Custom" template="core_v2_roleLookup" enableCurrent="false" maxSelections="10" />
    <property id="forumGroup" labelResourceName="ForumGroup_Label" descriptionResourceName="ForumGroup_Desc" defaultValue="Group=-1" dataType="Custom" template="core_v2_groupLookup" enableCurrent="false" />
</propertyGroup>]]></configuration>
			<languageResources><![CDATA[<language key="en-us">
  <resource name="ForumGroup_Desc">Select a group to restrict the unanswered threads to.</resource>
  <resource name="ForumGroup_Label">Select a Group</resource>
  <resource name="FromEmail_Desc">The default is notset@local.com</resource>
  <resource name="FromEmail_Label">From Email Address</resource>
  <resource name="Hour_Text">Hour</resource>
  <resource name="Hours_Desc">If a thread is unanswered after the defined number of hours an email will be sent.</resource>
  <resource name="Hours_Label">Hours</resource>
  <resource name="Hours_Text">Hours</resource>
  <resource name="Subject_Default">Unanswered Threads</resource>
  <resource name="Subject_Desc">Email subject for the unanswered threads email</resource>
  <resource name="Subject_Label">Email Subject</resource>
  <resource name="ToEmail_Desc">Enter a single email or multiple emails, multiple emails should be comma delimited(test@email.com,test2@email.com)</resource>
  <resource name="ToEmail_Label">To Email</resource>
  <resource name="ToRoles_Desc">Enter a single role or multiple roles, multiple roles should be comma delimited(adminstrators,Users)</resource>
  <resource name="ToRoles_Label">To Roles</resource>
</language>]]></languageResources>
		</automation>
	</automations>
	<configuredAutomations>
		<configuredAutomation version="11.1.8.16788" id="3df8ffefb21f4400ae5c1fd0df971658" automationId="f624be8c283d479096e806444e857bb4" name="Unanswered Threads" description="" enabled="false" lastModified="2022-01-13 20:52:57Z">
			<properties>
				<property id="hours" dataType="String">
					<value>2</value>
				</property>
				<property id="subject" dataType="String">
					<value>Unanswered Questions are Waiting for Your Review</value>
				</property>
				<property id="fromEmail" dataType="String">
					<value />
				</property>
				<property id="toEmails" dataType="String">
					<value />
				</property>
				<property id="toRoleIds" dataType="Custom">
					<value>Role=4&amp;Role=9</value>
				</property>
				<property id="forumGroup" dataType="Custom">
					<value>Group=2</value>
				</property>
			</properties>
		</configuredAutomation>
	</configuredAutomations>
</automations>

Download for version 12: 

Fullscreen UnansweredThreads-Automation.xml Download
<automations>
	<automations>
		<automation name="Unanswered Threads Notifications" version="12.0.2.17146" description="This automation sends an email with a list of Forum Thread URLs that have not been answered after x number of hours." id="f624be8c283d479096e806444e857bb4" executeAsServiceUser="true" isSingleton="false" trigger="Job" schedule="00:01 Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday" lastModified="2021-12-14 19:59:01Z">
			<executionScript language="JavaScript"><![CDATA[var pageIndex = 0;
var done = false;
var unanswered = [];

var hours = core_v2_widget.GetStringValue('hours', '18');
var subject = core_v2_widget.GetStringValue('subject', core_v2_language.GetResource('Subject_Default'));
var fromEmail = core_v2_widget.GetStringValue('fromEmail', 'notset@local.com');
var toEmails = core_v2_widget.GetStringValue('toEmails', '');
var toRoleIds = core_v2_widget.GetStringValue('toRoleIds', '');
var group = core_v2_widget.GetStringValue('forumGroup', '');

core_v2_eventLog.Write("Group: " + group, { Category: "Unanswered Threads", EventId: 123675, EventType: "Warning" });

// Get Threads
while(!done){
    var threads = core_v2_forumThread.List(
        { 
            ForumThreadQueryType: 'Unanswered',
            IncludeSubGroups: true,
            IncludeDiscussions: false,
            PageIndex: pageIndex, 
            PageSize: 100, 
            SortBy: 'Date', 
            SortOrder: 'Descending',
            GroupId: core_v2_utility.ParseInt(group)
        });
    
    core_v2_eventLog.Write("ThreadCount: " + threads.Count, { Category: "Unanswered Threads", EventId: 123675, EventType: "Warning" });
      
    for(var t = 0; t < threads.Count; t++)
    {
        var hoursDiff = (Math.round(((new Date()) - threads[t].Date) / (60*60*1000))).toString();

        if(hoursDiff > hours)
        {
            unanswered.push(threads[t].Url);
        }
    }
    
    
    if(threads.TotalCount <= 100 * (pageIndex + 1))
    {
        done = true;
    }
      
    pageIndex++;
}

var hourText = '';

if(hours > 1)
{
    hourText = core_v2_language.GetResource('Hours_Text');
}
else
{
    hourText = core_v2_language.GetResource('Hour_Text');
}



var body = '<b>' + core_v2_language.GetResource('EmailBodyIntroText') + ' ' + hours + ' ' + hourText + ':</b>';
for(var u = 0; u < unanswered.length; u++)
{
    body += '<p><a href="' + unanswered[u] + '">' + unanswered[u] + '</a></p>';
}

// Get emails to send to
var splitEmails = toEmails.split(',');
var splitRoleIds = toRoleIds.split(',');
var allEmails = [];

for(var i = 0; i < splitRoleIds.length; i++)
{
    core_v2_eventLog.Write("Role Users Found: ", { Category: "Unanswered Threads", EventId: 18789, EventType: "Warning" });
    var roleUsersDone = false;
    var roleUsersPageIndex = 0;
    var roleId = core_v2_utility.ParseInt(splitRoleIds[i]);
    while(!roleUsersDone)
    {
        var roleUsers = core_v2_user.List(
            { 
                PageIndex: roleUsersPageIndex, 
                PageSize: 100, 
                RoleId: roleId 
            }
        ); 
        
        if(roleUsers.Count > 0)
        {
            core_v2_eventLog.Write("Role greater than 0: ", { Category: "Unanswered Threads", EventId: 187489, EventType: "Warning" });
            for(var r = 0; r < roleUsers.Count; r++)
            {
                core_v2_eventLog.Write("RoleUserEmail: " + roleUsers[r].PrivateEmail, { Category: "Unanswered Threads", EventId: 18789, EventType: "Warning" });
                allEmails.push(roleUsers[r].PrivateEmail);
            }
        }
        
        if(roleUsers.TotalCount <= 100 * (roleUsersPageIndex + 1))
        {
            roleUsersDone = true;
        }
        
        roleUsersPageIndex++;
    }
}

for(var e = 0; e < splitEmails.length; e++)
{
    allEmails.push(splitEmails[e]);
}

if(allEmails.length > 0 && unanswered.length > 0)
{
    for(var te = 0; te < allEmails.length; te++)
    {
        core_v2_email.Send(subject, body, { FromEmail: fromEmail, ToEmail: allEmails[te] });    
    }
}]]></executionScript>
			<configuration><![CDATA[<propertyGroup id="options" labelResourceName="Options">
    <property id="hours" labelResourceName="Hours_Label" descriptionResourceName="Hours_Desc">
        <propertyRule name="minmax" min="0" />
    </property>
    <property id="subject" labelResourceName="Subject_Label" descriptionResourceName="Subject_Desc"></property>
    <property id="fromEmail" labelResourceName="FromEmail_Label" descriptionResourceName="FromEmail_Desc"></property>
    <property id="toEmails" labelResourceName="ToEmail_Label" descriptionResourceName="ToEmail_Desc"></property>
    <property id="toRoleIds" labelResourceName="ToRoles_Label" descriptionResourceName="ToRoles_Desc" dataType="Custom" template="core_v2_roleLookup" enableCurrent="false" maxSelections="10" format="csv" />
    <property id="forumGroup" labelResourceName="ForumGroup_Label" descriptionResourceName="ForumGroup_Desc" defaultValue="Group=-1" dataType="Custom" template="core_v2_groupLookup" enableCurrent="false" format="csv" />
</propertyGroup>]]></configuration>
			<languageResources><![CDATA[<language key="en-us">
  <resource name="EmailBodyIntroText">Unanswered Threads after</resource>
  <resource name="ForumGroup_Desc">Select a Group to restrict the unanswered Threads to.  The automation will only look at Threads in this Group.</resource>
  <resource name="ForumGroup_Label">Select a Group</resource>
  <resource name="FromEmail_Desc">The default is notset@local.com</resource>
  <resource name="FromEmail_Label">From Email Address</resource>
  <resource name="Hour_Text">Hour</resource>
  <resource name="Hours_Desc">If a Thread is unanswered after the defined number of hours an email will be sent.</resource>
  <resource name="Hours_Label">Hours</resource>
  <resource name="Hours_Text">Hours</resource>
  <resource name="Subject_Default">Unanswered Threads</resource>
  <resource name="Subject_Desc">Email subject for the unanswered Threads email</resource>
  <resource name="Subject_Label">Email Subject</resource>
  <resource name="ToEmail_Desc">Enter a single email or multiple emails, multiple emails should be comma delimited (test@email.com,test2@email.com).</resource>
  <resource name="ToEmail_Label">To Email</resource>
  <resource name="ToRoles_Desc">Enter a single role or multiple roles, multiple roles should be comma delimited (adminstrators,Users).</resource>
  <resource name="ToRoles_Label">To Roles</resource>
</language>]]></languageResources>
		</automation>
	</automations>
	<configuredAutomations>
		<configuredAutomation version="12.0.2.17146" id="a55006fd54d94a86807fceb76e87e2db" automationId="f624be8c283d479096e806444e857bb4" name="Unanswered Threads" description="" enabled="false" lastModified="2021-12-14 19:58:25Z">
			<properties>
				<property id="hours" dataType="String">
					<value>48</value>
				</property>
				<property id="subject" dataType="String">
					<value>There are Unanswered Forum Threads in your Community</value>
				</property>
				<property id="fromEmail" dataType="String">
					<value>notset@community.com</value>
				</property>
				<property id="toEmails" dataType="String">
					<value />
				</property>
				<property id="toRoleIds" dataType="Custom">
					<value />
				</property>
				<property id="forumGroup" dataType="Custom">
					<value />
				</property>
			</properties>
		</configuredAutomation>
	</configuredAutomations>
</automations>

 Installation Instructions

  1. To import this automation please follow the documentation listed here: https://community.telligent.com/community/11/w/user-documentation/62977/how-do-i-configure-automations-for-my-community
  2. You will then click on "Automations" above the Automation Studio tab and click "Add"
  3. For the "Type of Automation" drop down, select "Unanswered Threads Notification Email"
  4. Configure the automation as shown below, enable it, and click save!

 Configuration Options

  • Schedule
    • How often the automation should run. The default is set to once per day, Monday through Friday, at 8:00am.
  • Hours
    • The number of hours a Forum Thread has been unanswered before it is included in the email report. The default is 24 hours.
  • Email Subject
    • The subject of the email.
  • From Email Address
    • The email address that the email notification will come from.
  • To Email
    • Either a single email address or comma separated list of email addresses that the email will be sent to.
  • To Roles
    • You can scope this automation to send an email notification to all users in a specific role.
  • Select a Group
    • You can scope the automation to only look for unanswered Threads in a specific Group.

Automation Configuration

Automation Studio Configuration

  • Satish Kumar (3sides)
    Satish Kumar (3sides) over 1 year ago in reply to Marie.Cassidy

    Does the threads that are included are created under last 96 hours ?

    • Cancel
    • Vote Up 0 Vote Down
    • More
    • Cancel
  • Marie.Cassidy
    Marie.Cassidy over 1 year ago

    I have this automation running on our site, and have it for multiple groups - so thank you.

    I do have an issue though, I have the Hours set to 96 , but am getting all threads included without a response.

    Anyone else finding this?

    • Cancel
    • Vote Up 0 Vote Down
    • More
    • Cancel
  • Oliver Beirne
    Oliver Beirne over 3 years ago in reply to Grant Pankonien

    Thanks so much Grant Slight smile

    • Cancel
    • Vote Up 0 Vote Down
    • More
    • Cancel
  • chrisseamons
    chrisseamons over 3 years ago in reply to Grant Pankonien

    Thanks Grant, you were clear enough and that is what I was able to do but when I click save and then go back into look at the automation settings it did not save it.  This is a screenshot before to show I was able to select the site root group:

    And this is after going back into the configuration:

    Not sure what is/is not happening.

    • Cancel
    • Vote Up 0 Vote Down
    • More
    • Cancel
  • Grant Pankonien
    Grant Pankonien over 3 years ago in reply to chrisseamons

    My apologies as I should clarify. When you type Site Root, you get an option to select the name of your community. You would then select that group. Here is a screenshot example:

    • Cancel
    • Vote Up 0 Vote Down
    • More
    • Cancel
  • chrisseamons
    chrisseamons over 3 years ago in reply to Grant Pankonien

    When I type site root in the field it brings up our community and after I select it and hit save it does not save the group but it does when I select an individual group.  How can I save the site root group?  Would it be possible to set it in the XML file before importing it?

    • Cancel
    • Vote Up 0 Vote Down
    • More
    • Cancel
  • Grant Pankonien
    Grant Pankonien over 3 years ago in reply to chrisseamons

    Yes, you can use multiple automations.

    e.g. you could do one automation that does entire site sent to admins. Then another automation for a specific group going to that groups owners (via role or emails). Then another one for another group going to your product team distribution list email. May want to stagger when they are sent so it’s not too spammy for any particular user if someone is on multiple automations. 

    • Cancel
    • Vote Up 0 Vote Down
    • More
    • Cancel
  • chrisseamons
    chrisseamons over 3 years ago in reply to Grant Pankonien

    Thanks Grant.  That is what I was thinking.  If we need to select a (single) group is it possible to set up an automation for each group we have on our community or would we need to set up a script to call the appropriate API that would check each group?

    • Cancel
    • Vote Up 0 Vote Down
    • More
    • Cancel
  • Grant Pankonien
    Grant Pankonien over 3 years ago in reply to chrisseamons

    Hey Chris - in the listing itself you'll see there are two versions you can grab. The download button is going to give you the v12 version, but https://community.telligent.com/cfs-filesystemfile/__key/marketplace-files/42447d1b-30d2-40c1-ae3b-594073888f38/UnansweredThreads_2D00_Automation_2D00_v11.xml?_=637855464970978059 will give you the v11 version of this automation. 

    You DO need to select a group - typing Site Root will bring back the site level group and then filter to all groups on the site.

    • Cancel
    • Vote Up 0 Vote Down
    • More
    • Cancel
  • chrisseamons
    chrisseamons over 3 years ago

    Hi.  Is this automation for v12 and v11 of the Telligent platform?  Just wanting to make sure so I download and import the correct version for our community which is v11.1.8.17149.

    Also, if no group is set in the Select a Group field will the automation scan all groups to get a list or is this field required?

    Thanks in advance.

    • Cancel
    • Vote Up 0 Vote Down
    • More
    • Cancel
>
  • Telligent
  • Professional Services
  • Submit a Support Ticket
  • Become a Partner
  • Request a Demo
  • Contact Us

About
Privacy Policy
Terms of use
Copyright 2024 Verint, Inc.
Powered by Verint Community