B2B Service

Get Involved. Join the Conversation.

Topic

    Hamzeh Al Karmi
    Define condition for SR EscalationAnswered
    Topic posted February 5, 2019 by Hamzeh Al KarmiSilver Medal: 2,000+ Points 
    157 Views, 17 Comments
    Title:
    Define condition for SR Escalation
    Summary:
    What condition should be defined to escalate the service request?
    Content:

    Good day,

    We have a problem that I wish for assistance in Oracle Engagement Cloud. I have configured the following:

    1- From the Object Workflows I created a milestone object called Escalate_SR_after_milestone_is_reached (for the first escalation which takes the SR to the supervisor and another called Escalate_SR_after_milestone_is_reached_Manager (for the second escalation which takes the SR to the manager)

    2- Event Point: When a record is updated

    3- Condition: (isAttributeChanged('WarnedFlag') && WarnedFlag=='Y')

    4- Email template defined to be sent to both the supervisor and manager

    I created a service request and when the milestone label generated the warning icon next to the First Response Metric I got no email. What am I missing? I have little knowledge in scripting. Can you help please?

    The milestone status remains In Progress or (ORA_SVC_IN_PROGRESS) what script should I use so that when the warning icon appears the milestone status changes to let us say Warning? 

    For the supervisor the milestone should count 24 hours and if no action was taken then an email notification should be sent to the supervisor. After 48 hours of no action or update on the service request, an email notification should be sent to the manager.

    Can anyone help please?

    Best Comment

    Reghu

    if you do so, after the warning is set to true and no matter what happens on the milestone record, this WF will be triggered.

     

    Try something of this sort

    if (isAttributeChanged('WarnedFlag')){
     if(WarnedFlag){
      return true
     } else {
      return false
     }
    }

    Comment

     

    • Reghu

      Dear Hamzeh,

      As I told before, milestone status is the ideal way to handle this scenario. But for some reason its not getting changed from inprogress ( as you have mentioned) to warning.  You can confirm it at the table level. 

      But warning flag is getting set at table to Y. 

      Having said that, its the way how the Boolean value is being used at the field.  You can either do a throw or println to see the value that is stored at the flag to write condition accordingly.

       

      Nevertheless, how I handled it in my case was, 

      if(WarnedFlag){ return true }  

       

      I am sure it should work as it works like a charm in my environment. 

      • Hamzeh Al Karmi

        Apologies Reghu as I am new to the script and engagement service cloud. So bear with me please. 

        Thank you for your reply, so you suggest my script be instead of (isAttributeChanged('WarnedFlag') && WarnedFlag=='Y') I should enter if(WarnedFlag){return true}

        Am I correct in understanding you?

         

    • Reghu

      for milestone status not getting changed, I have logged a SR, I will keep you posted once I receive an update from them

    • Reghu

      if you do so, after the warning is set to true and no matter what happens on the milestone record, this WF will be triggered.

       

      Try something of this sort

      if (isAttributeChanged('WarnedFlag')){
       if(WarnedFlag){
        return true
       } else {
        return false
       }
      }

      • Hamzeh Al Karmi

        I have entered the script you have given me and provided that the email notification be sent to me. I created the SR but I didn't receive anything. I attached a screenshot of the detailed service request that I created. The warning icon is the Warned Flag? I made the milestones (First Response and Warning Threshold) to be 1 minute each.

        Do you have a Skype address I can share the screen with you so you can help if that's ok with you Reghu. 

        Thank you,

    • Reghu

      Is the schedule process running  "Monitor  Service Request Milestones"?

       

    • Reghu

      ok could you wait for it to succeed and let me know the behavior?

    • Reghu

      or run one immediately and see the value changes

      • Hamzeh Al Karmi

        Dear Reghu,

        Finally it worked! However (sorry) apparently if I defined an email template for the milestone object I cant add SmartTexts like Primary Contact Name, Service Request Number, etc. If I define an email template for the milestone object it sends email perfectly. But if I define an email template and associate it with the service request object that I created with the same script that you gave me it won't send an email because the WarnedFlag is not updatable as I found out while scrolling through the fields. 

        How can I add the SmartText such as Primary Contact Name, etc. for the milestone email template?

        Thanks,

    • Reghu
      Glad to know I was of help to u. U can create formula fields in milestone object to pull fields from sr. That's how I have done ,
      • Hamzeh Al Karmi

        What I noticed that the WarnedFlag in the Service Request object is not updatable but the in the Milestone object it is. Is there a workaround? Why is it that the WarnedFlag API in Service Request is not updatable but the WarnedFlag in Milestone is. And how do I write the script so that the application reads the WarnedFlag in the milestone not the Service Request. Or Can I modify the Warned flag field in Service Request so it can be updatable? Can I use the isAttributeChanged to include the label Warned for the milestone? I modified the label display in the Service Request for the label Warned to Warned Flag. I used isAttributeChanged('Warned') only and hopefully it will work

    • Reghu

      Sorry, is it related to the escalation use case we were discussing. I am not able to understand

      • Hamzeh Al Karmi

        Yes. The script you gave me contained the Warned Flag that is associated with the milestone. As seen attached the Warned Flag 1 picture is for the milestone object which is updatable but the Warned Flag 2 is for the service request object which is not updatable. Is there another updatable API that is associated with the service request? 

        I also attached the situation I am in.

    • Reghu

      Sorry, I don't see any attachment.   Neverhtheless,  for the situation to send a notification/escalation  in my opinion the solution is to have WF in Mileston object and with warned flag Y (as status is nto changed to Warning)  and to send an email or any other action. 

      While sending an email if you want to merge fields from SR, then I would suggest you to create formula fields in Milestone object to pull fields from parent SR.  This should suffice your requirement. 

      Please let me know if I am missing something here