Groovy script to notify agent when request is updated — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Groovy script to notify agent when request is updated

Summary:


Content (please ensure you mask any confidential information):

My groovy script is supposed to send a bell/email notification to agents when their request is updated but its not pushing anything through. Can you let me know if there is an issue with my script? I also set the trigger to 'AfterTrasactionPosted;

if (isAttributeChanged('LastUpdatedBy') && (LastUpdatedBy == PrimaryContactPartyId)) {
try {
def map = new HashMap();

    // Create notification message
def messageText = 'The Primary Contact has updated Service Request (SR' + SrNumber + ' - ' + Title + '). Please review the changes.';

// Identify the recipient (Agent assigned to the request)
def recipientPartyId = AssigneeResourceId;

// Specify notification channels

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!