CA Service Management

Expand all | Collapse all

Mail triggering

  • 1.  Mail triggering

    Posted Jul 12, 2016 06:15 AM


    Hi Team,

     

    We have a requirement here wherein, we want to send mail to the affected end user if the status is set to "user pending".

    If the status hasn't changed the next as well then the mail should be triggered again. This should happen for 2 consecutive days if the status is not changed and on the 3rd day the call should be closed with status set as "closed invalid" .

     

    Thanks



  • 2.  Re: Mail triggering

    Posted Jul 12, 2016 09:49 AM

    Hi Pushpith,

    I believe what you want can be accomplished, although it will take some testing and some trial-and-error to get it all working the way you need it to.  It will take a few things to set this up.  For the first part " send mail to the affected end user if the status is set to "user pending" This can be accomplished using the OOTB activity notification for Update Status.

     

    First, You would need to create a new macro to define a condition (site defined condition type) with an object type of Request/Incident/Problem, and then save it.  Then add an atomic condition to it with an attribute of "Status", select Data Value, and then choose the data value of "User Pending" (here in my screenshot i used "In Progress" as i dont have User Pending) and save it.  The atomic condition would look like this:

     

     

    Next, you would need to create a new notification rule.  Set the condition to the one you created in the previous step.  Select the message template (use the out of the box status update one if you dont have another one to use).  Select the condition (site defined condition macro) that you created in the previous step.  Then update the Object Contacts, add Affected End User, then save the Notification Rule.  It should look like this:  (again i am using the "In Progress" example for mine):

     

    Next add your new notification rule to the out-of-the-box default Update Status activity notification:

     

     

     

    So now, whenever there is an update status activity that takes place, it will evaluate the notification rules, and when the condition (that being the status is set to User Pending), it will fire off your notification rule, which you specified to notify the AEU.

     

    Now the next piece of your question - "If the status hasn't changed the next as well then the mail should be triggered again. This should happen for 2 consecutive days if the status is not changed and on the 3rd day the call should be closed with status set as "closed invalid" "

    For this part, you have a few ways to drive this - you can either use a Service Type Event which would expire after 1 day, and then 2 days, and would take action at each of those checkpoints, OR you can use an auto-event that would attach to the ticket upon creation and would use the same condition, and would have a delay time of 1day, and then a repeat delay time of 2days - and take action at each of those points.  This part can get very complex depending on how you want to set it up, so I wont provide you with the step by step instructions here, but will refer you to the documentation about Service Type Events, so you can take a look at it and see what would work best for your needs.  I would recommend going with Service Type events as there is a lot less system overhead with those than with auto-events.

     

    Here is the documentation for Service Type Events:

    _Attach a Service Type Event - CA Service Management - 14.1 - CA Technologies Documentation

     

    Hope this helps to get you started and point you in the right direction.

     

    Regards,

    Jon I.



  • 3.  Re: Mail triggering

    Posted Jul 13, 2016 04:13 AM

    Thanks Jon for the reply.

    I'll check and get back.



  • 4.  Re: Mail triggering

     
    Posted Jul 15, 2016 01:53 PM

    Hi Johnny_2302 - Were you able to get it to work? Thanks!



  • 5.  Re: Mail triggering

    Posted Jul 18, 2016 05:29 AM

    Hi Jon,

     

    I'm little confused here.

    I'm trying to use the service types event but not understanding how to go ahead with it..

    Kindly help.



  • 6.  Re: Mail triggering

    Posted Jul 18, 2016 07:33 AM

    Hi Jon,

     

    Below is what I have done:

    Service Type

     

    Attached Request event list is as follows:

    2 Min Mail

    4 Min Mail

     

     

     

     

     

    Event condition & Actions on True attached to above events are as follows

    Event condition

    Actions on true

     

     

     

    But post raising a ticket, as per above logic, mail should be triggered post the status is set to "User-Pending". However, as of now, after 2 & 4 mins of raising the ticket, the mail is getting triggered  to the end user. If time permits kindly let me know if I'm going right or is there anything else that needs to be added.



  • 7.  Re: Mail triggering

    Posted Jul 18, 2016 10:00 AM

    Hi Pushpith,

    So you are saying that its sending out the email at 2 mins and 4 mins to the end user, even though the status is not set to "user-pending" ?? 

    If so, what is the condition that you created?  Can you send us a screenshot of the condition itself?

    I think the condition may not be correct.

    Thanks,

    Jon I.



  • 8.  Re: Mail triggering

    Posted Jul 18, 2016 11:04 AM

    Hi Jon, the condition was not working properly ...I rectified the error ..however, I have observed few things:

    1. When the ticket is raised, even if the status is Open, the events get triggered(checking the conditions mentioned in 2mins & 4mins) whereas I need the same to be checked only when the status is User pending.

    2. When the status is set to User pending the status of every event gets changed to delayed.

     

    How can i resolve these?



  • 9.  Re: Mail triggering

    Posted Jul 18, 2016 02:43 PM

    Hi Pushpith,

    For #1 - the event should get triggered, thats how the conditions are checked every 2 and 4 mins to see if the status is set to "user-pending", if the event doesnt get triggered, then it cant check for that condition.    For #2 - that part I am not sure on why all events would get changed to delayed.  What is the status of the event prior to changing the status to user-pending?

    Jon



  • 10.  Re: Mail triggering

    Posted Jul 19, 2016 01:48 AM

    Hi Jon,

     

    The event status going into the "delayed" status is coz of the "Stop Service Type Events and Targets" set to "Yes"

    as Lindsay suggested.

    Can you suggest how should I achieve this requirement using service events?



  • 11.  Re: Mail triggering

    Posted Jul 19, 2016 10:34 AM

    I would suggest that you are not going to address your requirements using service events when the definition of the status you want to use will stop service events. If I was doing this I might consider developing a PAM (Process Automation) process that I would call when the status was changed to "User Pending". Feel free to private message me.



  • 12.  Re: Mail triggering

    Posted Jul 20, 2016 12:51 AM

    So is there any other way to achieve this apart from using the process automation tool?



  • 13.  Re: Mail triggering

    Posted Jul 18, 2016 02:52 PM

    In the definition of your "User Pending" status do you have the "Stop Service Type Events and Targets" set to "Yes"?



  • 14.  Re: Mail triggering

    Posted Jul 19, 2016 01:41 AM

    Yes, that is the reason I suppose the events are going in the delayed status.



  • 15.  Re: Mail triggering

    Posted Jul 20, 2016 01:36 AM

    It is possible to have an event fire despite the 'Stop Service Targets and Events' setting, but the event must have an 'event group id' that marks it as not being a Service Type event, and that attribute is not exposed out-of-the-box.  It can be set if you're willing to create and attach your event in spel, but otherwise as Lindsay suggests PAM is probably your best bet.

     

    Regards,

    James



  • 16.  Re: Mail triggering

    Posted Jul 21, 2016 06:32 AM

    Jon_Israel Lindsay_Estabrooks

    Hi All,

     

    I was able to achieve the requirement using below steps:

     

    1. Created 2 events as shown above: 2mins & 4mins (mentioned the "User pending" status condition)

    2. Attached these events in the activity notification "Update Status" under the Events tab.

     

    So now when the status is set to User pending, these events get triggered and the mail notification is sent to the end user.

     

    However, I'm facing a issue here i.e. the system is sending 2 mail notification for each event. I tried everything but the issue still persists.

    Kindly suggest



  • 17.  Re: Mail triggering

    Posted Jul 21, 2016 11:19 AM

    Please note that the events will be attached each time you update the status of the ticket. So, if you were to update the status of the ticket from 'Open' to 'Acknowledged' and then 30 seconds later update the status from 'Acknowledged' to 'User Pending' then each event would be attached twice.



  • 18.  Re: Mail triggering

    Posted Jul 26, 2016 07:00 AM

    Hi Lindsay,

     

    Though the events get attached twice the condition mentioned is for "User-pending" so will it still trigger?



  • 19.  Re: Mail triggering

    Posted Jul 26, 2016 11:24 AM

    Hi Johnny,

     

    Yes, once the "Delay Time" has expired each event will trigger. If the condition (in this case, the Status is 'User Pending') evaluates true then the "Actions on True Macro List" will be executed. As I previously mentioned, if you are attaching the events as part of the Update Status Activity Notification, they will be attached every time the Status changes. Here is what could happen:

     

    10:01:20 ticket is opened

    10:04:10 status is changed from 'Open' to 'Acknowledged" - event is attached with 4 minute delay time

    10:05:40 status is changed from 'Acknowledged' to 'User Pending' - event is attached (again) with 4 minute delay time

    10:08:10 event is triggered, condition is true - Multi-notificaiton macro is executed

    10:09:40 event is triggered, condition is true - Multi-notificaiton macro is executed

     

    A way to avoid this would be to NOT invoke your event above directly from the Update Status Activity Notification and do the following:

    • create an Attach-Event macro that will attach your previously defined event
    • create another event (with perhaps a 2 second Delay Time) that will use the same condition, executing the Attach-Event macro just defined
    • call this new event from the Update Status Activity Notification

    This way your originally defined event will only be attached when the status is changed from anything to 'User Pending'.



  • 20.  Re: Mail triggering

    Posted Jul 27, 2016 08:02 AM

    Hi Lindsay,

     

    Thanks for the details, I tried as u suggested in our UAT Env and it seems to be working fine. I'm planning to move these changes in the production environment so just wanted to know can this cause any issues since there would be lot of tickets logged in the prod env.



  • 21.  Re: Mail triggering

    Posted Jul 27, 2016 03:05 PM

    Any change has the potential to cause issues; that's why Change Management includes Risk Analysis. This change is pretty benign and can be easily turned off by removing the event from the Update Status Notification.



  • 22.  Re: Mail triggering

    Posted Jul 28, 2016 02:35 AM

    Hi Lindsay,

     

    There is an observation, when the status is set to user pending then the events gets attached as required, however if the status is changed from user pending to other status' then the above attached events doesn't get cancelled, how can we cancel the events.



  • 23.  Re: Mail triggering

    Posted Jul 28, 2016 11:25 AM

    The only mechanism you would have to cancel an attached event would be to write some SPEL code that would search through the attached events and cancel the appropriate event. This is complex and there is no support from CA for it.

     

    But why should you worry? If the status gets changed from 'User Pending' to some other status then when your event triggers the condition will not be true and the notification action will not be executed.



  • 24.  Re: Mail triggering

    Posted Jul 29, 2016 01:57 AM

    Lets take a scenario wherein the user changes the status as follows

    1. Ack

    2. User pending (here the events get attached)

    3. WIP (User pending events still attached)

    4. User pending (Again user pending events gets attached)

    Now the condition is evaluated and since the events are attached twice the mail notification will be triggered twice, hence thought if there is way to cancel particular events.



  • 25.  Re: Mail triggering

    Posted Jul 29, 2016 10:43 AM

    If you predict this scenario happening frequently enough to be an issue then the only way I can recommend for you to cancel events from within SDM is by writing some SPEL code.

     

    Here is something from another forum to give you a starting point - Resolve:Finding Existing Events to Cancel and Cancel Them Using SPEL - Customizations / Modifications - ServiceDeskUsers



  • 26.  Re: Mail triggering

    Posted Aug 09, 2016 01:58 AM

    any idea why m facing below error:

     



  • 27.  Re: Mail triggering

    Posted Aug 09, 2016 05:43 AM

    cdtj if time permits kindly go thru the above post and let me know if it is possible to cancel only specific attached events?

    I was referring your code mentioned in below links, however, it seems to cancel all the attached events. In my case I need to cancel only specific events.

    Cancel Attached Type Service on Incidents/Requests



  • 28.  Re: Mail triggering

     
    Posted Jul 22, 2016 03:51 PM

    Hi Johnny_2302 - Did any of the responses help answer your question? If so please mark as Correct Answer. Thanks!