Dayforce is a comprehensive human capital management system that covers the entire employee lifecycle including HR, payroll, benefits, talent management, workforce management, and services. The entire system resides on cloud that takes the burden of managing and replicating data on-premise.
The Dayforce connector allows you to access the REST API of Dayforce HCM specifically based on Rest API version v1.
This connector has been tested exclusively in the Dayforce developer sample environment. If you encounter any technical issues, please reach out to us using the links provided in the Useful links section.
-
Navigate to the Dayforce website and register. Follow the instructions to create an account. If your company has already purchased a namespace in Dayforce, use that to sign up. Otherwise, you can still use their
sample
environment by selectingsample
option. -
Once you have registered, you will receive an email with a link to activate your account.
-
Click on the link sent in the email to complete the registration process.
-
After confirming your registration, you'll get a success message. Click on the "Sign In" button to log in to your account.
-
Enter your email address and password to log in.
To get the credentials for the sample
environment, follow the instructions below:
- Navigate to API Explorer -> Employee -> GET Employees.
- Locate the basic authentication credentials, including the
username
andpassword
, for the sample environment.
To use the dayforce
connector in your Ballerina project, modify the .bal
file as follows:
Import the ballerinax/dayforce
module into your Ballerina project.
import ballerinax/dayforce;
Instantiate a new dayforce:Client
giving the auth details.
dayforce:Client dayforce = check new (
{
auth: {
username: "<username>",
password: "<password>"
}
},
"https://www.dayforcehcm.com/Api");
Now, utilize the available connector operations.
public function main() returns error? {
dayforce:Payload_Employee employee = check dayforce->/ddn/V1/Employees/'42199;
}
Use the following command to compile and run the Ballerina program.
bal run
The Issues and Projects tabs are disabled for this repository as this is part of the Ballerina library. To report bugs, request new features, start new discussions, view project boards, etc., visit the Ballerina library parent repository.
This repository only contains the source code for the package.
-
Download and install Java SE Development Kit (JDK) version 17. You can download it from either of the following sources:
Note: After installation, remember to set the
JAVA_HOME
environment variable to the directory where JDK was installed. -
Download and install Ballerina Swan Lake.
-
Download and install Docker.
Note: Ensure that the Docker daemon is running before executing any tests.
Execute the commands below to build from the source.
-
To build the package:
./gradlew clean build
-
To run the tests:
./gradlew clean test
-
To build the without the tests:
./gradlew clean build -x test
-
To debug package with a remote debugger:
./gradlew clean build -Pdebug=<port>
-
To debug with the Ballerina language:
./gradlew clean build -PbalJavaDebug=<port>
-
Publish the generated artifacts to the local Ballerina Central repository:
./gradlew clean build -PpublishToLocalCentral=true
-
Publish the generated artifacts to the Ballerina Central repository:
./gradlew clean build -PpublishToCentral=true
As an open-source project, Ballerina welcomes contributions from the community.
For more information, go to the contribution guidelines.
All the contributors are encouraged to read the Ballerina Code of Conduct.
- For more information go to the
dayforce
package. - For example demonstrations of the usage, go to Ballerina By Examples.
- Chat live with us via our Discord server.
- Post all technical questions on Stack Overflow with the #ballerina tag.