Module dayforce

ballerinax/dayforce Ballerina library

0.1.0

Overview

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.

Setup guide

Step 1: Create a Dayforce account

  1. 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 selecting sample option.

    Register for Dayforce
  2. Once you have registered, you will receive an email with a link to activate your account.

    Registration email for Dayforce
  3. Click on the link sent in the email to complete the registration process.

    Confirm registration
  4. After confirming your registration, you'll get a success message. Click on the "Sign In" button to log in to your account.

    Registration complete
  5. Enter your email address and password to log in.

    Sign in to Dayforce

Step 2: Obtain the user credentials to access the Dayforce API

To get the credentials for the sample environment, follow the instructions below:

  1. Navigate to API Explorer -> Employee -> GET Employees.
  2. Locate the basic authentication credentials, including the username and password, for the sample environment. Obtain auth tokens

Quickstart

To use the dayforce connector in your Ballerina project, modify the .bal file as follows:

Step 1: Import the module

Import the ballerinax/dayforce module into your Ballerina project.

Copy
import ballerinax/dayforce;

Step 2: Instantiate a new connector

Instantiate a new dayforce:Client giving the auth details.

Copy
dayforce:Client dayforce = check new (
    {
        auth: { 
            username: "<username>", 
            password: "<password>"
        }
    }, 
    "https://www.dayforcehcm.com/Api/ddn/V1/");

Step 3: Invoke the connector operation

Now, utilize the available connector operations.

Copy
public function main() returns error? {
    dayforce:Payload_Employee employee = check dayforce->/ddn/V1/Employees/'42199;
}

Step 4: Run the Ballerina application

Use the following command to compile and run the Ballerina program.

Copy
bal run