# When I Work

Snapshot

| Features                        | Details                                                                       |
| ------------------------------- | ----------------------------------------------------------------------------- |
| Release Status                  | Released                                                                      |
| Source API Version              |                                                                               |
| Table Selection                 | Yes                                                                           |
| Column Selection                | Yes                                                                           |
| Edit Integration                | Yes                                                                           |
| Replication Type Selection      | No                                                                            |
| Authentication Parameters       | <p>When I Work developer key<br>When I Work email<br>When I Work password</p> |
| Replication Type                | Key based Replication                                                         |
| Replication Key                 | <p>DATE<br>NA</p>                                                             |
| Suggested Replication Frequency | 24 hrs                                                                        |

| Tables/APIs Supported |              |
| --------------------- | ------------ |
| List Times            | Locations    |
| List Users            | List Shift   |
| Position              | List Payroll |

### Integrate When I Work with Daton

1. Signin to Daton
2. Select Impact from Integrations page
3. Provide Integration Name Replication Frequency and History. Integration name would be used in creating tables for the integration and cannot be changed later
4. Provide your When I Work developer key, email and password. [Click here](https://help.wheniwork.com/articles/getting-access-to-the-when-i-work-api-computer/) to learn more
5. After providing the details to authorize Daton to periodically extract data from Impact.
6. Post successful authentication you will be prompted to choose from the list of available tables
7. Then select all required fields for each table
8. Submit the integration.

### Workflow

1. Integrations would be in Pending state initially and will be moved to Active state as soon as the first job loads data successfully on to the configured warehouse
2. Users would be able to edit/pause/re-activate/delete integration anytime
3. Users can view job status and process logs from the integration details page by clicking on the integration name from the active list

### When I Work Data

**List Times**

Purpose: Retrieve a list of all shifts

Source API Documentation: <https://apidocs.wheniwork.com/external/index.html#tag/Times>

Replication: Key-Based Replication

Replication Key: LastRunTime

**Fields**

| fullname                | type      |
| ----------------------- | --------- |
| id                      | NUMERIC   |
| account\_id             | NUMERIC   |
| user\_id                | NUMERIC   |
| creator\_id             | NUMERIC   |
| position\_id            | NUMERIC   |
| location\_id            | NUMERIC   |
| site\_id                | NUMERIC   |
| shift\_id               | NUMERIC   |
| start\_time             | TIMESTAMP |
| end\_time               | TIMESTAMP |
| notes                   | STRING    |
| length                  | NUMERIC   |
| hourly\_rate            | NUMERIC   |
| alert\_type             | NUMERIC   |
| is\_approved            | BOOLEAN   |
| modified\_by            | NUMERIC   |
| sync\_id                | STRING    |
| sync\_hash              | STRING    |
| updated\_at             | TIMESTAMP |
| created\_at             | TIMESTAMP |
| break\_hours            | NUMERIC   |
| is\_alerted             | BOOLEAN   |
| \_daton\_user\_id       | NUMERIC   |
| \_daton\_batch\_runtime | NUMERIC   |
| \_daton\_batch\_id      | NUMERIC   |

**Locations**

Purpose: Retrieves all the schedule in a account

Source API Documentation: <https://apidocs.wheniwork.com/external/index.html#tag/Schedules-(Locations)/paths/~12~1locations/get>

Replication: Key-Based Replication

Replication Key: NA

**Fields**

| fullname                           | type      |
| ---------------------------------- | --------- |
| id                                 | NUMERIC   |
| account\_id                        | NUMERIC   |
| is\_default                        | NUMERIC   |
| name                               | STRING    |
| sort                               | NUMERIC   |
| max\_hours                         | NUMERIC   |
| address                            | STRING    |
| latitude                           | NUMERIC   |
| longitude                          | NUMERIC   |
| place\_id                          | NUMERIC   |
| place\_confirmed                   | BOOLEAN   |
| ip\_address                        | STRING    |
| created\_at                        | TIMESTAMP |
| updated\_at                        | TIMESTAMP |
| is\_deleted                        | BOOLEAN   |
| deleted\_at                        | STRING    |
| updated\_by                        | STRING    |
| coordinates                        | STRING    |
| radius                             | NUMERIC   |
| place                              | RECORD    |
| \_daton\_user\_id                  | NUMERIC   |
| \_daton\_batch\_runtime            | NUMERIC   |
| \_daton\_batch\_id                 | NUMERIC   |
| place.id                           | NUMERIC   |
| place.business\_name               | STRING    |
| place.address                      | STRING    |
| place.street\_name                 | STRING    |
| place.street\_number               | STRING    |
| place.locality                     | STRING    |
| place.sub\_locality                | STRING    |
| place.region                       | STRING    |
| place.postal\_code                 | STRING    |
| place.country                      | STRING    |
| place.latitude                     | NUMERIC   |
| place.longitude                    | NUMERIC   |
| place.place\_type                  | STRING    |
| place.place\_id                    | STRING    |
| place.updated\_at                  | TIMESTAMP |
| place.updated\_by                  | STRING    |
| place.formatted\_phone\_number     | STRING    |
| place.international\_phone\_number | STRING    |
| place.website                      | STRING    |

**List Users**

Purpose: Fetches all the users&#x20;

Source API Documentation: <https://apidocs.wheniwork.com/external/index.html#tag/Users>

Replication: Key-Based Replication

Replication Key: LastRunTime

**Fields**

| fullname                                 | type      |
| ---------------------------------------- | --------- |
| id                                       | NUMERIC   |
| account\_id                              | NUMERIC   |
| login\_id                                | NUMERIC   |
| timezone\_id                             | NUMERIC   |
| created\_by                              | NUMERIC   |
| role                                     | NUMERIC   |
| is\_payroll                              | BOOLEAN   |
| is\_trusted                              | NUMERIC   |
| type                                     | NUMERIC   |
| email                                    | STRING    |
| first\_name                              | STRING    |
| last\_name                               | STRING    |
| phone\_number                            | STRING    |
| employee\_code                           | STRING    |
| activated                                | BOOLEAN   |
| is\_hidden                               | BOOLEAN   |
| uuid                                     | STRING    |
| notes                                    | STRING    |
| is\_private                              | BOOLEAN   |
| hours\_preferred                         | NUMERIC   |
| hours\_max                               | NUMERIC   |
| hourly\_rate                             | NUMERIC   |
| alert\_settings                          | RECORD    |
| reminder\_time                           | NUMERIC   |
| sleep\_start                             | TIME      |
| sleep\_end                               | TIME      |
| is\_onboarded                            | BOOLEAN   |
| last\_login                              | STRING    |
| terminated\_at                           | STRING    |
| notified\_at                             | STRING    |
| invited\_at                              | TIMESTAMP |
| created\_at                              | TIMESTAMP |
| updated\_at                              | TIMESTAMP |
| deleted\_at                              | STRING    |
| is\_deleted                              | BOOLEAN   |
| delete\_reason                           | STRING    |
| avatar\_key                              | STRING    |
| employment\_type                         | STRING    |
| middle\_name                             | STRING    |
| start\_date                              | STRING    |
| is\_active                               | BOOLEAN   |
| password                                 | BOOLEAN   |
| country\_id                              | NUMERIC   |
| c2dm\_auth\_key                          | NUMERIC   |
| migration\_id                            | NUMERIC   |
| affiliate                                | NUMERIC   |
| infotips                                 | STRING    |
| timezone\_name                           | STRING    |
| avatar                                   | RECORD    |
| positions                                | STRING    |
| locations                                | STRING    |
| position\_rates                          | RECORD    |
| position\_quality                        | RECORD    |
| sort                                     | RECORD    |
| deletion\_queued                         | BOOLEAN   |
| \_daton\_user\_id                        | NUMERIC   |
| \_daton\_batch\_runtime                  | NUMERIC   |
| \_daton\_batch\_id                       | NUMERIC   |
| dismissed\_at                            | TIMESTAMP |
| country\_code                            | STRING    |
| is\_internal\_login                      | BOOLEAN   |
| alert\_settings.timeoff                  | RECORD    |
| alert\_settings.timeoff.sms              | BOOLEAN   |
| alert\_settings.timeoff.email            | BOOLEAN   |
| alert\_settings.swaps                    | RECORD    |
| alert\_settings.swaps.sms                | BOOLEAN   |
| alert\_settings.swaps.email              | BOOLEAN   |
| alert\_settings.schedule                 | RECORD    |
| alert\_settings.schedule.sms             | BOOLEAN   |
| alert\_settings.schedule.email           | BOOLEAN   |
| alert\_settings.reminders                | RECORD    |
| alert\_settings.reminders.sms            | BOOLEAN   |
| alert\_settings.reminders.email          | BOOLEAN   |
| alert\_settings.availability             | RECORD    |
| alert\_settings.availability.sms         | BOOLEAN   |
| alert\_settings.availability.email       | BOOLEAN   |
| alert\_settings.new\_employee            | RECORD    |
| alert\_settings.new\_employee.sms        | BOOLEAN   |
| alert\_settings.new\_employee.email      | BOOLEAN   |
| alert\_settings.attendance               | RECORD    |
| alert\_settings.attendance.sms           | BOOLEAN   |
| alert\_settings.attendance.email         | BOOLEAN   |
| alert\_settings.payroll                  | RECORD    |
| alert\_settings.payroll.sms              | BOOLEAN   |
| alert\_settings.payroll.email            | BOOLEAN   |
| alert\_settings.hire                     | RECORD    |
| alert\_settings.hire.sms                 | BOOLEAN   |
| alert\_settings.hire.email               | BOOLEAN   |
| alert\_settings.workchat                 | RECORD    |
| alert\_settings.workchat.alerts          | BOOLEAN   |
| alert\_settings.workchat.badge\_icon     | BOOLEAN   |
| alert\_settings.workchat.in\_app         | BOOLEAN   |
| alert\_settings.reporting                | RECORD    |
| alert\_settings.reporting.sms            | BOOLEAN   |
| alert\_settings.reporting.email          | BOOLEAN   |
| alert\_settings.shift\_bidding           | RECORD    |
| alert\_settings.shift\_bidding.sms       | BOOLEAN   |
| alert\_settings.shift\_bidding.email     | BOOLEAN   |
| alert\_settings.workplace\_alerts        | RECORD    |
| alert\_settings.workplace\_alerts.sms    | BOOLEAN   |
| alert\_settings.workplace\_alerts.email  | BOOLEAN   |
| alert\_settings.absences                 | RECORD    |
| alert\_settings.absences.sms             | BOOLEAN   |
| alert\_settings.absences.email           | BOOLEAN   |
| alert\_settings.ot\_alerts               | RECORD    |
| alert\_settings.ot\_alerts.sms           | BOOLEAN   |
| alert\_settings.ot\_alerts.email         | BOOLEAN   |
| alert\_settings.shift-bidding            | RECORD    |
| alert\_settings.shift-bidding.sms        | BOOLEAN   |
| alert\_settings.shift-bidding.email      | BOOLEAN   |
| avatar.url                               | STRING    |
| avatar.size                              | STRING    |
| position\_rates.\_385109                 | NUMERIC   |
| position\_rates.\_0052128                | NUMERIC   |
| position\_rates.\_0507330                | NUMERIC   |
| position\_rates.\_0507331                | NUMERIC   |
| position\_rates.\_0507332                | NUMERIC   |
| position\_rates.\_0507333                | NUMERIC   |
| position\_rates.\_0507334                | NUMERIC   |
| position\_rates.\_0507335                | NUMERIC   |
| position\_rates.\_0646340                | NUMERIC   |
| position\_rates.\_1038147                | NUMERIC   |
| position\_rates.\_1038148                | NUMERIC   |
| position\_rates.\_daton\_pre\_2385109    | NUMERIC   |
| position\_rates.\_daton\_pre\_10052128   | NUMERIC   |
| position\_rates.\_daton\_pre\_10507330   | NUMERIC   |
| position\_rates.\_daton\_pre\_10507331   | NUMERIC   |
| position\_rates.\_daton\_pre\_10507332   | NUMERIC   |
| position\_rates.\_daton\_pre\_10507333   | NUMERIC   |
| position\_rates.\_daton\_pre\_10507334   | NUMERIC   |
| position\_rates.\_daton\_pre\_10507335   | NUMERIC   |
| position\_rates.\_daton\_pre\_10646340   | NUMERIC   |
| position\_rates.\_daton\_pre\_11038147   | NUMERIC   |
| position\_rates.\_daton\_pre\_11038148   | NUMERIC   |
| position\_rates.\_daton\_pre\_2383816    | NUMERIC   |
| position\_rates.\_daton\_pre\_11008917   | NUMERIC   |
| position\_rates.\_daton\_pre\_2382484    | NUMERIC   |
| position\_rates.\_daton\_pre\_2383795    | NUMERIC   |
| position\_rates.\_daton\_pre\_10262243   | NUMERIC   |
| position\_quality.\_385109               | NUMERIC   |
| position\_quality.\_0052128              | NUMERIC   |
| position\_quality.\_0507330              | NUMERIC   |
| position\_quality.\_0507331              | NUMERIC   |
| position\_quality.\_0507332              | NUMERIC   |
| position\_quality.\_0507333              | NUMERIC   |
| position\_quality.\_0507334              | NUMERIC   |
| position\_quality.\_0507335              | NUMERIC   |
| position\_quality.\_0646340              | NUMERIC   |
| position\_quality.\_1038147              | NUMERIC   |
| position\_quality.\_1038148              | NUMERIC   |
| position\_quality.\_daton\_pre\_2385109  | NUMERIC   |
| position\_quality.\_daton\_pre\_10052128 | NUMERIC   |
| position\_quality.\_daton\_pre\_10507330 | NUMERIC   |
| position\_quality.\_daton\_pre\_10507331 | NUMERIC   |
| position\_quality.\_daton\_pre\_10507332 | NUMERIC   |
| position\_quality.\_daton\_pre\_10507333 | NUMERIC   |
| position\_quality.\_daton\_pre\_10507334 | NUMERIC   |
| position\_quality.\_daton\_pre\_10507335 | NUMERIC   |
| position\_quality.\_daton\_pre\_10646340 | NUMERIC   |
| position\_quality.\_daton\_pre\_11038147 | NUMERIC   |
| position\_quality.\_daton\_pre\_11038148 | NUMERIC   |
| position\_quality.\_daton\_pre\_2383816  | NUMERIC   |
| position\_quality.\_daton\_pre\_11008917 | NUMERIC   |
| position\_quality.\_daton\_pre\_2382484  | NUMERIC   |
| position\_quality.\_daton\_pre\_2383795  | NUMERIC   |
| position\_quality.\_daton\_pre\_10262243 | NUMERIC   |
| sort.\_179391                            | NUMERIC   |
| sort.\_232098                            | NUMERIC   |
| sort.\_daton\_pre\_1179391               | NUMERIC   |
| sort.\_daton\_pre\_1232098               | NUMERIC   |
| sort.\_daton\_pre\_1180252               | NUMERIC   |

**List Shifts**

Purpose: Returns list of all shifts

Source API Documentation: <https://apidocs.wheniwork.com/external/index.html#tag/Shifts/paths/~12~1shifts/get>

Replication: Key-Based Replication

Replication Key: LastRunTime

**Fields**

| fullname                         | type      |
| -------------------------------- | --------- |
| id                               | NUMERIC   |
| account\_id                      | NUMERIC   |
| user\_id                         | NUMERIC   |
| location\_id                     | NUMERIC   |
| position\_id                     | NUMERIC   |
| site\_id                         | NUMERIC   |
| start\_time                      | TIMESTAMP |
| end\_time                        | TIMESTAMP |
| break\_time                      | NUMERIC   |
| color                            | STRING    |
| notes                            | STRING    |
| alerted                          | BOOLEAN   |
| shiftchain\_key                  | STRING    |
| published                        | BOOLEAN   |
| published\_date                  | TIMESTAMP |
| notified\_at                     | TIMESTAMP |
| instances                        | NUMERIC   |
| created\_at                      | TIMESTAMP |
| updated\_at                      | TIMESTAMP |
| acknowledged                     | NUMERIC   |
| acknowledged\_at                 | TIMESTAMP |
| creator\_id                      | NUMERIC   |
| is\_open                         | BOOLEAN   |
| actionable                       | BOOLEAN   |
| block\_id                        | NUMERIC   |
| requires\_openshift\_approval    | BOOLEAN   |
| openshift\_approval\_request\_id | NUMERIC   |
| is\_trimmed                      | BOOLEAN   |
| is\_approved\_without\_time      | BOOLEAN   |
| \_daton\_user\_id                | NUMERIC   |
| \_daton\_batch\_runtime          | NUMERIC   |
| \_daton\_batch\_id               | NUMERIC   |

**Positions**

Purpose: Retrieves all the positions

Source API Documentation: <https://apidocs.wheniwork.com/external/index.html#tag/Positions/paths/~12~1positions/get>

Replication: Key-Based Replication

Replication Key: NA

**Fields**

| fullname                | type      |
| ----------------------- | --------- |
| id                      | NUMERIC   |
| account\_id             | NUMERIC   |
| name                    | STRING    |
| color                   | STRING    |
| sort                    | NUMERIC   |
| created\_at             | TIMESTAMP |
| updated\_at             | TIMESTAMP |
| is\_deleted             | BOOLEAN   |
| updated\_by             | STRING    |
| tips\_tracking          | NUMERIC   |
| \_daton\_user\_id       | NUMERIC   |
| \_daton\_batch\_runtime | NUMERIC   |
| \_daton\_batch\_id      | NUMERIC   |

**List Payroll**

Purpose: Retrieves listing of payroll periods

Source API Documentation: <https://apidocs.wheniwork.com/external/index.html#tag/Payrolls/paths/~12~1payrolls/get>

Replication: Key-Based Replication

Replication Key: LastRunTime

**Fields**

| fullname                              | type      |
| ------------------------------------- | --------- |
| id                                    | NUMERIC   |
| account\_id                           | NUMERIC   |
| creator\_id                           | NUMERIC   |
| start\_date                           | TIMESTAMP |
| end\_date                             | TIMESTAMP |
| settings                              | RECORD    |
| offset                                | TIME      |
| notes                                 | STRING    |
| is\_edited                            | NUMERIC   |
| is\_closed                            | BOOLEAN   |
| closed\_at                            | DATETIME  |
| is\_finalized                         | BOOLEAN   |
| finalized\_at                         | TIMESTAMP |
| created\_at                           | TIMESTAMP |
| updated\_at                           | TIMESTAMP |
| updated\_by                           | STRING    |
| \_daton\_user\_id                     | NUMERIC   |
| \_daton\_batch\_runtime               | NUMERIC   |
| \_daton\_batch\_id                    | NUMERIC   |
| user\_id                              | NUMERIC   |
| position\_id                          | NUMERIC   |
| location\_id                          | NUMERIC   |
| site\_id                              | NUMERIC   |
| shift\_id                             | NUMERIC   |
| start\_time                           | TIMESTAMP |
| end\_time                             | TIMESTAMP |
| length                                | NUMERIC   |
| hourly\_rate                          | NUMERIC   |
| alert\_type                           | NUMERIC   |
| is\_approved                          | BOOLEAN   |
| modified\_by                          | NUMERIC   |
| sync\_id                              | STRING    |
| sync\_hash                            | STRING    |
| break\_hours                          | NUMERIC   |
| is\_alerted                           | BOOLEAN   |
| settings.enabled                      | BOOLEAN   |
| settings.timesheets                   | BOOLEAN   |
| settings.type                         | NUMERIC   |
| settings.hours\_max                   | NUMERIC   |
| settings.hours\_max\_enabled          | BOOLEAN   |
| settings.hours\_max\_daily            | NUMERIC   |
| settings.hours\_max\_daily\_enabled   | BOOLEAN   |
| settings.hours\_dot\_daily            | NUMERIC   |
| settings.hours\_dot\_daily\_enabled   | BOOLEAN   |
| settings.ot\_multiplier               | NUMERIC   |
| settings.dbl\_multiplier              | NUMERIC   |
| settings.work\_day\_start             | TIME      |
| settings.adp\_enabled                 | BOOLEAN   |
| settings.adp\_viewable                | BOOLEAN   |
| settings.is\_onboarded                | BOOLEAN   |
| settings.ot\_alerts\_clockin          | BOOLEAN   |
| settings.ot\_alerts\_clockout         | BOOLEAN   |
| settings.ot\_alerts\_within           | NUMERIC   |
| settings.reveal\_attendance           | BOOLEAN   |
| settings.use\_sow\_for\_ot            | BOOLEAN   |
| settings.max\_enforcement             | RECORD    |
| settings.max\_enforcement.enabled     | BOOLEAN   |
| settings.rounding                     | RECORD    |
| settings.rounding.enabled             | BOOLEAN   |
| settings.rounding.minuteIncrement     | NUMERIC   |
| settings.tips\_tracking               | BOOLEAN   |
| settings.ot\_prevention               | RECORD    |
| settings.ot\_prevention.enabled       | BOOLEAN   |
| settings.ot\_prevention.prevent\_all  | BOOLEAN   |
| settings.ot\_prevention.allow\_up\_to | NUMERIC   |


---

# 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://daton-sarasanalytics.gitbook.io/daton/integrations/data-sources/saas-integrations/when-i-work.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.
