• Inok Systems

Remedyforce Advanced Tips and Tricks (Part 2) – Sending email when a note is added

會員評等:  / 0
佳 

Those who have meddled long enough in Remedyforce will understand this blog post by the title. Out of the box, Email templates and workflow triggers are set in the incident object, but when you dig deeper, you will understand that the “notes” that you have added belongs to another object called the “incident history” object!

Well, if they are not on the same object, how do we trigger our email? We pass the data to the incident_history object and set a workflow rule  from there!

How do we notify the assigned staff when a incident action history is updated?

1. Create a new custom field called "Incident Assigned Staff Email" in the Incident History Object (email)

2. Create a new custom field called "Notify Staff Comment Added Controller" (checkbox, defaul unchecked)

3. Create an email template "Custom Notify Staff Incident Comment Added" in the Incident History Object

4. Create an email alert called "custom_notify_staff_incident_comment_added" with recipients "Email Field: Incident Assigned Staff Email" (take note this is the email field we made in step 1)

5. Create an Field update "ClearNotifyStaffCommentAddedController" in the incident object to uncheck the checkbox we created in 2.

6. Create a workflow rule called "Custom Notify Staff Incident Comment Added" in the Incident History Object whenever a record is created and if the formula is true :

Incident History: Notify Staff Comment Added ControllerEQUALSTrue

PS: This workflow will trigger 2 actions : a. the email alert we created in step 4. and b. the field update we created in step 5.

7. Create a field update called "SetNotifyStaffCommentAddedController" which will check the checkbox we created in step 2 in Incident History Object.

8. Create a field update called "Set Incident Assigned Staff Email" which will pull the email address of the assignee over using the formula :

BMCServiceDesk__FKIncident__r.BMCServiceDesk__FKOpenBy__r.Email

9. Create a workflow rule called "Set Notify Staff Comment Added Controller" in the Incident History Object whenever a record is created in the Incident History Object and if the formula evaluates to true:

AND( NOT( ISBLANK( BMCServiceDesk__FKIncident__r.BMCServiceDesk__FKOpenBy__c ) ),

BMCServiceDesk__FKIncident__r.BMCServiceDesk__FKOpenBy__c <> BMCServiceDesk__FKUser__c )

 

*PS: this checks that the rule only runs if staff is assigned to incident -AND- the person creating the incident history record is not the same person

This rule will trigger 2 field updates we created in steps 7 & 8 "SetNotifyStaffCommentAddedController" & "Set Incident Assigned Staff Email"

SUMMARY:

When a comment is added, a record in inc history is created. This will trigger workflow in step 9, which will update the email address and check the box to flag this record for workflow in step 6 to run. When step 6 runs, it sends the email to the email field you created and then uncheck the box so as to mark this record as processed and it wont trigger again.

Random Blogpost

Scenario: Sever is down.

 1. Customer cuts an incident ticket reporting server is down, affecting normal operations. This is a critical service and a very important App is down causing all agents not able to calculate insurance policies. Helpdesk created a P1 ticket with SLA of 1hr to resolve.

閱讀全文...