Setting SLA across different time zones and geographies
I am using personal edition of PRPC 7.1.7. I am trying to achieve the following:
1. A case type has a stage with two steps.
2. Each of the two steps have an assignment each.
3. Say User 1 from India starts the case type and opens assignment 1 in flow 1 of step 1. User 1 has IST and IndiaCalendar in his operator ID. So the assignment is associated with an SLA as defined in the assignment shape accordingly.
4. After user 1 submits the assignment, the work item moves to assignment 2 in flow 2 of step 2.Here ToWorklist router activity is being user and the user provided is User 2 from USA with America/New_York and USACalendar respectively.
The issue is that the system does not automatically pick up the calendar of the USA user. Hence if User 1 completes assignment 1 at 11:00 AM IST then the same SLA of the USA user starts immediately (this means that the SLA of the US user has started even though the geographic time in US would be 1:30 AM US time). This is obviously incorrect. The pyCalendar on newAssignPage shown IndiaCalendar.
How do we tackle this issue? Is PEGA suppose to automatically pick up the SLA based on the user's calendar to whom the assignment is assigned? Or do we need to manually handle the situation of opening the assignment and making the requisite changes.
I read through the article and it says that the function and activity described in the article are present in PEGA 7. I checked and the function is available by the name of pxGetSpecifiedTimeOnDate. However, I do not find any activity by the name of "figureOutSLATime".
Could you please let me know the name of the activity that corresponds to figureOutSLATime as mentioned in the article.
The article says: "In PRPC 6.2 SP2, Pega-provided functionality cannot fulfill this requirement. However, you can write a custom function rule (Rule-Utility-Function rule type) to get a specific time on a given day and use the function in an activity. The custom function and the activity described in this article are available in Pega 7".
In fact, as mentioned above, I have also found the function mentioned in the article in PE7.1.7 (pxGetSpecifiedTimeOnDate). However I cannot seem to find the activity.
Since it was written, I was wondering why I could not find it - I don't need it anymore however - I have understood the illustration.
Author of the PDN article and the RUF pxGetSpecifiedTimeOnDate here. Actually, the activity figureOutSLATime described in the article is just an example of how to use pxGetSpecifiedTimeOnDate, and not something we productized. Sorry the article mistakenly printed that.
I just came up with another option to try. In a property-set prior to reaching the assignment to the user in the USA, try setting the case's .pyCalendar property to the calendar for the USA in your system. SLA processing will then use that calendar instead of the one from the current requestor's operator id - which is the India one.
Thanks Marik! It is indeed great to be answered by the author of the article :) - I have 1 suggestion though - please consider the same if you deem fit - I feel there should be a standard OOTB router activity which takes care of the entire transfer to another country process - The params required to be passed in to the activity could be operator name, check availability, check skills etc. This way, on the newAssignPage of the assignment, the pyCalendar would also point to the target users calendar. In the steps that I have shown below, the newAssignPage contains the calendar of the source user which I believe is incorrect - I think the assignment should be in sync with the SLA being used.
Evantually what I did is similar to what you mentioned in the second post. Just before reaching the assignment I created a utility which did the following steps:
1. Know beforehand who the assignment needs to be transferred to (UK/US/India/Other country). Hence open the operator ID instance of the operator and hence we have the requisite calendar for the user we need to transfer the assignment to..
2. Use IsBusinessTime and IsBusinessDay function to figure out if the current time as per the calendar of the person the assignment needs to be transferred to is within or out of business hours.
3. Set 3 properties - SLAStart, SLAGoal and SLADeadline based on if the current day-time in the target users country is a valid business day-time
SLAStart = @(Pega-RULES:BusinessCalendar).nextBusinessDay(@(Pega-RULES:DateTime).getCurrentTimeStamp(), OpID.pyCalendar) OR @(Pega-RULES:DateTime).getCurrentTimeStamp()