CA Service Management

 View Only
  • 1.  Service level,workshift in spell code

    Posted Sep 09, 2016 10:25 AM

    We have different service levels(like level 1,2 etc) and there are mapped to different workshift(like regular,24X7 ect).For various time calculation such as response time and resolution time , we need to feed this workshift in to spell.Please let us know how we can implement this one.    

  • 2.  Re: Service level,workshift in spell code

    Posted Sep 20, 2016 04:40 PM

    Not sure if this is what you need, but this is example how to get workshift information by ID and use it to calculate duration between two dates


    send_wait(0,top_object(),"call_attr","wrkshft","sync_fetch","DYNAMIC",format("persistent_id = 'wrkshft:4600'"),-1,0);
       if (msg_error()) {
        logf(ERROR, "Update object macro error: %s, Incident %d", msg[0], ref_num);
      int wrkfound;
      object wrkList,wrkPointer;
      wrkList = msg[0];
      wrkfound = msg[1];
      if (wrkfound > 0)
       send_wait(0, wrkList, "dob_by_index", "DEFAULT",0, 0);
        if (msg_error())
         logf(ERROR, format("AHDConnect:dob_by_index %s, Incident %d", msg[0], ref_num));
         return (-4);

    string business_hours;
    business_hours = wrkPointer.sched;
    newDuration = workshift_abs2work(business_hours, open_date, last_mod_dt);