2

SAP Successfactors : Automation of shift change using SAP CAI and SAP Process Au...

 1 year ago
source link: https://blogs.sap.com/2022/05/13/sap-successfactors-automation-of-shift-change-using-sap-cai-and-sap-process-automation/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Introduction

As part of AI & Automation SAP Community Tutorial Challenge 2022 , the below blog post will guide and demonstrate  automation of a process  within SAP Successfactors employee central Time off module .   The below blog post has been co-authored by Nithyanantham Venkatesh Prabhu  as well .

A Demo video of the process has also been provided in the section titled ‘Demo’ below.

Scenario

SAP Successfactors Time off provides an option of  having a temporary work schedule / shift assigned  to an employee for a short duration of time which might be required   due to various business needs.

As per the current process, once the HR admin gets the required inputs from the manager or the supervisor, they have to access  time administration section of the employee , provide the necessary details and complete the transaction. This involves the below steps

  • Navigate to employee profile
  • Navigate to Time section of employee. Direct navigation to Administer Time section is also possible
  • Navigate to Work schedule section
  • Click on Temporary assignment
  • Select the start date and end date of the assignment
  • Select the new work schedule from the list
  • Press Assign
  • Check the assignment

Overview of Automated process

The above manual steps of admin performing the assignment of temporary shift can be replaced with  admin conversing with SAP CAI  in simple languages .  SAP CAI then gets the necessary info and triggers the automation artifact within SAP process automation which in turn performs the required steps in SAP Successfactors system.

Automated%20process%20overview

Automated process overview

Configuration Steps

Pre-requisites

SAP CAI  Configuration

Navigate to SAP CAI and create a new bot .

Create%20Bot

Create Bot

Select ‘Perform Actions’ as we need the bot to perform a task/transaction

For this use case, I selected Greetings alone as a predefined skill for the bot.

Provide a valid name , other details like type, storage and visibility as below and then create the bot.

Creation%20Steps

Creation Steps

Intents and entities

The below intents, expressions and entities were created

Overview%20of%20intents

Overview of intents

  • To identify the change shift request
    change%20shift%20expression
  • to identify the user id
    Userid%20expression
  • to identify the new work schedule/shift
    shift%20expressions
  • to identify the start and end dates of the shift assignment

Skills creation

The below skills were added  from the build section of the bot.

Build%20Overview

Build Overview

Skill zwsrequest

The intent for change request is checked as part of the Triggers and the message to be displayed is configured in the actions section

skill%20zwsrequest

skill zwsrequest

Skill zwssuserid

The intent for the user details is checked  and the user details are stored as a memory variable in the requirements section. The Actions section is configured  for subsequent messages.

skill%20zwssuserid

skill zwssuserid

Skill zwssnewschedule

The intent for the new work schedule is checked  and the new work schedule are stored as a memory variable in the requirements section. The Actions section is configured  for subsequent messages.

skill%20zwssnewschedule

skill zwssnewschedule

Skills for Start Date and End date

Skills for the duration is created as same as the above skills , requirements are determined and the subsequent messages are configured in the action sections.

Skill zwssconfirm

Once all the necessary details are obtained from the skills above, zwssconfirm skill connects to SAP process automation and triggers the respective automation bot.

The oauth details have to be obtained from the service instance credentials created for SAP process Automation instance within SAP BTP.

The POST API URL is obtained from the deployed automation artifact within SAP Process automation. Kindly refer to   ‘Deployment and Notification trigger’  within SAP Process Automation configuration section below

2022-05-13_23h16_11.png

The value mentioned against irpa-api-key is obtained from the deployed SAP process Automation artifact. Kindly refer to   ‘Deployment and Notification trigger’  within SAP Process Automation configuration section below. You can update the value once automation artifact is deployed.

2022-05-13_23h18_19.png

The payload is also obtained from the deployed automation artifact. The below fields are passed as input variables to the automation artifact.

2022-05-13_23h21_54.png

SAP Process Automation configurations

Navigate to the SAP process automation lobby section and create  Automation project.

Automation%20project%20creation

Automation project creation

The respective steps to be performed in Successfactors system has been captured as various applications within the automation project.

overview

overview

Screen Captures

Login screen

2022-05-13_23h33_32-1.png

Employee Profile screen

Navigation within the employee profile screen is captured as below

Employee%20profile

Employee profile

Workschedule  Screen capture

2022-05-13_23h40_19.png

Automation

The Automation artifact is designed with  the above screen captures as below.

Kindly note that  in the START Application, i have provide the deep link to navigate directly to personal information section of the employee

2022-05-13_23h44_05.png
2022-05-13_23h46_49.png

Deployment and Notification Trigger

Once the artifact is tested locally , Press the RELEASE button and then press DEPLOY .

During Deploy option, select the option ‘Create a Trigger’ as this automation artifact would be triggered from SAP CAI.

2022-05-13_23h50_35.png

Select the Trigger type as ‘API’ , automation artifact that has to be executed and confirm  .

2022-05-13_23h52_46.png

Navigate to section Monitor from the overview page and click on the tile ‘Automations’ within the manage section.

2022-05-13_23h54_29.png

This would display the details of the deployed artifact and also the POST URL which is used in the SAP CAI API connection section.

The payload to be used in SAP CAI is also provided in the details.

To get the API keys, navigate to the Settings sections and the keys can be created.

2022-05-13_23h56_35-1.png

Notifiers can be created for the start, success and failure actions of the bot.

The details of deploying the artifacts along with creation of notifiers is mentioned clearly in the developer tutorial-Integrate chatbot with irpa

The below demo has been recorded as per the configurations above.

Conclusion

The above automations can also be performed by directly calling Successfactors API  within the automation artifact instead of executing the screen captures.  The blog–Let’s call iRPA 2.0 bot from CAI chatbot to update SuccessFactors  by Divya Tiwari  provides the necessary details to call the APIs.

The above automations can be performed with the below services as well

  • Using Business entity recognition along with SAP process Automation
    • An email message containing the details of shift change can be sent through BER and  the relevant APIs can be called in the automation artifact to perform the same steps of shift change
  • Using SAP workflow management feature of SAP Process automation
    • A Form can be configured within no time using the Workflow management feature and the inputs captured in the form can be passed on to the automation bot to trigger the process.
    • Creating your first SAP Process Automation project provides a wonderful overview of the functionalities.

Similar automations can also be developed for the below processes in Successfactors(SFSF)

  • Creation of banks both in SFSF and on premise payroll system with inputs from either chatbots or from email messages
  • Creation of wagetypes both in SFSF and on premise payroll  system . Though this is a very tricky scenario– new wagetypes which are an exact copy of the existing wagetypes  can be automated .

As the name suggests , the above requires either no code or low code to achieve the necessary automation in Successfactors.

References


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK