Product Information
Ending Auto Delegation of workflows in Employee Central Automatically based on end date
Delegating workflows is a common requirement for most of the customers across regions
However, there are cases where customers would like to end the auto delegation on a certain date automatically i.e they would like to provide an end date for the same.
In EC currently, we do support turning on the delegation, but adding an end date is something which is not yet supported. I am demonstrating a POC below based on which we can achieve this requirement.
We would be needing the following tools in SuccessFactors.
- Custom MDF
- Fields User (for which you need delegation)
- Start Date (Date when you want to start delegation)
- End Date (Date when you want to end the delegation)
- Delegatee (user to whom you want to delegate)
- Integration center
- Start Delegation – This picks up the custom MDF records with a filter as “Start Date” and maps the fields to standard Delegation MDF “Auto Delegate Config” & “auto Delegate Details”
- End Delegation – This picks up the custom MDF records with a filter as “End Date” and maps the fields to standard Delegation MDF “Auto Delegate Config” & “auto Delegate Details”
The Integration center job has to be set real time and on a daily basis
Setup of working scenario:
Custom MDF :
The Custom MDF is used to store the user preference like when to start Auto delgation and when to stop the same
Integration Center:
Delegation Start
Create new Integration type -> Select Scheduled, source & target both as ‘SuccessFactors ‘ : OData to OData integration
Select Starting entity as custom MDF and target MDF as auto delegate config
Set purge type as “Full” and operation as “Upsert Single”
Go to field mapping view and map the fields from custom MDF to Delegation config MDF
Fields mapped
“User” from custom MDF to “delegator”
“Delegatee (cust_delegatee)” from custom MDF to “delgatee”
Status has a default value “ON”
Always on is set to “YES”
Go to filer view and create a filter as shown below
This means pick only those records whose delegation has to start from today
Delegation End
The steps for delegation end are the almost same as before. You need to create another integration
However, there are few changes in mapping as shown below
Also, the filter is based on End Date. When the job run date == end date, the delegation has to be turned off automatically
Time to Test!!
- From manage data, create two records of delegation for two users as shown below . You can create an config UI and embed the same in Employe Profile (PP3) Page
For simplicity and to demonstrate, I have the same start date and end date maintained. In a real-life scenario, these could be different
- Run the Integration scenario “Delegation Start”. Before running verify that there are no delegations for above users
Records are created for both employees with Auto Delegation “ON”
Login as Karla Almeida and verify from quick links in home page that delegation is actually “ON”
- Now run the “Delegation End”integration. This will pick up all records whose delegation end date is set to today() and turn off the delegation from “Auto Delegate Config” without manual intervention by employee
Login as Karla Almeida again and verify that Auto Delegation has been turned off
The Same can be seen in Manage data
With this, I conclude the demonstration of auto ending a delegation based on user’s end date. The POC can be extended to real-life examples and scenarios.
Nicely written 🙂
Thanks Swathi 🙂
Hi Neelesh
This was a very good read. Great idea and well written blog. Interesting to know the different ways we can leverage Integration Center. Thanks much for sharing.
Best Regards,
Aarti.
Thanks Aarti 🙂
Very well demonstrated with screen prints
Thanks Rajat 🙂
Hi Neelesh,
Good one, I have already tried this and it is live and running successfully in one of our client , however instead of MDF, I used employee time object for start date and end date, as most of the delegation is based on employee leave. I created a custom filed user in Employee Time object for delegatee.
We have to be cautious during Upgrades to make sure autodeleagte object doesn't have any new fields or properties, if yes, we need to adjust the integration mapping.
Thanks,
Krishna S
Thanks Krishna..Sounds good as well..There could be customers without EC time off scoped (or use time off in third party /onPrem part) and they would need a custom MDF in such cases. You might want to blog that approach and link these blogs together
Best Regards
Neelesh
Good job Nilesh
Thanks Manu 🙂
Neelesh Kamath Thanks a lot for the detailed explanation . I tried the similar scenario in my staging environment and executed Delegation Start Integration however i'm getting the below error .
" Error invoking query API: while trying to invoke the method " in API read. Can you please let me kindly suggest whether i'm missing something here.
Regards,
I Arun
Hi Neelesh Kamath
Field is not getting mapped when i try to map the fields from custom MDF to standard MDF and also let me know how to set the AlwaysOn Boolean to yes?
Best Regards,
Balaji C
nice ...
Thanks 🙂
Hi Neelesh,
I am getting following error and in Auto Delegate Config object delegatee, status fields are not getting filled.
Regards,
Satish
Hi Satish,
It is still working for me in my demo instance. Please check log from Dec19 today
Kindly check your mapping again if all required fields are mapped or defaulted with default value
Regards
Neelesh
Thanks for sharing. Extremely helpful!!!!
Thanks Danny
Hi Neelesh,
Thanks for sharing.
But i have question,
i'm assuming the old record will remain exist in the mdf cust_delegation?
let's say, delegate start date and end date is 29.12.2019 after Delegate End Date is running, this data will remain in mdf cust_delegation right? is there any way to automatically deleting records if delegate end date is already past?
If the delegate end date is 29.12.2019, the old record would be deleted and a new record is created by marking the status of delegation to OFF (since the upsert is full purge). Regarding the deletion of records in the past, you will not end up in this situation if the delegate start and end job is scheduled daily. Only in rare cases, where the job has failed due to time out or some other reasons, the admin has to take care of them manually. Else this should be taken care by daily job itself