The CreatorCon Call for Content is officially open! Get started here.

Help with notification

Community Alums
Not applicable

Hi all, 

On the workspace activity tab, within the communications facet I am trying to configure an activity type to display in the "notification" facet(see screenshot), a history of all the emails of that user account.

Dev86_0-1713448872383.png

As you see I have already configured the facet, I just need to show a history of all the emails. There is an OOB business rule called create activity, but is not working. Can anyone help please?

 

Here is the OOB Business rule: 

(function executeRule(current, previous /*null when async*/) {

//get recipients
//get first recipient
//get account from first recipient

var recipients = current.recipients.split(',');
var first_recipient = recipients[0];

var contact_gr = new GlideRecord('customer_contact');
contact_gr.get('email', first_recipient);
var account = contact_gr.account;
gs.info(contact_gr.sys_id,'cd-');



var actSubCtx = global.ActivitySubscriptionContext.getContext();
//if (current.contact) {
actSubCtx.getActivityService().createActivity(current, 'email_sent', "", "", "", CustomerCentralConstants.MODULE);
// } else if (current.consumer) {
//  actSubCtx.getActivityService().createActivity(current, CustomerCentralConstants.VERB_CONSUMER_CREATED, "", "", "", CustomerCentralConstants.MODULE);
// }

})(current, previous);
0 REPLIES 0