Find the TODO in the readSfsfAppointmentsByPerson
function in src/read-appointments.ts
. Instead of returning an empty array implement a request to retrieve employee time from SAP SuccessFactors. You can try to implement this on your own using the following hints or peek at the solution and copy the implementation.
Use the employeeTimeApi.requestBuilder()
to create a request to get all EmployeeTime. Create the request by using the predefined variables.
Select the following properties:
employeeTimeApi.schema.EXTERNAL_CODE
,employeeTimeApi.schema.START_TIME
,employeeTimeApi.schema.START_DATE
,employeeTimeApi.schema.END_TIME
,employeeTimeApi.schema.END_DATE
,employeeTimeApi.schema.APPROVAL_STATUS
,employeeTimeApi.schema.USER_ID
Add the following filters:
employeeTimeApi.schema.TIME_TYPE
should equaltimeType
employeeTimeApi.schema.USER_ID
should equalpersonId
employeeTimeApi.schema.START_DATE
should be greater or equal tofrom
employeeTimeApi.schema.END_DATE
should be less or equal toto
This time, execute this request against the destination with a destinationName
- SFSF
.
Reload your locally deployed application in the browser and check, whether there are new appointments, especially vacations.