# When I Work Integration

Connect your BuyerKiosk account to When I Work to sync your team schedule, enable clock-in from the Workbook, and track labor hours against sales in real time.

---

## What This Integration Does

When I Work (WIW) is a scheduling and time-tracking platform. When connected to BuyerKiosk, it provides:

| Feature | Description |
|---------|-------------|
| **Schedule Sync** | Team schedules from When I Work appear in the BuyerKiosk Workbook |
| **Clock-In Integration** | Only clocked-in employees appear as available buyers in the queue |
| **Labor Reporting** | View labor hours and labor-to-sales percentage from within BuyerKiosk |
| **Team Member Sync** | When I Work employees sync to BuyerKiosk automatically |

The integration connects via the When I Work API using a secure token. Your login credentials are used once to generate the token and are never stored.

---

## Getting Started

### Requirements

Before connecting, make sure you have:

- An active When I Work account with at least one location configured
- Admin or manager access to the When I Work account
- Admin access to your BuyerKiosk store

### Accessing the Setup

1. Log into your BuyerKiosk admin panel
2. Click **Integrations** in the left sidebar
3. Select **When I Work**

---

## Connecting When I Work

The setup is a 3-step wizard.

### Step 1: Log In

On the When I Work Integration Setup page, enter your When I Work credentials:

1. Enter your **email address** in the username field
2. Enter your **password**
3. Click `Submit`

BuyerKiosk will use these credentials to request an API token from When I Work. The credentials are sent directly to When I Work's servers and are never stored in BuyerKiosk.

> **Tip:** If your login is rejected, double-check your email and password. You must use the same credentials you use to log into the When I Work website or app.

### Step 2: Select Your Location

After authenticating, When I Work will return a list of your locations (schedules). Each location represents a physical store or schedule group.

1. Choose the location that corresponds to **this BuyerKiosk store** from the dropdown
2. Click `Next`

> **Tip:** If you have multiple stores, each BuyerKiosk store should be connected to a different When I Work location. Make sure to select the correct one for the store you are currently configuring.

### Step 3: Confirmation

Once the location is selected, your integration is complete. The page will show a confirmation message: "Your Account is Now Setup!"

The integration is now active and BuyerKiosk will begin pulling schedule and employee data from When I Work.

---

## How the Integration Works

### Team Member Sync

When the integration is active, BuyerKiosk pulls team member data from When I Work for the selected location. This includes:

- First and last name
- When I Work user ID (stored as `wiwID`)
- Clock-in/out status

Team members who are assigned to your When I Work location automatically appear in BuyerKiosk.

### Clock-In and the Buy Queue

One of the key benefits of the When I Work integration is automatic buyer list filtering:

- **Only employees who are clocked in** at When I Work appear as available buyers in the buy queue
- When a team member clocks in through When I Work, they automatically become available in BuyerKiosk
- When they clock out, they are removed from the available buyers list

This prevents assigning buys to team members who are not currently working.

### Schedule in the Workbook

The Workbook displays schedule information from When I Work, showing which team members are scheduled for the current day. This helps managers plan coverage and assign buys efficiently.

---

## Labor Report

The **Labor Report** is available under **Team > Labor Report** in the sidebar (when the integration is enabled). It shows:

| Metric | Description |
|--------|-------------|
| **Labor Hours** | Total hours worked by all team members today |
| **Labor Dollars** | Estimated labor cost based on hours |
| **Current Sales** | Today's sales total |
| **Labor Percent** | Labor cost as a percentage of sales |

The report also lists each team member with their When I Work ID, name, and current shift hours.

> **Note:** Data is cached and refreshed every 5 minutes to avoid overloading the When I Work API. The numbers shown may have a short delay from real-time values.

---

## Scheduling Provider Options

BuyerKiosk supports multiple scheduling providers. You can configure your preferred provider under **Schedule > Settings**:

| Provider | Description |
|----------|-------------|
| **None** | Scheduling disabled |
| **BuyerKiosk Native** | Built-in scheduling with overtime rules, payroll rounding, and shift management |
| **When I Work** | Uses When I Work for schedules and time clock |
| **Homebase** | Uses Homebase for schedules and time clock |

To switch providers, go to **Schedule > Settings** and change the `Active Provider` dropdown.

> **Tip:** If you switch from When I Work to BuyerKiosk Native scheduling, you gain access to built-in overtime calculations, payroll rounding, and shift policies directly within BuyerKiosk.

---

## Troubleshooting

### Login credentials rejected

- **Cause:** The email or password entered does not match your When I Work account.
- **Solution:** Verify your credentials by logging into wheniwork.com directly. If you recently changed your password, use the new one.

### No locations appear in Step 2

- **Cause:** Your When I Work account may not have any locations configured, or the API token may have expired.
- **Solution:** Log into When I Work and verify that you have at least one location set up under **Settings > Locations**. If needed, restart the setup process.

### Team members not showing as clocked in

- **Cause:** The clock-in data is cached and refreshes every 5 minutes.
- **Solution:** Wait a few minutes after a team member clocks in. If they still do not appear, verify that they are clocked in at the correct When I Work location (the one linked to this store).

### Labor Report shows zero data

- **Cause:** No team members have clocked in today, or the When I Work connection has expired.
- **Solution:** Verify the integration is still active by checking the setup page. If it shows Step 1 (the login form), the API token may have expired. Re-run the setup process to generate a new token.

### "WhenIWork integration is not enabled" message in Workbook

- **Cause:** The When I Work integration has not been set up for this store, or it was disabled.
- **Solution:** Complete the setup wizard under **Integrations > When I Work**. All three steps must be completed for the integration to be active.

---

## Related Articles

- [Navigating the Admin Panel](/support/articles/navigating-the-admin-panel)
- [Mastering the Queue](/support/articles/mastering-the-queue)
- [Shopify Integration](/support/articles/shopify-integration)
