# Integration with PDI Workforce

### Overview

Integrating PDI Workforce with MangoApps allows organizations to automate the process of importing employee schedules.&#x20;

<figure><img src="/files/fnAD6A6qwcUhKyULIiha" alt="" width="375"><figcaption></figcaption></figure>

This ensures that shift details are up-to-date and accurately reflected within the platform, minimizing manual work and improving workforce management efficiency.

***

### Pre-requisites

Before importing schedules, make sure all user profiles are properly configured with necessary identification details.

To successfully import schedules from PDI Workforce into MangoApps, each user profile must have specific fields completed.

* [**Employee ID**](https://guides.mangoapps.com/admin-guide/module-settings/people/full-profile)**:** Every user must have an Employee ID entered in their MangoApps profile.
* [**Reference ID**](https://guides.mangoapps.com/admin-guide/domain-settings/locations/locations/adding-an-office-location)**:** Each user must be associated with a location via a Reference ID.

***

### File Structure for Schedule Import

It is important to structure your import file according to a specific format to ensure a smooth data transfer.

<figure><img src="/files/Awnz47B3URvzIG0DjOjW" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
The schedule import file must follow a specific column sequence and data format for successful integration.
{% endhint %}

Here’s the required column setup for the CSV file:

| Header Name    | Description                                                            |
| -------------- | ---------------------------------------------------------------------- |
| PERSONNUM      | Employee ID of the user.                                               |
| ENTERDONDTM    | Date and time when the data is imported (Format: mm/dd/yyyy hh:mm:ss). |
| DELETEDSW      | 1 to delete an existing schedule, 0 to add/import a schedule.          |
| SHIFTSTARTDATE | Shift start date (Format: mm/dd/yyyy).                                 |
| SHIFTSTARTTIME | Shift start time (Format: hh:mm:ss).                                   |
| SHIFTENDDATE   | Shift end date (Format: mm/dd/yyyy).                                   |
| SHIFTENDTIME   | Shift end time (Format: hh:mm:ss).                                     |
| SHIFTSEGMENT   | Type of shift segment (Regular or Break).                              |
| HOME\_STORE    | Reference ID of the store/location.                                    |
| WORK\_TYPE     | User's job role (e.g., Employee, Manager, Regional Manager).           |

{% hint style="danger" %}
After populating the data, save the file in **.CSV** format for upload.
{% endhint %}

***

### Uploading the Schedule to MangoApps

Once your schedule file is ready, it must be uploaded and configured correctly within the MangoApps Admin Console.

<figure><img src="/files/3eY3qNooQxurXgXOOfZ5" alt="" width="563"><figcaption></figcaption></figure>

After preparing your CSV file, follow these steps to upload and sync the schedule data into MangoApps.

1. Navigate to **Admin Portal → Modules → Schedules**.
2. **Configure the Source:**
   * **Source:** Select "PDI Workforce."
   * **Source URL:** Provide the SFTP URL where the CSV file is uploaded.
   * **Timezone in CSV file:** Set this to **Store Timezone** to ensure shift times match the users’ local time zones.
3. **Authentication:**
   * Enter the **Login ID** and **Password** for the SFTP location.
   * (Optional) Add an **AES-256 key** if additional encryption is required.
   * Test the connection to ensure successful access.
4. **Set the Sync Schedule.** This will set the frequency for how frequently MangoApps should fetch updates.
5. **Configure Sync Notifications.** Enter an email address where sync status notifications should be sent.
6. Click **Save Settings** to store your configuration and allow synchronization according to your chosen schedule.

   Alternatively, click **Save Settings and Force Now** to immediately sync the uploaded schedules.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guides.mangoapps.com/integrations-guide/shifts-and-schedules/integration-with-pdi-workforce.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
