Plans and permissions:
- Create an API key: Admin role, or a custom role with Assembled API keys set to Create, edit, and delete API keys
Use this guide to choose the Assembled API endpoint for getting team members’ scheduled hours into another system, such as a payroll tool, an HR system, or your own reports. Each endpoint answers a different question. For parameters, requests, and responses, see the Assembled API documentation.
To create an API key, go to Configure > Assembled API and select Create API key.
Choose an endpoint
| Question | Endpoint | API documentation |
|---|---|---|
| What is each team member scheduled to do, event by event? | GET /v0/activities |
Activities |
| How long was each team member scheduled, how long did they work, and how closely did they follow their schedule? | The adherence report, POST /v0/reports/adherence
|
Reports |
| When are team members expected to work, week after week? | GET /v0/scheduling_rules/working_hours |
Working hours |
Scheduled events
Activities are the events on team members’ schedules, the same ones you see on Schedule > Staffing timeline: work events, breaks, lunches, meetings, and time off. Each activity has an activity type, which is its event type in Assembled.
- By default, the API returns the event in effect at each moment. Where events overlap in Schedule layers, only the top one counts, which is what team members follow and what to use for hours.
- Activities come from your primary schedule unless you ask for a test schedule.
- Add up the length of the events you count as worked time, such as productive and paid events, to get scheduled hours.
Adherence totals
The adherence report combines each team member’s schedule with the agent states from your integrations, grouped by person and interval. These are the same measures as adherence in Assembled’s reports.
| Metric | What it means in Assembled |
|---|---|
scheduled_seconds |
Time the team member was scheduled for productive events |
actual_seconds_worked |
Time the team member actually worked |
actual_seconds_in_adherence |
Time the team member was in a state mapped to the event they were scheduled for |
adherence_percentage |
The share of scheduled time the team member was in adherence |
schedule_adherence_percentage |
The share of all scheduled time, except time off, that the team member followed |
Reports are generated in the background, so request the report, then get it with its ID until it’s complete; see Get a report.
Working hours patterns
Working hours are the recurring rules that say when team members are expected to work, such as weekdays from 9:00 AM to 5:00 PM, and who each rule applies to. Assembled uses them as inputs and limits when it builds schedules. Activities are what actually ends up on the schedule for a given day, so use working hours for patterns and activities for hours.
For more about them, see Working hours and Scheduling rules. If your company schedules with shift patterns instead of working hours, use the shift patterns endpoints in the API documentation.