# Integrating with Workday (SFTP)

To configure SFTP (Secure File Transfer Protocol) in Workday for securely transferring data to Drivetrain, please follow these steps:

### Step 1: Generate an SSH Key Pair in Workday

1. In Workday, navigate to the **Create x509 Private Key Pair** task.
2. Provide a name and optional description for the key pair.
3. After creation, Workday will display both the **Public Key** and the **RSA-SSH** **Formatted Key**.
4. Copy the **RSA-SSH Formatted Key** and share it with the Drivetrain Team (e.g., SFTP server administrator) to authorize the connection.

### Step 2: Create a Custom Report for Data Extraction

1. Search for and select Create Custom Report in Workday.
2. Configure the report with the following settings:
   1. **Report Type:** Advanced
   2. **Enable As Web Service:** Yes
   3. **Data Source:** All Active and Terminated Workers
3. Add necessary fields to the report, such as Employee ID, Name, Email, Job Title, etc.
4. You can use **Column Heading Overrides** to change the field names for Drivetrain.

### Step 3: Create an Outbound EIB (Enterprise Interface Builder)

1. In Workday, search for and select **Create EIB**.
2. Set the **Name** and choose **Outbound** for the direction.
3. Under the **Get Data** section, select the custom report created in Step 2.
4. In the **Transform** section, choose **None** unless specific transformations are needed.
5. Proceed to the **Deliver** section:
   1. **Delivery Method:** SFTP
   2. **SFTP Address:** <mark style="color:green;">`sftp://sftp1.drivetrain.ai`</mark>
   3. **Directory:** /sftp-XXX/workday
   4. **Authentication Method:** SSH Authentication
   5. **User ID:** <mark style="color:green;">`dtuserXXX`</mark> (Replace with the username provided by the Drivetrain Team)
   6. **SSH Authentication Key Pair:** Select the key pair generated in Step 1

### Step 4: Schedule the Integration

1. Navigate to the **Integration System** page for your EIB.
2. Click on the **Actions** button, then select **Integration > Launch/Schedule**.
3. In the scheduling screen, configure the desired frequency (e.g., daily) and time for the integration to run.
4. Confirm and save the schedule.

### Step 5: Test and Monitor the Integration

1. Manually launch the integration to perform a test run.
2. Verify with the Drivetrain team that the file is successfully transferred to Drivetrain.
