Configuring Email Alerts/Notifications

We are using Service Manager 9.33 and I need to configure our alerts. I have tried using the documentation from HP and have even had a ticket open with HP for almost 4 months now with no success.

Here is what I am trying to setup:

1. A html email to be sent to the assignee of a RFC that is in the Registration Phase at 8am every Friday.

2. A html email to go to the Assignee of a RFC that has passed the planned.start

I was able to trigger an alert for the planned.start however, the notification that is triggered is not what I am looking for. All I receive is the following notification:

HP Service Manager Operator: alert

SCenter_cc: smithJ


Line Item C000012374 is almost due.

  • Verified Answer

    The trick here was the Calc Expression. SM calculates Monday as 1, Tuesday as 2, etc. By adding one for each day of the week, the alert will always be sent on the day/time that we need.

    Alert Condition: open in $L.file=true and current.phase in $L.file="Registration and Categorization"

    Calc Expression: if (dayofweek(tod())=1) then ($L.alert.time=date(tod()) '4 10:00:00');if (dayofweek(tod())=2) then ($L.alert.time=date(tod()) '3 10:00:00');if (dayofweek(tod())=3) then ($L.alert.time=date(tod()) '2 10:00:00');if (dayofweek(tod())=4) then ($L.alert.time=date(tod()) '1 10:00:00');if (dayofweek(tod())=5 and time(tod())>='10:00:00') then ($L.alert.time=date(tod()) '7 10:00:00')

  • ,

    I need to configure 90% of time for difference between two dates tod() and some time in the future.

    I have put this formula:
    $L.alert.time=date(next.update in $L.file) - date(major.incident.update in $L.file)*0.1

    major.incident.update has stored tod() value when incident is updated.
    Do you have some recommendation?
    Best regards,

  • Sorry, I haven't had to figure any percentages out. Have you tried using SLAs?

  • If you still need a solution.

    A common scheme:

    1) Start trigger (condition - in Registration Phase or any more you need) - for the initial launch

    2) In trigger start schedule with time to start near Friday

    3) Schedule start IOACTION

    4) IOACTION send email notification (after check status or any other fields you need to check) and reschedule for next near friday same schedule

  • ,
    I have solved it with this:

    // Function to calculate percentage between to dates:
    function calculateInterval(date, futureDate, percentage){
    var date2 = new Date(date);
    var date1 = new Date(futureDate);
    var timeDiff = Math.abs(date2.getTime() - date1.getTime()) * 0.10; // Calculate 90% of time!
    var date = new Date(timeDiff);
    var date3 = new Date(date1);
    var timeDiff2 = Math.abs(date3.getTime() - date.getTime());
    var date4 = new Date(timeDiff2);
    print("Datum 4: " date4);
    return date4;

    Best regards,

  • Hello.

    The better way to get solution that is to make new own topic.

    About your need, i have some code for 50% and 75% for OCML:

    Trigger for ocml (line item) 

    // TemplateBreach contain time duration for LineItem (take it from ocml tamplate)

    var TemplateBreach_50 = system.functions.val(((system.functions.val(TemplateBreach, 1))/2),3); var TemplateBreach_75 = system.functions.val(((system.functions.val(TemplateBreach, 1))*3/4),3); var dDate = lib.MYFunc.CalcDate(CurrDate, TemplateBreach, "MSK", tplsch); record.my_target_completion = dDate //Lines to set data in ocml about of SLA time - 50% and 75% var dDate50 = lib.MYFunc.CalcDate(CurrDate, TemplateBreach_50, "MSK", tplsch); record.my_target_50 = dDate50 var dDate75 = lib.MYFunc.CalcDate(CurrDate, TemplateBreach_75, "MSK", tplsch); record.my_target_75 = dDate75

    And SL=MYFunc

    function CalcDate(start,interval,tz,duty)
    	//function returns date equals start interval with "thinking" about timezone (tz) and Duty hours (duty)
    	var ret=vars.$my_calc_date_ret
    	//Clean variables
    	return ret;

    function CallProcess(name)
    //Function start process with name - name
    var rteReturnValue = new SCDatum();
    var rteNames = new SCDatum();
    var rteValues = new SCDatum();


    rteValues=system.functions.insert(rteValues, 0, 1, name);

    false); //false to run in same thread, true to run in new thread


    RAD app:
    times,1   -   $
    times,2   -  $
    prompt   -  $
    name      -  $
    times,3    -  $