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

Need to send a notification to the Catalog owner

vinuth v
Tera Expert

Hi All,

 

I need to trigger the email notification to the catalog item owner, Currently I have written the code to trigger email notification like this and I am using the schedule job to trigger the notification.

 

var gr = new GlideRecord('sc_cat_item');
gr.addEncodedQuery('active=true^u_cat_item_owner.active=true^u_cat_item_ownerISNOTEMPTY');
gr.query();
while (gr.next()) {
var owner = gr.u_cat_item_owner;
if (owner) {
gs.eventQueue('Catalog.item.owner.notification', gr, gr.u_cat_item_owner, '');
}
}

 

 

 

It's working fine, 

Current notification body,

 

Hi Scott Bennett,

You have received this email because you are the owner of the catalog item "Report an issue with Checkpoint Marketing".
Please review the form for any of the below points.

 

But if the catalog item owner having multiple catalog items then I need to send the single email notification to the catalog owner rather then multiple notification.

 

Thanks in advance

Vinuth

19 REPLIES 19

Hi @Mohith Devatte 

I have changed the code like this, but it's not working

vinuthv_0-1693566528541.png

 

@vinuth v is the notification triggered and names  are not printed?

 

@Mohith Devatte actually notification is not triggering,
 I checked in the preview email, it's showing like this,

vinuthv_0-1693567284655.png

 

@vinuth v can you see if event is fired in event logs table with parm2 as names of items 

 

Also did you tag your event in the notification when to run section ?

 

if not select the trigger type as event and select your event 

 

@Mohith Devatte 

This is the one I have added in the notification

vinuthv_0-1693568187691.png

 I am not getting any data,

vinuthv_1-1693568219402.png